joomla / joomla-cms

Home of the Joomla! Content Management System
https://www.joomla.org
GNU General Public License v2.0
4.75k stars 3.64k forks source link

Wrong menu item in body tag when adding new frontend article #39558

Open rbuelund opened 1 year ago

rbuelund commented 1 year ago

Steps to reproduce the issue

(maybe this has something with the create order to do - therefore I write my actual itemid's)

Create two article categories: Cat1 (catid-14) Cat2 (catid-15)

Create theese four menu items : Menu type: Create article - fixed category set to Cat1 (itemid-122) Menu type: Create article - fixed category set to Cat2 (itemid-211) Menu type: Category list - show Cat1 (itemid-199) Menu type: Category list - show Cat2 (itemid-216)

In frontend go to the menu item for Category list - show Cat1

Press New article button

Expected result

The editor page that opens upon pressing New article has the menu itemid-122 (Cat1-new article) in the body tag

Actual result

The editor page that opens upon pressing New article has the menu itemid-211 (Cat2-new article) in the body tag

System information (as much as possible)

Joomla 4.2.6

Additional comments

This is not good if you want to show a specific module in the top of the edit screen.

Catriona commented 1 year ago

I am experiencing the same problem. I have 2 categories, I have a menu with 4 items, as reported above, I have changed the menu items order, I have tried just using one menu with only one category on it, nothing helps, it always opens the create screen for category 1 when the New Article button on the category list is clicked. It does have the correct category in the article, but the links on the cancel/save button go back to the wrong page. The 'create cat2' menu item works correctly, it is only the new article button on the category list page which is not working.


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

Techydeveloper12 commented 1 year ago

i want to work on this issue please assign me this task @joomla-cms-bot @

rbuelund commented 1 year ago

I have a new experince which I belive is related to this problem. I have created two different child templates which have different overrides for com_content/category/default_articles.php.

I connect the one child template to one menu item of type category-list, and the other child template to another menu item also of type categori-list. Both menu items are set to display the same category.

When I now go into one of the two menu items in frontend, then one of the child-template overrides, hi-jacks and it it is not possible to show the correct override for this menu item unless I unpublish the other menu item !!??

Techydeveloper12 commented 1 year ago

i want to work on this issue please assign me this task @rbuelund

rbuelund commented 1 year ago

Sorry - but I do not know how to assign you. I do not think I can...

Techydeveloper12 commented 1 year ago

i want to work on this issue please assign me this task @dziudek @philip-sorokin

alikon commented 1 year ago

there is no need to assign , simply submit a pull request that's all