•  » Beta testing
  •  » Smarty error in community edit_photos.tpl

#1 2025-11-16 07:15:36

moberley
Member
2025-11-10
90

Smarty error in community edit_photos.tpl

On my test install, I found a problem on the edit_photos page. Selecting the images shown did not do anything and there were errors shown on the browser console. Looking at the page I found the following Smarty error message:

Code:

var all_elements = [<br />
<b>Deprecated</b>:  Using implode is deprecated. Use join using the array first, separator second. in <b>/var/www/html/piwigo/include/smarty/src/Extension/DefaultExtension.php</b> on line <b>562</b><br />
9,10,11,12];

This appears to be from line 41 in the plugins\community\template\edit_photos.tpl template.

I changed it from:

Code:

var all_elements = [{if !empty($all_elements)}{','|@implode:$all_elements}{/if}];

to:

Code:

var all_elements = [{if !empty($all_elements)}{$all_elements|@join:','}{/if}];

which seemed to resolve the problem.

Environment
Piwigo 16.0.0RC2 Check for upgrade
Installed on 6 November 2025, 1 week 2 days ago
Operating system: Linux
PHP: 8.4.11 (Show info) [2025-11-16 00:16:25]
MySQL: 11.8.3-MariaDB-0+deb13u1 from Debian [2025-11-16 00:16:25]
Graphics Library: External ImageMagick 7.1.1-43
Cache size 14.93 Mo   calculated 5 days ago Refresh

Activated plugin list
Add Users Notes
Additional Pages
Admin Tools
Community
Community Extended User Albums
Copyrights
Custom Registration Form
Extended Description
LocalFiles Editor
Perso Footer
Personal Plugin
Photo added by
Protect Notification
Upload 1 menu
Write Metadata

Last edited by moberley (2025-11-16 07:16:43)

Offline

 
  •  » Beta testing
  •  » Smarty error in community edit_photos.tpl

Board footer

Powered by FluxBB