Loading...
 
Features / Usability

Features / Usability


Image Gallery Follies: See the Amazing 2 Ring Offset Circus!

posts: 175 Canada

Hey Kids,

How are everyone's Image Galleries working after an upgrade to 4 or 4.1?

Having a real party here, and I believe it has to do with the offset argument when listing/editing galleries.

tiki-galleries.php returns an error for starters.

error
Copy to clipboard
The following error message was returned: The query was: select `sortorder`,`sortdirection` from `tiki_galleries` where `galleryId`=? Values: 4 o The built query was likely: select `sortorder`,`sortdirection` from `tiki_galleries` where `galleryId`='4'


Now, the individual images are all still there and still work when addressed directly, and SOME of the galleries could be browsed if you go right to them, but not all. For example

http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=1 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=2 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=3 no function good
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=4 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=5 no function good
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=6 no function good
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=7 no function good
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=8 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=9 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=10 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=11 works
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=12 works
and the brand new lucky 13 I made today also worked

Needless to say the most important gallery is on e not working, # 3

I've been all over these in the database and I can't find anything differentiating these there.

But then by sheer poking-aroundery I discovered that while

http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=3
or
http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=3&offset=0

did not work

http://worldfreemansociety.org/tiki-browse_gallery.php?galleryId=3&offset=2

did. Hmmmmmmm.

Well, then I tried a blind hack around line 387 of tiki-galleries.php

Before
Copy to clipboard
if (!isset($_REQUEST["offset"])) { $offset = 0; } else { $offset = $_REQUEST["offset"]; }


I changed the $offset to a value of 10, the error went away and two of my image galleries showed up.

Well this was progress of a sort, so I experimented and the lowest value that doesn't produce an error is 2.

With $offset = 2; tiki-galleries.php shows eleven galleries of the 13, the highest ID number galleries.

Ok, I'd settle for that, but while tiki-galleries.php LISTS the galleries, clicking on one to browse it produces an error still, UNLESS you add an offset argument to the URL &offset=2 or higher, and of course the Return to Gallery buttons most often don't specify an offset so you see the error with them as well.

I would love to hear, at this point from any Wild Gallery Tamers, Offset Jugglers, or Flying DB Trapeze Artists...


.... and the CROWD WENT WILD!!!

There are no comments at this time.