Announcement

#1 2021-11-12 13:09:53

mountwilson
Member
Zwischen den Meeren
2017-07-10
17

no_send_copy_pref() Error

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

 

#2 2021-11-12 13:42:12

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13519

Re: no_send_copy_pref() Error

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

 

#3 2021-11-12 14:17:53

mountwilson
Member
Zwischen den Meeren
2017-07-10
17

Re: no_send_copy_pref() Error

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

 

#4 2021-11-12 15:25:25

erAck
Only trying to help
2015-09-06
1143

Re: no_send_copy_pref() Error

In your piwigo directory, can you do a

Code:

grep -r no_send_copy_pref plugins

to see which file contains that function?


Running Piwigo at https://erack.net/gallery/

Offline

 

#5 2021-11-14 00:19:30

mountwilson
Member
Zwischen den Meeren
2017-07-10
17

Re: no_send_copy_pref() Error

Hi!

Found this in my themeconf.inc.php:

Code:

/* 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:

Code:

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

 

#6 2021-11-14 02:07:33

erAck
Only trying to help
2015-09-06
1143

Re: no_send_copy_pref() Error

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


Running Piwigo at https://erack.net/gallery/

Offline

 

#7 2021-11-14 17:12:44

mountwilson
Member
Zwischen den Meeren
2017-07-10
17

Re: no_send_copy_pref() Error

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

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2021 · Contact