Announcement

#1 2014-09-26 13:15:23

manuvui
Member
2014-01-19
12

[resolved] wrong parameter count for nl2br()

Hi

after a clean install of 2.7, error on picture template:

Wrong parameter count for nl2br() in ////include/functions_plugins.inc.php on line 229

in addition, descriptions are not displayed, but are correct in the database

I have rewrite all files by ftp but problem persist

Thanks for your help!

Piwigo version: 2.7
PHP version:  5.2.17
MySQL version: 5.1.63
Piwigo URL:

Offline

 

#2 2014-09-26 13:25:06

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

Re: [resolved] wrong parameter count for nl2br()

Hi manuvui,

I don't understand because there is no nl2br in file include/functions_plugins.inc.php http://piwigo.org/dev/browser/tags/2.7. … ns.inc.php

Can you give more details?


Latest blog post (November 28th 2017) Server failures in october and november 2017

Offline

 

#3 2014-09-26 22:30:17

manuvui
Member
2014-01-19
12

Re: [resolved] wrong parameter count for nl2br()

Photos are uploaded via admin. Descriptions are take from iptc. If Description field is empty (I delete it), the error disappear...

Offline

 

#4 2014-09-26 23:08:29

flop25
Piwigo Team
2006-07-06
6656

Re: [resolved] wrong parameter count for nl2br()

Hello
did you do a recent automatic update or... I would re-upload piwigo by overwriting existing files


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#5 2014-09-26 23:12:11

rvelices
Piwigo Team
2005-12-29
1956

Re: [resolved] wrong parameter count for nl2br()

plg wrote:

Hi manuvui,

I don't understand because there is no nl2br in file include/functions_plugins.inc.php http://piwigo.org/dev/browser/tags/2.7. … ns.inc.php

Can you give more details?

this is probably a an event handler ...

Offline

 

#6 2014-09-26 23:42:08

manuvui
Member
2014-01-19
12

Re: [resolved] wrong parameter count for nl2br()

In a first time descriptions are not displayed: then  I rewrite all piwigo files

Offline

 

#7 2014-09-27 09:51:46

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

Re: [resolved] wrong parameter count for nl2br()

manuvui wrote:

Photos are uploaded via admin. Descriptions are take from iptc. If Description field is empty (I delete it), the error disappear...

Can you give the list of your plugins? Do you use Extended Description? Do you have photo/album descriptions with multiple lines? Do you have a Personnal Plugin (made with plugin LocalFiles Editor) ?


Latest blog post (November 28th 2017) Server failures in october and november 2017

Offline

 

#8 2014-09-27 10:51:48

manuvui
Member
2014-01-19
12

Re: [resolved] wrong parameter count for nl2br()

All the plugins are deactivated. Another version 2.6 of Piwigo is running in the same domain. Could be the problem?

Offline

 

#9 2014-09-28 19:50:56

nrms
Guest

Re: [resolved] wrong parameter count for nl2br()

Hi,
I am having the same issue.
I did a clean install of 2.7 today, then installed the Menalto2Piwigo plugin, followed the instructions (including enabling Extended Description).
All my captions from my old Gallery3 are in the description field if I edit a photo, but at the top of the page I get the same error about "Wrong parameter count for nl2br()". On photos where there was no caption the error is not displayed. If I add a descrition to a photo, I start to get the error when viewing the photo and it goes away again if I remove the description. Descriptions at the album level work as expected.
I am on Piwigo 2.7.0 and Extended Description 2.7.0 and my theme is elegant 2.7.0

 

#10 2014-10-03 06:27:21

LD
Guest

Re: [resolved] wrong parameter count for nl2br()

I'm encountering the identical problem.  Just upgraded from within the Admin panel from 2.6.x to 2.7. Any photo with a Description produces the nl2br() error.  Delete the description and no error.

You can see it here: http://luckydoglisle.com  > Photo Gallery.  Click the Dog of the Month.  The latest one, 2014-10 has no description.  Click to the next picture and the error occurs.

I've taken a quick look at the Pwigo function code via Adobe Dreamweaver and didn't see anything unusual in regards to the use of nl2br().  However, it must be with the event trigger and the $args variable somewhere deeper in the code or Smarty.  That's my 2 cents.

Please fix.  :-)

 

#11 2014-10-03 07:00:51

rvelices
Piwigo Team
2005-12-29
1956

Re: [resolved] wrong parameter count for nl2br()

To last 2posters please give your php version?
So far I cannot reproduce at all.

Offline

 

#12 2014-10-03 07:06:14

Konve
Translation Team
2012-07-24
56

Re: [resolved] wrong parameter count for nl2br()

I'm encountering the identical problem.


FreeBSD
PHP: 5.2.17 [2014-10-03 09:03:27]
MySQL: 5.5.20-log [2014-10-03 09:03:27]
GD bundled (2.0.34 compatible)

Plugins on my site:
    AddInfo
    Additional Pages
    Advanced Menu Manager
    Colored Tags
    Contact Form
    Extended Description
    Grum Plugin Classes
    LocalFiles Editor
    Look_like_GBo
    Perso Footer
    PersoFavicon
    PWG Stuffs
    Sitemap
    Statistics
    Title
    meta

Offline

 

#13 2014-10-03 09:58:55

rvelices
Piwigo Team
2005-12-29
1956

Re: [resolved] wrong parameter count for nl2br()

I think this happens only in php lower than 5.3

Can you guys try the following solution:
in picture.php comment the line 140

Code:

//add_event_handler('render_element_description', 'nl2br');

Can you confirm that it solves the problem ?

Last edited by rvelices (2014-10-03 09:59:24)

Offline

 

#14 2014-10-03 11:40:58

Konve
Translation Team
2012-07-24
56

Re: [resolved] wrong parameter count for nl2br()

rvelices wrote:

Can you confirm that it solves the problem ?

I tried your advice .

All turned out , except for two troubles :
1) plugin look_like_gbo2 stopped working:

Notice: Undefined index: LLGBO2_Settings in .../plugins/look_like_gbo2/main.inc.php on line 46

Warning: Cannot modify header information - headers already sent by (output started at .../plugins/look_like_gbo2/main.inc.php:46) in .../include/page_header.php on line 101

2) disrupted the text formatting in the description below the image - now everything is displayed in a single line. <- This is very disappointing and frustrating .

Offline

 

#15 2014-10-03 11:49:37

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

Re: [resolved] wrong parameter count for nl2br()

Hi Konve,

1) this is not related, update plugin Look Like GBO to version 2.7.C, it fixes the problem

2) what is your version of PHP?

Can you send me your database dump by email? (<my username on this forum>@<this domain name>)


Latest blog post (November 28th 2017) Server failures in october and november 2017

Offline

 

Board footer

Powered by FluxBB

github twitter facebook google+ newsletter Donate Piwigo.org © 2002-2018 · Contact