![]() |
|
Image sorting broken since 1.5.8 - Printable Version +- ZenphotoCMS Forum (https://forum.zenphoto.org) +-- Forum: Support (https://forum.zenphoto.org/forum-1.html) +--- Forum: General support (https://forum.zenphoto.org/forum-4.html) +--- Thread: Image sorting broken since 1.5.8 (/thread-13602.html) Pages:
1
2
|
Image sorting broken since 1.5.8 - acrylian - 2021-06-25 We might have found something indeed. It might be that while the "real natural order" is way better with real text but has problems with dates indeed. But we need to run some more tests to be sure about that. Image sorting broken since 1.5.8 - acrylian - 2021-06-25 Further update: It is indeed the Collator class sorting causing this. While it fixes the original issue of words not being sorting, it fails whenever a date is included. And it does this rather unpredictable which is why we didn't notice it first. We're thinking about how to workaround here,. WE could make an exception for sorting by daate btu then filenames with dates will still fail. So prrobably we will end up with a bunch of new options… Image sorting broken since 1.5.8 - mkanoute - 2021-06-25 No. The logic that prints images is like this: next_image() returns the images in a randon order as decribed before. Image sorting broken since 1.5.8 - acrylian - 2021-06-25 Yes, of course that is the standard loop on a standard theme. But that's end of the line, The logic of fetching and sorting happens deeper in core.
So we need an option respectively options so users can choose which "natural order" they want. Wht works for filenames with dates does not work for say French languagle titles. Again we added this to fix a sorting bug. But becuase of the strange behaviour we missed that it breaks sorting by date. We had test array where all dates were correcty, just some were not without any visible reason. Or we make a coded exception only for date sorting. But then filenames with a date will still not work properly Blame it on PHP that offers standard natural order that is not language aware and then introduces an extra class which also does not work completely as expected. FYI the array comparison of the issue: Image sorting broken since 1.5.8 - steam4m - 2021-06-26 Sorry, a bit slow in replying. I checked phpinfo and Intl is enabled, but it looks as though you've discovered the source of the issue (I'm trying to follow but php programming is like speaking in swahili to me). Is it possible to downgrade a 1.5.8 ro 1.5.7 pending extermination of this bug? Image sorting broken since 1.5.8 - acrylian - 2021-06-26 While I don't tink we have database changes but I would not recommed it as there are lots of other fixes everywhere. The hot fix solution is note above to remove the Collator class. There might be afix in 1.5.9a soon, respectively options that are off by default to restore the previous default. Image sorting broken since 1.5.8 - acrylian - 2021-06-26 Seems we found a better fix than introducing new options by setting a missed parameter. So please try the 1.5.9a on GitHub to see if it does for you. In this rare case it might work to just copy the functions.php (or even the Image sorting broken since 1.5.8 - mkanoute - 2021-06-26 I copied functions.php from master on Gitthub and it looks good so far. Thank you! Image sorting broken since 1.5.8 - acrylian - 2021-06-26 Thanks for the feedback and being persistent that there was an issue. Image sorting broken since 1.5.8 - steam4m - 2021-06-27 Thanks, acrylian, likewise copied functions.php and installed it - much appreciated that date sorting is fixed and so far albums look back to normal. Zenphoto-admin is now telling me that I've changed functions.php and I should run setup. If I do will it revert to older functions.php? (sorry for newb question) Image sorting broken since 1.5.8 - acrylian - 2021-06-27 Running setup does no revert anything. The notice is just a mild security notice in case some may got in somehow and might have hacked the file. It just checks the filetime in relation to all other files currently. In this case you know you were it. Thanks for the feedback that the issue is fixed. |