-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[5.4] Fix: Parent menu items missing when creating menu item via 'save to menu' #46621
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I have tested this item ✅ successfully on 9e64196 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46621. |
|
I have tested this item ✅ successfully on 8110997 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46621. |
|
RTC This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/46621. |
|
✅ Final test before merge with JBT
|
|
Thank you @hiteshm0 for your contribution. Thank you @ceford and @coolcat-creations for testing. |
|
@richard67 I think this PR is responsible for the recent failed system tests. I haven't investigated this further yet. |
@heelc29 I think the same, but I also have not had time to investigate yet. |
After merging of joomla#46621, Cypress System Tests fail more often (but not always) with `(uncaught exception)TypeError: Cannot read properties of undefined (reading 'clearChoices')`. However, investigations have shown that this also happened before, but not as often. It appears that Cypress speeds up page loading and XHR timing, and with the newly added `onChange()`, this causes Cypress to fail with an uncaught exception. This simple *hack* prevents the crash. If you have a better implemention, you are welcome to share it.
…via Save to Menu (joomla#46621)" This reverts commit 7cbd3b9.
|
It seems this PR was not the right fix. Meanwhile there is a new one, see #46681 . |
|
sorry y'all 😅 |

Pull Request for Issue #46472
Summary of Changes
When creating a menu item via "save to menu" from articles or categories, the menu type is preselected on page load. But, the parent item dropdown does not have any items. This is because the parent item dropdown is populated only when a change event is fired on a menu type field. And no change event occurs when the page is loaded with a preselected menu item.
Fix: Added initialization logic to check if a menu type is already selected on page load. If yes, then the onChange function is trigerred manually.
Testing Instructions
Actual result BEFORE applying this Pull Request
Parent Item dropdown is empty
Expected result AFTER applying this Pull Request
Parent item dropdown has the correct items
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed