? ? Pending

User tests: Successful: Unsuccessful:

avatar ggppdk
ggppdk
1 Oct 2017

Pull Request for Issue #18178

Summary of Changes

Listing articles in sub-categories when categories filter is active is no longer working
This quite a big annoyance for people that need it,

  • also issue may go unnoticed by people that need

Bug was introduced when category filter in articles manager was converted to multi-value

  • multi value category filtering code does not support listing sub-category articles (yet)

This PR fixes

  • the very common case of filtering by a single category
  • but also fixes the case of selecting more than 1 category in the filter
  • also the (max) level filter is applied per filtered category

Testing Instructions

In a Joomla installation that e.g. has testing articles
filter by category "Joomla" and you will notice that only 11 articles are shown , those that belong to category "Joomla"

also please test with

  • 2 categories without (max) level filter
  • 2 categories with (max) level filter

Expected result

Those that belong to subcategories should also be listed (when max level filter is not set)

Actual result

Those that belong to subcategories are not listed (despite max level filter not set)

Documentation Changes Required

None

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
5.00

avatar joomla-cms-bot joomla-cms-bot - change - 1 Oct 2017
Category Administration com_content
avatar ggppdk ggppdk - open - 1 Oct 2017
avatar ggppdk ggppdk - change - 1 Oct 2017
Status New Pending
avatar alikon
alikon - comment - 1 Oct 2017

i don't think this fix is correct
cause now we can select based upon multiple categories selection
so
if i choose to select multiple categories only, for me means i don't want articles from subcategories
but only articles from the selected categories

avatar degobbis
degobbis - comment - 1 Oct 2017

Even if this is perhaps just a side effect of the multi-select funtion, so I find that now better so. I have previously missed seeing only the articles of a category without subcategories. If you want to see the articles of the subcategories too, then better by selecting it additional.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar ggppdk
ggppdk - comment - 1 Oct 2017

@alikon

The fix is very correct in terms that it restores the old and expected behaviour
(look at the code please)

  • when a single category is selected then we make use of category and the max-levels filter
  • when multi-categories are selected we only list in the selected categories

it is very bad UX to select a category and not be able list articles in sub-categories

In my own extension i have implemented also listing records in sub-categories even when selecting multiple categories (combining the max-level filter)

avatar degobbis
degobbis - comment - 1 Oct 2017

To restore the old behavior, this patch is correct.
But I think it would be more logical to control the sub-categories with Max-Level when I want to see them. The selection of the category should only display those that were selected.
So I think the bug is that Max-Level does not change the display of the subcategories.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar alikon
alikon - comment - 1 Oct 2017

@ggppdk in your own extensions you are free to do whatever you want,
in the core i think you are free to propose whatever you want, but we are all free to discuss proposal and even to have different opinion

avatar ggppdk
ggppdk - comment - 1 Oct 2017

@degobbis

What you describe about multiple categories,
is trade-off that was accepted when category filter was made multi-value

Doing what you ask is possible
by creating multiple lft and rgt limiting clauses that are glued with OR

but e.g. @alikon believes otherwise

only the specific categories should be listed and
e.g. the max-levels filter should be hidden or a message should be shown to the user once per login session that articles are listed only in the specific (multiple-selected) categories

also the max-levels filter in single category starts at the level of the category

  • in the case of multiple categories it should propably start at the top, meaning it may be a little confusing to the user

  • let's fix this nasty UX bug for single category

  • and not add something that in my opinion would be a new feature

avatar ggppdk
ggppdk - comment - 1 Oct 2017

@alikon

This is bug fix of previous / expected behaviour,
please forget me mentioning my extension
I mentioned it only to show that i have a little experience on the topic

Also i do not care so much for this PR,
we can just leave it broken and live with it
you can ask me to close it and i will do

avatar alikon
alikon - comment - 1 Oct 2017

