Piwigo / piwigo-bootstrap-darkroom

A mobile-ready and feature-rich theme for Piwigo photo gallery, based on Bootstrap 4
Apache License 2.0
83 stars 40 forks source link

smarty_internal_runtime_filterhandler.php warning #296

Open ketchemr opened 2 years ago

ketchemr commented 2 years ago

Latest version gives this error visible in the image page on several plugins: include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php on line 63

This is visible to the user on the image page.

plegall commented 2 years ago

I don't see it! Can you give us more details? Do you have plugins activated? Specific options on Bootstrap Darkroom?

jheinitz commented 2 years ago

Hi!

I had a similar issue and it was caused by the PersoFavicon plugin. I changed the following: File: PersoFavicon/main.inc.php Line: 57 Old: function Favicon($content, &$smarty){ New: function Favicon($content){

I found an issue on the Forum page on piwigo.org which mentions this, but I'm not 100% sure.

Can we expect that all plugins will be changed like this in the near future or does it break backwards compatibilty with older Piwigo versions?

Kind regards

Jens

ketchemr commented 2 years ago

I am seeing this from two plugins: Warning: Parameter 2 to add_info_photo_preT() expected to be a reference, value given in /home/ketchemr/rrkphoto.com/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php on line 63

Warning: Parameter 2 to osm_insert_map() expected to be a reference, value given in /home/ketchemr/rrkphoto.com/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php on line 63

These look like the plugins "Manage Properties Photos" and "OpenStreetMap". I suspect a change in piwigo-bootstrap-darkroom has caused a backwards compatibility issue.

jheinitz commented 2 years ago

Hi!

Yes, there are more. Could could do the following to look for the ones affected:

  1. Login to your Server and navigate to the root directory of your installation. In your case it should be "/home/ketchemr/rrkphoto.com".
  2. Find the affected files using the following command: $ find . -type f | xargs grep -l "function.*smarty"
  3. This should give you a list with all the files. You could then remove the second argument from the function, if it is "&$smarty".

The drawback is that these files get overwritten, when you install updates for your plugins, because the changes are only made locally.

Best regards

Jens

@plegall Is this a valid workaround?

ketchemr commented 2 years ago

That fixed it. Thanks.