CMS Made Simple Forums
https://forum.cmsmadesimple.org/

Error display and solving them
https://forum.cmsmadesimple.org/viewtopic.php?f=7&t=80895
Page 1 of 1

Author:  AccentAvondschool [ Mon May 20, 2019 9:56 am ]
Post subject:  Error display and solving them

Hi,

I almost successfully converted the website of our school from CMSMS v1.12.2 to v2.2.10 on subdomain (www1).
After quite a few smarty adjustments everything (menu/calendar/news/etc) seems to work (on screen) but the error logs still show some PHP warnings but I have no idea where to look. Some lines of code ...
\$1:
[Mon May 20 11:14:14.608096 2019] [fcgid:warn] [pid 14027:tid 139848157689600] [client 84.84.7.27:57657] mod_fcgid: stderr: PHP Warning:  A non-numeric value encountered in /var/www/vhosts/accentavondschool.nl/domains/www1.accentavondschool.nl/tmp/templates_c/1f872bb2407ba11fb3b08117a364153d774ad774_0.tpl_top.58.php on line 34, referer: https://www1.accentavondschool.nl/
[Mon May 20 11:14:14.608223 2019] [fcgid:warn] [pid 14027:tid 139848157689600] [client 84.84.7.27:57657] mod_fcgid: stderr: PHP Warning:  Parameter 2 to smarty_postfilter_noopener() expected to be a reference, value given in /var/www/vhosts/accentavondschool.nl/domains/www1.accentavondschool.nl/lib/smarty/sysplugins/smarty_internal_runtime_filterhandler.php on line 57, referer: https://www1.accentavondschool.nl/

Is there a way to get the error messages a little easier to understand, for example which block or code generates the error?

Thanks in advance
Accent Avondschool - https://www.accentavondschool.nl/
René

Author:  DIGI3 [ Mon May 20, 2019 3:30 pm ]
Post subject:  Re: Error display and solving them

These are warnings so won't bring your site down. Usually they're just modules which need minor updates for your version of PHP.

PHP is reporting those errors, they're not generated by CMSMS. But you can probably find out what is causing them by looking at the files it lists, and the line number specified. These particular ones are in cache files so you'll have to look at them before clearing the cache.

Author:  velden [ Mon May 20, 2019 6:07 pm ]
Post subject:  Re: Error display and solving them

First warning:
.._0.tpl_top.58.php ...

Suggests it's something at the very top (before <__html>) of your page template. I'm not sure if it can be included templates (global content blocks or others too).

Second warning:

https://cmscanbesimple.org/blog/solutio ... nerability

Author:  AccentAvondschool [ Mon May 20, 2019 7:29 pm ]
Post subject:  Re: Error display and solving them

@DIGI3 & @velden thank you for your quick responses.

Domain www1.accentavondschool.nl runs on latest PHP 7.2.18 and because the log file is already 50Mb I want to reduce these warning messages.

I am going to view your advice and links, thanks for this information.

Regards,
René

Author:  DIGI3 [ Mon May 20, 2019 7:31 pm ]
Post subject:  Re: Error display and solving them

It's good to sort them out, but you can always change the reporting level to not include warnings. Typically you just enable the warnings on development sites, not production.

Author:  calguy1000 [ Mon May 20, 2019 7:45 pm ]
Post subject:  Re: Error display and solving them

\$1:
smarty_postfilter_noopener()


This is not a core function. But you may have added a postfilter function.
You can look in your assets/plugins or lib/plugins directory for a file containing that filter.

Or look in your UDT's

Author:  Rolf [ Tue May 21, 2019 8:42 pm ]
Post subject:  Re: Error display and solving them  Topic is solved

The second warning is already fixed in the blog:
https://cmscanbesimple.org/blog/solutio ... nerability
Update your plugin file with the latest code.

Author:  AccentAvondschool [ Wed May 22, 2019 9:15 pm ]
Post subject:  Re: Error display and solving them

@Rolf, calguy1000,

Thx for your responses.

I've indeed added the postfilter function 'postfilter.noopener.php' and it is already active on the current site (http://www.accentavondschool.nl).
On the new site (www1.accentavondschool.nl) this file is in the new plugin folder. I just compared them and the only difference with my code and the code from https://cmscanbesimple.org/blog/solutio...nerability was the Ampersand for $smarty in my code like ...
\$1:
function smarty_postfilter_noopener($tpl_output, &$smarty) {

Also is the latest blog version 1.15.8 active on the new site (www1.accentavondschool.nl)

Regards,
René

Page 1 of 1 All times are UTC
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/