Hello
After updating to 16.1.0 (I skipped 16.0.0) i get Smarty fatal errors when attempting to change settings on some plugins. Here's but one sample:
Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "file:/var/www/piwigo/plugins/Media_Icon/admin/admin_general.tpl" on line 35 "{if $smarty.foreach.media_icon_admin_checkbox_left.index < $smarty.foreach.media_icon_admin_checkbox_left.total/2|ceil}" unknown modifier 'ceil' <-- thrown in /var/www/piwigo/plugins/Media_Icon/admin/admin_general.tpl on line 35
Clicking back arrow on browser takes me back to plugins listing.
Purging the compiled template cache does not help.
Suggestions?
thanks.
Piwigo URL: https://fristersoft.net
Piwigo 16.1.0
Installed on 21 July 2016, 9 years 4 months 1 week 6 days ago
Operating system: Linux
PHP: 7.4.33
MySQL: 5.5.5-10.5.29-MariaDB-0+deb11u1
Graphics Library: External ImageMagick 6.9.11-60
Cache size 5765.36 Mo
Activated plugin list (47)
Add < head > element Add tags mass Additional Pages
Admin Tools Advanced Menu Manager AlwaysShowMetadata
Automatic Size BatchCustomDerivatives Community
Cookie Consent Exif View Exiftool GPS
Extended Description FCK Editor gdThumb
Grum Plugins Classes.3 Language Switch Linked Pages
LocalFiles Editor Manage Properties Photos Media Icon
meta OpenStreetMap Panoramas
Password Policy Personal Favicon Photo Update
PHP Captcha for Piwigo Piwecard PWG Stuffs
Read Metadata rightClick Rotate Image
RV DB Integrity RV Menu Tree RV sitemap
RV Thumb Scroller Simple Copyright SmartAlbums
Social Buttons Social Connect Tag Groups
Tag To Keyword Take A Tour of Your Piwigo Title
user delete photo VideoJS
Offline
Smarty as included in Piwigo 16.x is more strict about certain things.
In this particular case using PHP functions as modifiers which it appears is causing an incompatibility with the Media Icon plugin because "ceil" is not registered.
I got the same error message when I loaded that particular plugin but I was able to clear it by adding the following to the LocalFiles editor Personal Plugin section and activating the Personal Plugin.
add_event_handler('loc_begin_admin_page', 'personal_smarty_setup');
function personal_smarty_setup()
{
global $template;
$template->smarty->registerPlugin("modifier", "ceil", "ceil");
}Possibly there is a similar workaround for the other plugins causing errors.
Offline
New revision published for [extension by julien1311] Media Icon ("ceil" was useless in the template and I fixed a bug for PHP 8 as well)
Offline