Sort order not working when filter is applied

Phoca Gallery - image gallery extension
jb80
Phoca Enthusiast
Phoca Enthusiast
Posts: 59
Joined: 16 Feb 2013, 16:53

Sort order not working when filter is applied

Post by jb80 »

I have an issue where the Categories View sort order, e.g. "Title Ascending" is not working correctly when multi level categories are used with a filter applied. The sort function seems to sort on hidden parent level-1 categories that were excluded on the filter.

I am using a menu item to access Categories View.
Image

With this filter applied which excludes the level-1 parent categories
Image

and the result filters on the level-1 categories which are hidden, in this example the hidden category is called "Africa" and hence why countries associated with Africa are listed first
Image

I am wondering whether the sort function should take into consideration categories that have been filtered out? :idea:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Sort order not working when filter is applied

Post by Jan »

Hi, are these categories subcategories of Africa? If yes, did you hide displaying subcategories in categories view?

Jan
If you find Phoca extensions useful, please support the project
jb80
Phoca Enthusiast
Phoca Enthusiast
Posts: 59
Joined: 16 Feb 2013, 16:53

Re: Sort order not working when filter is applied

Post by jb80 »

Jan wrote: 16 Sep 2023, 15:44 Hi, are these categories subcategories of Africa? If yes, did you hide displaying subcategories in categories view?
Yes, level-3 categories. I tried this too, but it didn't work either.

Here is an extract of the Africa categories, showing all three (3) the levels.

Level-1 - Africa => filtered out using the component option
Level-2 - Maderia, Morroc, Namibia, etc => trying to sort alphabetically on this level (however categories do not contain images)
Level-3 - Funchal (2020), Marrakesh (2016), Estosha (2012), etc => categories where the photos are assigned (also tried filtering out these categories to no affect)

It seems the filtering option doesn't have an affect on the sort order? :idea:

Image
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Sort order not working when filter is applied

Post by Jan »

Hi, the filtering is just simple feature, it just say to database, do not load these selected categories for categories view. Nothing else.

Jan
If you find Phoca extensions useful, please support the project
jb80
Phoca Enthusiast
Phoca Enthusiast
Posts: 59
Joined: 16 Feb 2013, 16:53

Re: Sort order not working when filter is applied

Post by jb80 »

Jan wrote: 18 Sep 2023, 15:17 Hi, the filtering is just simple feature, it just say to database, do not load these selected categories for categories view. Nothing else.
The filtering feature is working fine, it's the sorting feature that isn't.

The sort feature seems to disregard categories that have been filtered (hidden) and creates a sort order that includes them, even though they are filtered.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Sort order not working when filter is applied

Post by Jan »

Hi, sorting and filtering is independent. Sorting means, that the items gets ordering in the current level (category), filtering means that such items are not loaded from database. But they are indepentent to each other.

Jan
If you find Phoca extensions useful, please support the project
jb80
Phoca Enthusiast
Phoca Enthusiast
Posts: 59
Joined: 16 Feb 2013, 16:53

Re: Sort order not working when filter is applied

Post by jb80 »

Jan wrote: 18 Sep 2023, 20:31 sorting and filtering is independent
I would have thought the "results" from the filter should be sorted. It appears that everything is sorted regardless of the filter. Definitely quirky behaviour :idea:
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48689
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Sort order not working when filter is applied

Post by Jan »

Hi, this is then much more a question on Joomla developers.

Jan
If you find Phoca extensions useful, please support the project
Post Reply