@ggppdk
i 'll always never ask you to close a pr
"simply because i don't like it"
i've just expressed how i've understand that new feature/behaviour #17668
maybe should have been better to discuss more and more deeply that feature/behaviour (#17668) before to merge it

avatar brianteeman
brianteeman - comment - 1 Oct 2017

We have a UX team - why not let them make the decision?

avatar alikon
alikon - comment - 1 Oct 2017

👍

avatar ggppdk
ggppdk - comment - 1 Oct 2017

Sure,
my most important notes and questions are in this answer:
#18179 (comment)

how to behave with single category selected ?

  • handle it differently than selecting multiple categories

how to behave with multiple category selected ?

  • hide the max level filter ?
  • show a warning message once per session that articles in sub-categories are not shown ?
avatar infograf768
infograf768 - comment - 2 Oct 2017

show a warning message once per session that articles in sub-categories are not shown ?

Not really in favour of that.
Suggestion if possible: a new filter to display sub-categories articles or not for all cases (single and multiple categories selected.

avatar Bakual
Bakual - comment - 2 Oct 2017

Imho items from subcategories have to be shown when there is no level filter set. That is the old behavior and thus the expected one. Doesn't matter if one category is selected or multiple. The behavior has to be the same.
If you only want items from the selected categories, you set the level filter to 1. That's the point of that filter.

avatar degobbis
degobbis - comment - 2 Oct 2017

In my opinion, with the multi-selective of the categories, the level filter field has become obsolete.
I can now choose my subcategories more flexibly than before.
What makes sense now would be a selection field for "show all subcategories".

For me personally this bug is welcome. Finally, ONLY the items appearing in the selected category are displayed.
This has always annoyed me before, still have to adjust the level for this.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar hrefferh hrefferh - test_item - 2 Oct 2017 - Tested successfully
avatar hrefferh
hrefferh - comment - 2 Oct 2017

I have tested this item successfully on 92d7844


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar pickeboe
pickeboe - comment - 2 Oct 2017

We discovered this bug too. Today a client and myself was wondering about the new "feature" or the bug. My client called me and asked me, where to find his articles, listed in sub categories of a higher category. I said him, he should use the filter field "max level filter". He did. But couldn't find the expected articles. Why? I tested it, and must agree to him: this filter has broken! I agree with Bakuals posting.

Irrespective of the multi category filter mode, the "max level filter" should work like before. This is very important!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar ggppdk ggppdk - change - 2 Oct 2017
Labels Added: ?
avatar ggppdk
ggppdk - comment - 2 Oct 2017

Ok fixed previous behaviour for multiple categories too

now we will have J3.7.x behaviour in case of filtering by multiple categories

Fixed the max level filter is usage too,
by making it to be based on the deepest category

avatar ggppdk ggppdk - change - 2 Oct 2017
Title
Fix backend articles manager not listing articles in sub-categories when categories filter has only 1 category
Fix backend articles manager not listing articles in sub-categories when categories filter is active
avatar ggppdk ggppdk - edited - 2 Oct 2017
avatar ggppdk ggppdk - change - 2 Oct 2017
The description was changed
avatar ggppdk ggppdk - edited - 2 Oct 2017
avatar infograf768
infograf768 - comment - 2 Oct 2017

My test:
I have 2 root categories, each of them having a sub category.

  1. If I filter by these 2 root categories and do not define a level for Select Max Levels
    articles belonging to the root and children categories DO display fine

  2. If I set Select Max Levels to 1
    I then loose the subcategory articles from the second category in the order they show in the filter. Here the sub category of Categoria (it-it) (it-IT).
    But the articles form the first root categorie(fr-FR) subcategory DO display.

screen shot 2017-10-02 at 17 09 59

Note: I can't change the order of the root categories in the filter. I guess the order depends on their id.

  1. I need to set Select Max Levels to 2 to get back the display of the articles belonging to the subcategory of Categoria (it-it) (it-IT)
avatar ggppdk
ggppdk - comment - 2 Oct 2017

@Quy , @infograf768

thanks for review, testing
i made a fix for depth level filter, and CS
please recheck / retest

avatar infograf768 infograf768 - test_item - 3 Oct 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 3 Oct 2017

I have tested this item successfully on c140d1a

Looks fine now!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar infograf768
infograf768 - comment - 3 Oct 2017

Please add a blank line before the foreach and one after the end of the foreach

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Oct 2017

@hrefferh can you please retest?

avatar hrefferh
hrefferh - comment - 3 Oct 2017

1category root _2filter-levels
1category sub-sub _2filter-levels
2categories root sub-sub _2levels

Testing c140d1a not succesfull!

With one level || no level filter => okay.

With multi categories and level filter [e.g:2] => wrong listing.
category-filter: 1 category[root] && level-filter: 2 => 11 hits [okay].
category-filter: 1 category[sub-sub] && level-filter: 2 => 23 hits [okay].
category-filter: 1 category[root] && category-filter: 1 category[sub-sub] && level-filter: 2 => 93 hits [wrong listing].

In last example - so far I could find in short time - ALL sub-subs [3. level from root] are listed not only the selected sub-sub!

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Oct 2017

@hrefferh please mark your Test:

  • Open Issue Tracker
  • Login with your github-Account
  • Click on blue "Test this"-Button above Authors-Picture
  • mark your Test as unsuccessfully
  • hit "submit test result"
avatar hrefferh hrefferh - test_item - 3 Oct 2017 - Tested unsuccessfully
avatar hrefferh
hrefferh - comment - 3 Oct 2017

I have tested this item 🔴 unsuccessfully on d1abe63

#18179 (comment)


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar ggppdk
ggppdk - comment - 3 Oct 2017

@hrefferh

I think you have missed reading a part of the description
(when selecting multiple categories) the depth used is the depth of the depeest category

what you got was the expected / intended behaviour according to the above description

(the trade-off is that the max-level filter is now based on the deepest filtered category)

avatar infograf768 infograf768 - test_item - 3 Oct 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 3 Oct 2017

I have tested this item successfully on d1abe63


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar ggppdk
ggppdk - comment - 3 Oct 2017

(the trade-off is that the max-level filter is now based on the deepest filtered category)

the alternative is to create 1 join to the categories DB table per category selected in the category filter
-- this way we will be able to distiguish the level per category selected

if you would want this, i could do

avatar ggppdk
ggppdk - comment - 3 Oct 2017

Another option to make this consistent is always use depth from top

avatar hrefferh
hrefferh - comment - 3 Oct 2017

@ggppdk

You maybe right.
But for me it is confusing that when I filter root + sub1sub1 [ level: 2 ] to get results of sub2sub1 and sub3sub1 too!?

root
  |          
  |          
  |sub1       |sub2     |sub3
     |        |         |
     |        |         |
     |sub1    |sub1     |sub1
avatar ggppdk
ggppdk - comment - 3 Oct 2017

yes i agree it can be confusing,

re-thinking of it , i think , maybe it is possible to do without extra joins
checking it

avatar ggppdk ggppdk - change - 3 Oct 2017
The description was changed
avatar ggppdk ggppdk - edited - 3 Oct 2017
avatar ggppdk
ggppdk - comment - 3 Oct 2017

@hrefferh , @infograf768

done , now the (max) level filter is applied to every category individually
please retest

avatar ggppdk
ggppdk - comment - 3 Oct 2017

Also i found a bug in categories manager linking to article manager with wrong level filter, i will make a different PR

avatar hrefferh hrefferh - test_item - 3 Oct 2017 - Tested successfully
avatar hrefferh
hrefferh - comment - 3 Oct 2017

I have tested this item successfully on fc7803e

Bingo!

root + sub1sub1 [ level: 2 ] => 11 hits

sub1sub1 [ level: 2 ] => 23 hits

root + sub1sub1 [ level: 2 ] && sub1sub1 [ level: 2 ] => 34 hits - identical to single filtering

GREAT! THANK YOU AGAIN FOR YOUR EFFORTS!!!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 3 Oct 2017

@infograf768 can you please retest?

avatar infograf768 infograf768 - test_item - 4 Oct 2017 - Tested successfully
avatar infograf768
infograf768 - comment - 4 Oct 2017

I have tested this item successfully on fc7803e


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar infograf768 infograf768 - change - 4 Oct 2017
Status Pending Ready to Commit
avatar infograf768
infograf768 - comment - 4 Oct 2017

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar ggppdk ggppdk - change - 5 Oct 2017
Labels Added: ?
avatar infograf768
infograf768 - comment - 8 Oct 2017

@mbabker
I guess this one can now get in.

avatar mbabker mbabker - close - 9 Oct 2017
avatar mbabker mbabker - merge - 9 Oct 2017
avatar mbabker mbabker - change - 9 Oct 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-10-09 23:26:48
Closed_By mbabker
avatar bobr666
bobr666 - comment - 30 Nov 2017

I thought this fix was included in Joomla 3.8.2 but the feature still doesn't seem to be fixed


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

avatar zero-24
zero-24 - comment - 30 Nov 2017

@bobr666 can you please open a new issue with that thing that don't work for you (please explain with as mach as possible detail) so we can keep track on open issues. Thanks!
https://github.com/joomla/joomla-cms/issues/new

avatar sandstorm871
sandstorm871 - comment - 28 Mar 2018

I only noticed this on a site we just updated to 3.8.6 and seem the problem still persists?
I have a category blog link set to include subcategories - set to all, but only the articles from the parent category show.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.
avatar ggppdk
ggppdk - comment - 28 Mar 2018

@sandstorm871

This was a fix for the DB model of the backend articles manager,
it is not related to filtering of the frontend views

avatar sandstorm871
sandstorm871 - comment - 28 Mar 2018

Sorry, I misread this, I'll test further & start a new issue, as think this is a bug.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18179.

Add a Comment

Login with GitHub to post a comment