H!
I occasionally see this message:
Warning: Parameter 2 to no_send_copy_pref() expected to be a reference, value given in /www/htdocs/d14681/pwo/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php on line 63
After reloading the page it's gone. Any ideas where to look at?
Thanks' for reading, mountwilson
Config:
Piwigo 12.1.0
Operating system: Linux
PHP: 7.4.23
MySQL: 5.5.5-10.5.11-MariaDB-1:10.5.11+maria~focal-log
Graphics Library: ImageMagick 6.9.10-23
Offline
I don't know which plugin has this function "no_send_copy_pref" but it's the problem: it needs to be changed to be compatible with Piwigo 12.
Can you tell us which plugins you have? (page [Administration > Tools > Maintenance > Environment])
Offline
Hi!
Thank's for your attention!
It's a long list :-)
Additional Pages *
Admin Tools
Advanced Menu Manager *
AlwaysShowMetadata *
Check Files Integrity
Contact Form *
Cookie Consent
Extended Description
FCK Editor *
gdThumb
Grum Plugins Classes.3
Language Switch Menubar
LocalFiles Editor
Personal Plugin
PHP Captcha for Piwigo *
PWG Stuffs *
Read Metadata *
RV autocomplete*
RV Thumb Scroller *
Search 1 menu *
SmartAlbums
SortOrders *
I'm aware that some of them are not jet tested with v12. I marked them with an '*'. But because the error message doesn't appear when reloading the page it's tricky to check which one is the culprit.
Thanks for reading, mountwilson
Offline
In your piwigo directory, can you do a
grep -r no_send_copy_pref plugins
to see which file contains that function?
Offline
Hi!
Found this in my themeconf.inc.php:
/* delete 'send copy to my email' from contact form */ add_event_handler('loc_end_section_init', 'no_send_copy', EVENT_HANDLER_PRIORITY_NEUTRAL+30); function no_send_copy() { global $template; $template->set_prefilter('contactform', 'no_send_copy_pref'); } function no_send_copy_pref($content, &$smarty) { $search = '<label><input type="checkbox" name="send_copy"> {\'Send copy to my email\'|translate}</label>'; return str_replace($search, '', $content); }
Guess, I've added it my several years ago :-)
However, I find the same syntax in TakeATour plugin. It's also shown here.
Thank's for reading, mountwilson
[Addendum]
Trouble continous:
Warning: Parameter 2 to contact_form_footer_link() expected to be a reference, value given in /www/htdocs/v084591/pwo/include/smarty/libs/sysplugins/smarty_internal_runtime_filterhandler.php on line 63
Last edited by mountwilson (2021-11-14 00:46:11)
Offline
I'd say https://piwigo.org/doc/doku.php?id=dev: … al_plugins is behind and outdated but TakeATour still having it is odd. The change was announced in https://github.com/Piwigo/Piwigo/wiki/T … -Piwigo-12
Offline
Hi!
Thank's for the link.
To fix the issue, just remove the &$smarty in prefilter functions . . .
That's what I've done with my own code.
TakeATour is not the only one still using it:
grep -r -n ", &\$smarty)" plugins
returns more findings, among them is a number of plugins marked as compatible with v12.
The theme "modus" also still has it.
Thank's for reading, mountwilson
Offline