Error with random image block

ctof

Joined: 2003-08-25
Posts: 4
Posted: Thu, 2004-01-08 21:00

the first time i create the block, it works fine
and after i have this error ine the block:

Warning: rand() expects parameter 2 to be long, string given in /var/www/apache2-default/PostNuke-0.726/html/modules/gallery/block-random.php on line 138
ERROR: requested index [] out of bounds [68]
Fatal error: Call to a member function on a non-object in /var/www/apache2-default/PostNuke-0.726/html/modules/gallery/classes/Album.php on line 962

anybody have a idea ?
Thx

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Thu, 2004-01-08 21:19

Moving thread to correct forum

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Thu, 2004-01-08 21:22

Okay now... so to start, what random block or whose random block did you install and what version? Could you supply the URL too please?

 
ankz

Joined: 2003-09-16
Posts: 4
Posted: Fri, 2004-01-09 10:04

even i tried the random image block
there are 2 available
one is at postnuke.com under blocks
the other is a script available here on the gallery site

both work well with 1.3.1.. BUT UNFORTUNATELY they DO NOT work with 1.4.1
Does ANYONE have a working random gallery block for postnuke??
thanks

 
ctof

Joined: 2003-08-25
Posts: 4
Posted: Fri, 2004-01-09 21:03

OK, more informations about my config:
Gallery 1.4.1 (upgrade from 1.4.0, 1.4.1RC1 ...)
Random block downloaded from gallery site
Sorry the block is not activate because when it is, the error message take all the screen width

 
Not_Public
Not_Public's picture

Joined: 2002-12-13
Posts: 31
Posted: Mon, 2004-01-12 14:55

Having similar errors on a recently upgraded 1.4.1 (from 1.3.something) gallery with "latest" block recently (minutes ago) d/l'd from www.holzapfel-online.de

the only quirk- prior to upgrade, I hade a center block with two random blocks (which were called from the same inactive block) worked fine, each instance pulled a separate random image, life was grand.

but now? now it would appear that there's only one specific album it can safely be aimed at.
(the new block has you pick which album the random image is selected from... like the idea, but would prefer to be able to select multiple albums.)

so- questions about what would make an album an invalid selection for the block?
- exclamation points in the album name? could that do it?
- could it be that the album needs more than 5 images?
- less than 314 images?

the exact error being encoutered now is:

ERROR: requested index [157] out of bounds [4]
Fatal error: Call to a member function on a non-object in /home/somesite/public_html/modules/gallery/classes/Album.php on line 962

but it only occurs in the album "Recent Additions!!!" and others with non alpha-numeric characters...

Is there a way around this other than changing album titles?

 
Not_Public
Not_Public's picture

Joined: 2002-12-13
Posts: 31
Posted: Mon, 2004-01-12 14:58

addendum- appearantly altering the album title still doesn't help...
(sheesh- thought I had an easy fix)

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Mon, 2004-01-12 18:25
 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Mon, 2004-01-12 18:35

Not_Public, I'm not sure about the out of bounds error. I have never seen that that I recall. Are you possibly doing a resize on your originals rather than just using the thumbs? In my situation, I have:
Width of thumb (px) is empty
Height of thumb (px) is empty
Save aspect ratio (0=no/1=yes) 0
Use resize (0=no/1=yes) 0
Use photo not thumb (0=no/1=yes) 0
Also you can choose an individual album only as you know but look at the first selection which is default: No Special Album. This is also all albums.