I am getting some wierd errors from the random block

jwippel

Joined: 2002-12-05
Posts: 4
Posted: Thu, 2002-12-05 22:11

The error that I get occasionaly when the page is reloaded is this

ERROR: requested index [3] out of bounds [2]
Fatal error: Call to a member function on a non-object in /www/j/jwippel/htdocs/modules/gallery/classes/Album.php on line 642

any help please.

Also it seams that I can only randomly pick from one album and then only from the main category. It will not pick from my sub albums.

Any suggestions?
:smile:

 
jwippel

Joined: 2002-12-05
Posts: 4
Posted: Thu, 2002-12-05 22:20

Sorry

After reading on some more I have discovered that many were getting the same thing.

I still would like to pull pics from multiple location though. Is this happening from the same problem?

 
jwippel

Joined: 2002-12-05
Posts: 4
Posted: Thu, 2002-12-05 22:26

I changed define(CACHE_EXPIRED,86400); to 0 and everything is working now.

What exactly di I do. I believe that I essentually elemenated the cache

Is this correct in thinking?

 
BenSeb

Joined: 2002-11-04
Posts: 11
Posted: Sat, 2002-12-07 17:51

same problem here!

any ideas?

 
joerg
joerg's picture

Joined: 2002-10-12
Posts: 77
Posted: Thu, 2002-12-12 18:26

Hi,

the CACHE_EXPIRED determines the time in seconds to rebuid the block-random.cache file. The default is one day. The other thing is, that the block-random.cache is only rebuild when the one who gets it displayed is not logged into PN in this moment.

With your modification the cache-file should now be rebuild every time you call the block, but only when you are not logged into PN.

I made the restriction to only build the cache when the caller is not logged in, because of security reasons. The problem was, when someone is logged on the cache was created with his security context. In case of that it was possible that someone could see pictures which he has no right on.

Yes, a little bit hard to understand, but maybe it's getting better with G2. :smile:

Joerg