Announcement

  •  » Extensions
  •  » Extended Description - Random with no album gives errors

#1 2013-09-10 23:29:30

jessepunter
Member
England
2013-04-23
44

Extended Description - Random with no album gives errors

Hi all!

Love the Extended Description plugin functionality but I've stumbled across a problem. The documentation appears to indicate that "album" is an optional parameter to the [random] tag, but when I just use something like [random size=XS] I get the following errors:

Warning:  [mysql error 1064] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE 1=1 AND (category_id NOT IN (26))
  ORDER BY RAND()
  LIMIT 1' at line 1

  WHERE 1=1 AND (category_id NOT IN (26))
  ORDER BY RAND()
  LIMIT 1
; in /home/content/09/10858209/html/core/chichicards/include/dblayer/functions_mysqli.inc.php on line 834


Notice: Trying to get property of non-object in /home/content/09/10858209/html/core/chichicards/include/dblayer/functions_mysqli.inc.php on line 171

Warning: Cannot modify header information - headers already sent by (output started at /home/content/09/10858209/html/core/chichicards/include/dblayer/functions_mysqli.inc.php:833) in /home/content/09/10858209/html/core/chichicards/include/page_header.php on line 101


However, add "album=1" and the error goes away and the random photo shows perfectly.

I'm using Stripped theme so don't know if this makes a difference.

Anybody know if using random without an album should actually work by displaying a random photo from the whole gallery?

Thanks in advance for any help.


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#2 2013-09-11 09:08:00

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Extended Description - Random with no album gives errors

It should work. It works for me (and as usual I don't see the error in the request...)

Offline

 

#3 2013-09-11 09:14:10

jessepunter
Member
England
2013-04-23
44

Re: Extended Description - Random with no album gives errors

Thanks mistic100, but still not sure why it doesn't work for me though. In my homepage (via Additional Pages) I have used the call in the HTML body.

This works:

  <div id="theImg" class="img_frame" style="opacity: 1;">
    [Random album=1 size=XS html=yes link=yes]
  </div>

This doesn't:

  <div id="theImg" class="img_frame" style="opacity: 1;">
    [Random size=XS]
  </div>

Am I using it wrong?

Thanks for your help!


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 

#4 2013-09-11 16:38:14

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: Extended Description - Random with no album gives errors

nothing

when I said it should work, it's indeed a bug

Offline

 

#5 2013-09-11 16:56:29

jessepunter
Member
England
2013-04-23
44

Re: Extended Description - Random with no album gives errors

Phew, thanks mistic, thought I was going bonkers!

Do I need to do something to get this corrected? Raise an bug? Contact the author?

Many thanks.


I'm no expert, I'm basically a beginner with an alter ego!
My sites:
My First Piwigo Site
My Hobby Site

Offline

 
  •  » Extensions
  •  » Extended Description - Random with no album gives errors

Board footer

Powered by FluxBB

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