[ansel] Image ordering issues

Heath S. Hendrickson heath at outerspaceconsultants.com
Fri Apr 16 06:10:11 PDT 2004


Chuck Hagenbuch wrote:

> Quoting Brian Burke <BPBurke at alum.mit.edu>:
>
>> I recall some talk recently about image ordering issues on the list
>> recently, and wanted to get an idea if this is something someone is
>> working on?  Or if I'm having issues that no one else is having?
>
>
> I've seen some problems that may or may not be the same as what you 
> describe (I
> don't think I have to upload something for the orders to all get reset 
> to 0,
> but that might do it to). It's on my todo list to figure out why, but 
> I just
> moved into a new condo and well, there have been other more important 
> things on
> my todo list as a result. :)
>
I think the problem is that when you insert new images, they don't get a 
value set for datatree_order.   When I've seen this issue, the images 
always end up at the start of the gallery as they get a number of 1, 2, 
3, ...  Related to this is the fact that it seems that the datatree 
driver is reordering the galleries on it's own.  When I've gone into the 
reorder page and set an order that includes an intentional gap (21, 22, 
24, 25 ...), something is removing the gap and shifting everything up.  
If that's intentional, it would be nice to have the option of making the 
call to the driver so that it didn't do that (I sometimes leave 
intentional gaps if I know I'm going to be uploading a picture later on 
that will go in that space, so I don't have to reorder everything when I 
do).

Brian, can you look in your database and see what values your images 
have for datatree_order?  I'm guessing that there are multiple images 
with the same value.  That might cause the pseudo-randomness that you 
are seeing.

Is the Datatree driver supposed to automatically assign the value to 
datatree_order when an object is created?  Or is it not doing it because 
we aren't using the parent->child relationship for the images?  Logic 
may need to be added to Ansel to set the datatree_order value, but it's 
may not be trivial to determine what value needs to be set unless you 
grab all the images for the gallery.  Maybe a new Ansel function is 
necessary (getOrder() that just returns an array of images and their 
order for a given gallery)?

Thoughts?

h


More information about the ansel mailing list