Jump to content

Featured Replies

Posted

I'm getting error reports from some users and seeing a number of system logs with the following error after upgrading from .15 to .16, with URL being the front page:

TypeError: round(): Argument #1 ($num) must be of type int|float, string given (0)
#0 /usr/src/ips/system/Lang/Lang.php(935): round()
#1 /usr/src/ips/system/Lang/Lang.php(874): IPS\_Lang->formatNumberShort()
#2 [internal function]: IPS\_Lang->IPS\{closure}()
#3 /usr/src/ips/system/Lang/Lang.php(828): preg_replace_callback()
#4 /usr/src/ips/system/Lang/Lang.php(1934): IPS\_Lang->pluralize()
#5 /usr/src/ips/system/Lang/Lang.php(1713): IPS\_Lang->replaceWords()
#6 /usr/src/ips/system/Widget/Widget.php(889): IPS\_Lang->parseOutputForDisplay()
#7 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(19030): IPS\_Widget->__toString()
#8 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer()
#9 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(7269): IPS\Theme\_SandboxedTemplate->__call()
#10 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate()
#11 /usr/src/ips/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call()
#12 /usr/src/ips/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish()
#13 /usr/src/ips/system/Dispatcher/Front.php(558): IPS\Dispatcher\_Standard->finish()
#14 /usr/src/ips/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish()
#15 /usr/src/ips/index.php(13): IPS\_Dispatcher->run()
#16 {main}

and backtrace:

#0 /usr/src/ips/init.php(1036): IPS\_Log::log()
#1 /usr/src/ips/system/Widget/Widget.php(939): IPS\IPS::exceptionHandler()
#2 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(19030): IPS\_Widget->__toString()
#3 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->widgetContainer()
#4 /usr/src/ips/system/Theme/Theme.php(885) : eval()'d code(7269): IPS\Theme\_SandboxedTemplate->__call()
#5 /usr/src/ips/system/Theme/SandboxedTemplate.php(61): IPS\Theme\class_core_front_global->globalTemplate()
#6 /usr/src/ips/system/Dispatcher/Dispatcher.php(173): IPS\Theme\_SandboxedTemplate->__call()
#7 /usr/src/ips/system/Dispatcher/Standard.php(113): IPS\_Dispatcher->finish()
#8 /usr/src/ips/system/Dispatcher/Front.php(558): IPS\Dispatcher\_Standard->finish()
#9 /usr/src/ips/system/Dispatcher/Dispatcher.php(155): IPS\Dispatcher\_Front->finish()
#10 /usr/src/ips/index.php(13): IPS\_Dispatcher->run()
#11 {main}

I've attempted to sign in as these users via the ACP, but that does not reproduce the issue on my end, and the user only sees the white generic error screen (500). I'm hoping this is enough information to track down the issue.

Possibly related to this other issue (which we also ran into) as both have something to do with short number formatting:

Edited by 3ventic

 

  • Author

This is a different error, though the root cause may be the same (that I can't confirm). The impact of this is much more severe as the entire forum is inaccessible to the user impacted by it. The linked issue only prevents the links to the impacted sub-forums from showing up in the template, which catches the error. This error is uncaught and results in a full 500.

Edited by 3ventic

This post was recognized by Marc!

DawPi was awarded the badge 'Helpful' and 5 points.

This is the same.

Open forumRow template bit, find:

Find:

{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}

Change to:

{{$count = (int) \IPS\forums\Topic::contentCount( $forum, TRUE );}}

 

Does it help?

 

This is the same.

Open forumRow template bit, find:

Find:

{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}

Change to:

{{$count = (int) \IPS\forums\Topic::contentCount( $forum, TRUE );}}

 

Does it help?

Yes, did the trick.... temporally fixed...

Thank you so much... 

  • Author
 

This is the same.

Open forumRow template bit, find:

Find:

{{$count = \IPS\forums\Topic::contentCount( $forum, TRUE );}}

Change to:

{{$count = (int) \IPS\forums\Topic::contentCount( $forum, TRUE );}}

 

Does it help?

forumRow template is already changed. This is a different error.

  • Community Expert

Please make sure you revert these template changes.

We have released a patch to address this issue. Please go to AdminCP > System > Support and apply the patch from the first/top left box. If you do not see an option to install the patch, you already have the latest release.

  • Author

Thanks for the quick fix @Stuart Silvester! I've reverted the template changes and installed the patch. One of the users impacted confirmed they're able to access the website again.

Recently Browsing 0

  • No registered users viewing this page.