No Code Attached Yet J4 Issue bug
avatar AndySDH
AndySDH
25 Jan 2018

Steps to reproduce the issue

  • Category with ID 1 contains some articles

  • Category with ID 2 is a subcategory of Category ID 1, and also contains some articles.

  • Create a Category Blog Menu Item for Category ID 1.

In the "Blog Layout" Tab, have these settings:
Include Subcategories: All
Category Order: No Order
Article Order: Most Recent First (can be any order)

In the "Options" Tab, have these settings:
Show Navigation: Show

Expected result

I would expect the Navigation between articles (Next/Previous) to also include articles from Category ID 2, since the "Include Subcategories" is active.

Actual result

The Navigation between articles only includes articles from Category 1, ignoring the ones in Category 2.

System information (as much as possible)

Joomla 3.8.3.

Additional comments

The Navigation should respect the same ordering and articles displayed in the Category Blog Layout. And it does for the rest of the settings, but not for this one.

avatar AndySDH AndySDH - open - 25 Jan 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jan 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Jan 2018
avatar mbabker
mbabker - comment - 25 Jan 2018

Just on a first read and my initial gut feeling, I don't think this can be fixed. The pager links (prev/next) use that article's category hierarchy to determine where to go, that part of the system isn't aware of the menu hierarchy and scenarios like this and to be honest I think trying to account for this specific thing might be asking for something too complex to maintain.

avatar AndySDH
AndySDH - comment - 25 Jan 2018

Just on a first read and my initial gut feeling, I don't think this can be fixed. The pager links (prev/next) use that article's category hierarchy to determine where to go, that part of the system isn't aware of the menu hierarchy and scenarios like this and to be honest I think trying to account for this specific thing might be asking for something too complex to maintain.

@mbabker But it does use the Menu Setting to determine the order of the navigation. If in the Menu Item I set the Article Order to alphabetic, the Prev/Next will be based on alphabetic order. If in the Menu Item I set the Article Order to "Most Recent", the Prev/Next will be based on the date. So the Menu Settings are taken into consideration for it.

avatar mbabker
mbabker - comment - 25 Jan 2018

OK, looking at https://github.com/joomla/joomla-cms/blob/staging/plugins/content/pagenavigation/pagenavigation.php that part is easy to do because it's changing the query's ORDER BY clause. The include subcategories part of that is where I think this becomes highly problematic because this means either a much heavier query or additional separate queries to include the categories data.

Not to mention this is a major behavioral change even if it is easier to do than I think it is. Right now the pager stays within the category, with your change you can take users to another category and this can and will break navigation on sites where this is a preferred behavior.

avatar AndySDH
AndySDH - comment - 25 Jan 2018

Right now the pager stays within the category, with your change you can take users to another category and this can and will break navigation on sites where this is a preferred behavior.

I see what you mean, you have a point. But at the same time, thinking about it, a Category Blog with the "Include Subcategories" option is pretty much the same thing in the first place. Clicking on each article will take you to different categories if they are from different child categories. So the fact that you're setting "Include Subcategories" to be ON sets you up for this behavior and I think that would be the expected result for navigation as well...

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jan 2018
Status New Discussion
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jan 2018
Category com_content
avatar brianteeman brianteeman - change - 25 Mar 2018
Labels Added: J3 Issue
avatar brianteeman brianteeman - labeled - 25 Mar 2018
avatar sandstorm871
sandstorm871 - comment - 28 Mar 2018

I have updated a site to Joomla 3.8.6, which has many articles across a parent category & lots of subcategories.
Have the Category Blog Menu set up as per @AndySDH initial description, yet only articles from the parent category are showing up, even though I have set Include Subcategories: All [& tried 1,2,3,4,5 levels].


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

avatar jwaisner jwaisner - change - 13 Mar 2020
Status Discussion Information Required
avatar jwaisner
jwaisner - comment - 13 Mar 2020

@AndySDH are you still seeing this in the latest J3?

avatar brianteeman
brianteeman - comment - 13 Mar 2020

yes

avatar jwaisner jwaisner - change - 15 Mar 2020
Status Information Required Confirmed
Build master staging
avatar crystalenka
crystalenka - comment - 7 Oct 2022

This is still an issue in J4, can we update the label?

avatar alikon alikon - change - 7 Oct 2022
Labels Added: No Code Attached Yet J4 Issue
Removed: J3 Issue ?
avatar alikon alikon - labeled - 7 Oct 2022
avatar alikon alikon - unlabeled - 7 Oct 2022
avatar Hackwar Hackwar - change - 18 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 18 Feb 2023

Add a Comment

Login with GitHub to post a comment