Hey there,
I'm having trouble getting &sort to function predictably on a site I'm putting together for a client.
I'm sorting with 3 criteria, two "year" numbers, and an order index for entries that land in the same place with the other two (same creation year, same release year).
My snippet call looks like this:
[[!getImageList?
&tvname=`Cinema`
&tpl=`ligneCV`
&sort=`[{"sortby":"datecasting","sortdir":"DESC","sortmode":"numeric"},{"sortby":"datesortie","sortdir":"DESC","sortmode":"numeric"},{"sortby":"yearorder","sortdir":"DESC","sortmode":"numeric"}]`
]]
To be as clear as possible, "datecasting" and "datesortie" are both years, and is supposed to be used as an int for sorting movies casted and released on identical years.
The issue I'm having is that
on the page I ran my tests on this worked fine, but
on some other pages it only takes the first two sort criteria into account and seems to be ignoring my third one.
Here is an example of template variable content as it is stored in the database on
which the sorting ignores the "yearorder" entries :
[{"MIGX_id":"6","title":"WEST COAST","image":"462249.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Benjamin Weil","prod":"Jéricho Films","datecasting":"2014","datesortie":"","precision":"","autres":"Assistante de Gigi Akoka","url":""},{"MIGX_id":"5","title":"UNE SEMAINE SUR DEUX","image":"19121971.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Ivan Calberac","prod":"Mandarin Cinéma","datecasting":"2009","datesortie":"","precision":"","autres":"Assistante de Christel Baras","url":""},{"MIGX_id":"10","title":"JUVENTA","image":"./169h.jpeg","rea":"Emilie Lamoine","prod":"Aurora films","datecasting":"2007","datesortie":"","precision":"","autres":"Directrice de casting (court-métrage)","url":"","yearorder":"200702"},{"MIGX_id":"9","title":"LE PREMIER VENU","image":"18909891.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Jacques Doillon","prod":"Liaison Cinématographique / Artémis productions","datecasting":"2007","datesortie":"","precision":"","autres":"Directrice de casting enfants et second rôles France","url":"","yearorder":"200701"},{"MIGX_id":"1","title":"LE BEL AGE","image":"19202257.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Laurent Perreau","prod":"Galatée films","datecasting":"2008","datesortie":"","precision":"","autres":"Assistante de Christel Baras","url":"","yearorder":"1"},{"MIGX_id":"2","title":"L'AUTRE","image":"19039945.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Pierre Trividic et Patrick Mario-Bernard","prod":"Ex Nihilo","datecasting":"2008","datesortie":"","precision":"","autres":"Assistante de Christel Baras","url":"","yearorder":"2"},{"MIGX_id":"3","title":"LA ROBE DU SOIR","image":"19241719.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Myriam Aziza","prod":"Mille et une productions","datecasting":"2008","datesortie":"","precision":"","autres":"Assistante de Christel Baras","url":"","yearorder":"3"},{"MIGX_id":"4","title":"LA REGATE","image":"19226248.jpg-r_1920_1080-f_jpg-q_x-xxyxx.jpg","rea":"Bernard Bellefroid","prod":"Liaison Cinématographique / Artémis productions","datecasting":"2008","datesortie":"","precision":"","autres":"Assistante de Christel Baras","url":"","yearorder":"4"}]
I'm trying to guess what could be causing this, and have tried multiple things to no avail.
Do you have any ideas or suggestions as to what I should look for / try next?