No Code Attached Yet
avatar pjdevries
pjdevries
8 Jan 2022

Problem identified

When having more than one multi-item menu-item (Category Blog or Category List) for the same category, the links to the single items (title, edit, ...) have a questionable Itemid, in my humble opinion. From what I can see, it's always the Itemid of the first menu-item matching the category. However, I would think it would have the Itemid of the active menu-item for the multi item view. To me it makes sense that, when navigating from a multi item view to a single item view, the active menu-item for the single item view would be that of the multi item view one navigated away from.

Proposed solution

Add the id of the active menu-item for the multi item view as the Itemid in the links for single item views.

Open questions

Is there a logical explanation for the way it is implemented now? Am I missing the obvious?

avatar pjdevries pjdevries - open - 8 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 8 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 8 Jan 2022
avatar brianteeman
brianteeman - comment - 8 Jan 2022

It's pretty much always been this way. I think the logic is that however you get to the article the same itemid is used and therefore the same page layout etc. Your proposal would result in the same article being displayed with two different itemid AND how would something like search present the article

avatar pjdevries
pjdevries - comment - 9 Jan 2022

Thanx for the input @brianteeman. Yes you are right, my proposal would result in an article possibly being displayed with different Itemid's and possibly with different layout's as a result. But if that is the intention, then it's o.k., isn't it?

I think you're also right in that it has always been this way, because I ran into it before. It may well even date back to Mambo times :) Let me clarify why I'm bringing it up now. I'm not sure since when, but we have the possibility for front end content management these days. I spent some time trying this myself, to see if it is usable "out of the box". My initial conclusion is: it isn't.

  • One of the problems I ran into, which has been fixed since then, was not being able to create new articles as a regular registered user.
  • Another problem was not being able to filter articles on logged in user. Logged in users would see everybody's articles, although they would only be able to edit their own, provided the ACL is configured correctly. I was already working on a plugin, adding a custom menu-item tab including a filter switch to remedy this and was happy to discover that you created PR #36555 to solve this issue in Joomla! 4.2 for a slightly different, but similar reason.
  • A third problem I ran into, is the one I'm addressing with this issue. Assume a site with a category blog or list view for a certain category. Assume the articles in that category can be managed by registered users with the proper permissions. It makes sense to have two different menu-items pointing at the same category, but with different settings (think of your PR). As it is now, this results in the problem outlined above.

So what do you, and others, think? Do you agree it's useful to try to think of a solution for this issue? True, I haven't figured out how to handle search results, but that's no reason not to address the issue, don't you think?

avatar brianteeman
brianteeman - comment - 9 Jan 2022
avatar pjdevries
pjdevries - comment - 10 Jan 2022

@brianteeman I don't see how that plugin solves the issue I'm trying to draw attention to. I guess my explanation is not clear enough, but I don't know how to improve that. Furthermore, if nobody else experiences this as an issue, I'll let it be and solve it on a project by project basis.

avatar Hackwar
Hackwar - comment - 2 Feb 2022

I can guarantee you, that we will not implement what you want in Joomla in the core. We would get literally thousands of people complaining about duplicate content (regardless of "duplicate content" even existing or not) and we would make a giant step backwards in our development. I also don't see how editing an article would be dependent on the menu item. Either you have edit rights to an asset or you don't. It shouldn't depend on the display configuration.

All that said, you can get the behavior you want by writing a plugin which replaces the rules in the content router with your own behavior.

avatar richard67 richard67 - close - 2 Feb 2022
avatar richard67
richard67 - comment - 2 Feb 2022

Closing as expected behavior due to reasons stated in the previous comment.

avatar richard67 richard67 - change - 2 Feb 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-02-02 23:00:20
Closed_By richard67

Add a Comment

Login with GitHub to post a comment