RTC NPM Resource Changed bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar heelc29
heelc29
13 Jan 2026

Pull Request for Issue #46472 .

Summary of Changes

This reverts #46621 and corrects the original cause, explaining somewhat why it is not directly reproducible.

It was difficult for me to reproduce the issue, but finally (perhaps after setting ‘Error Reporting’ to system default and disabling ‘Debug System’ and ‘Log Almost Everything’) I was able to reproduce the issue and saw that the list of parent menu items was empty and the suggested workaround of selecting a different menu was also reproduced.
#46621 (comment)

The ID of the article, contact or category is incorrectly passed as the ID for the menu item (edit data), but this should be 0 for a new item. And since the id is not 0, the filtering of the field is incorrect.

// Prevent parenting to children of this item.
if ($id = (int) $this->form->getValue('id')) {
$query->join('LEFT', $db->quoteName('#__menu', 'p'), $db->quoteName('p.id') . ' = :id')
->bind(':id', $id, ParameterType::INTEGER)
->where(
'NOT(' . $db->quoteName('a.lft') . ' >= ' . $db->quoteName('p.lft')
. ' AND ' . $db->quoteName('a.rgt') . ' <= ' . $db->quoteName('p.rgt') . ')'
);
}

Testing Instructions

  1. Go to content → articles/categories
  2. Open/create any article/category
  3. Click save to menu button
  4. Check the parent item dropdown

Actual result BEFORE applying this Pull Request

Parent Item dropdown is usually empty

Expected result AFTER applying this Pull Request

Parent item dropdown has the correct items

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed
  • No documentation changes for manual.joomla.org needed
avatar heelc29 heelc29 - open - 13 Jan 2026
avatar heelc29 heelc29 - change - 13 Jan 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 13 Jan 2026
Category Administration com_categories com_contact com_content JavaScript Repository NPM Change
avatar muhme
muhme - comment - 13 Jan 2026

Quick pre-test to check if 46679 is needed:

  • Before this PR, running three times administrator/components/com_menu/MenuItem.cy.js the 3rd and 4th tests are failing with undefined (reading 'clearChoices') three times
  • After applying this PR all tests passed three times
avatar muhme
muhme - comment - 13 Jan 2026

@ceford @coolcat-creations @ThomasFinnern if someone of you is able to test this PR, it would be great, as we need this to fix the CI System Tests failures, thank you in advance

avatar coolcat-creations coolcat-creations - test_item - 13 Jan 2026 - Tested successfully
avatar coolcat-creations
coolcat-creations - comment - 13 Jan 2026

I have tested this item ✅ successfully on 68c7b2f

Works as expected


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

avatar ceford ceford - test_item - 14 Jan 2026 - Tested successfully
avatar ceford
ceford - comment - 14 Jan 2026

I have tested this item ✅ successfully on 68c7b2f


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

avatar muhme muhme - change - 14 Jan 2026
Status Pending Ready to Commit
avatar muhme
muhme - comment - 14 Jan 2026

RTC


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

avatar muhme muhme - change - 14 Jan 2026
Labels Added: RTC NPM Resource Changed bug PR-5.4-dev
avatar muhme
muhme - comment - 14 Jan 2026

✅ Final test before merge with JBT

  • I was not able to reproduce the parent menu items missing in backend (tried > 10 articles, > categories, setting ‘Error Reporting’ to system default and disabling ‘Debug System’ and ‘Log Almost Everything’, logged out, restarted Docker container, used another Browser, installed one more language and testing sample data, blog sample data and multilingual sample data and tried again -> nada)
  • but System Tests from administrator/components/com_menu/MenuItem.cy.js failed with undefined clearChoicesconstantly
  • PR installed with patch tester and npm run build:js
  • System Tests administrator/components/com_menu/MenuItem.cy.js passed three times
  • Successfully verified that the list of menu entries is loaded (in 'Save to Menu' for articles and in both 'Save to Menu as List' and 'Save to Menu as Blog' for categories). The list of parent menu items is always loaded with the correct entries.
avatar muhme muhme - change - 14 Jan 2026
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2026-01-14 08:44:08
Closed_By muhme
avatar muhme muhme - close - 14 Jan 2026
avatar muhme muhme - merge - 14 Jan 2026
avatar muhme
muhme - comment - 14 Jan 2026

Thank you very much @heelc29 for your contribution in fixing the root cause. Thank you very much @coolcat-creations and @ceford for testing it so quickly.

avatar coolcat-creations
coolcat-creations - comment - 14 Jan 2026

@muhme the bug was always there. Maybe you tried to create a new menu item instead of creating a menu item from an article? You have a Joomla article and click from there in “Save to menu”. I don't understand how you could not reproduce it. :)

avatar muhme
muhme - comment - 15 Jan 2026

@muhme the bug was always there. Maybe you tried to create a new menu item instead of creating a menu item from an article? You have a Joomla article and click from there in “Save to menu”. I don't understand how you could not reproduce it. :)

@coolcat-creations Yes, I create an menu item via 'Save to Menu'. I am also don't understand why I could not reproduce the problem 😄 Anyway, this Morning I see the issue on one of my Joomla test instances on the Internet, and after setting ‘Error Reporting’ to Maximum and enabling ‘Debug System’ and ‘Log Almost Everything’, the issue disappears. Nevertheless, thank you for confirming that you saw the bug before the PR. 👍

Add a Comment

Login with GitHub to post a comment