Unit/System Tests Language Change Conflicting Files NPM Resource Changed bug PR-5.4-dev Pending

User tests: Successful: Unsuccessful:

avatar adarshdubey03
adarshdubey03
1 Apr 2026

Pull Request resolves #40641 .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

This fixes an issue where the CodeMirror editor is duplicated when subform rows are reordered as it adds a minimal guard using the JoomlaEditor registry to prevent duplicate initialization

Testing Instructions

  1. Set CodeMirror as the default editor
  2. Create or edit an item that contains a subform field with an editor field
  3. Add multiple subform rows
  4. Drag and reorder the rows

Actual result BEFORE applying this Pull Request

Each time a subform row is reordered, a new CodeMirror editor instance is created for the same textarea, resulting in duplicated editors in the ui

Expected result AFTER applying this Pull Request

The CodeMirror editor is initialized only once per textarea

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar adarshdubey03 adarshdubey03 - open - 1 Apr 2026
avatar adarshdubey03 adarshdubey03 - change - 1 Apr 2026
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 1 Apr 2026
Category JavaScript Repository NPM Change
avatar adarshdubey03 adarshdubey03 - change - 1 Apr 2026
The description was changed
avatar adarshdubey03 adarshdubey03 - edited - 1 Apr 2026
avatar adarshdubey03 adarshdubey03 - change - 1 Apr 2026
The description was changed
avatar adarshdubey03 adarshdubey03 - edited - 1 Apr 2026
avatar exlemor
exlemor - comment - 3 Apr 2026

@adarshdubey03 During the Friday April 3rd PR testing session, I was able to replicate the BEFORE condition on Chrome (3 duplicates fields), Firefox (crazy number of fields), but it did not affect Safari 26.4 as you described.

Applying the FIX, did fix the situation in Firefox / Chrome, however it created error message in Console, which I highly doubt will let your PR get through as is.

Uncaught (in promise) TypeError: can't access property "id", this.element is undefined
connectedCallback https://www.domain.com/_j544/media/plg_editors_codemirror/js/joomla-editor-codemirror.min.js?7da19f:4
n https://www.domain.com/_j544/media/system/js/fields/joomla-field-subform.min.js?4fead1:4
setUpDragSort https://www.domain.com/_j544/media/system/js/fields/joomla-field-subform.min.js?4fead1:4
2 joomla-editor-codemirror.min.js:4:1139

Hope it helps...

avatar richard67 richard67 - change - 3 Apr 2026
Labels Added: NPM Resource Changed bug PR-5.4-dev
avatar exlemor exlemor - test_item - 4 Apr 2026 - Tested successfully
avatar exlemor
exlemor - comment - 4 Apr 2026

I have tested this item ✅ successfully on 4352456

I have tested this successfully I believe ;) and the error is now gone :D

@adarshdubey03 - thank you!


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

avatar adarshdubey03 adarshdubey03 - change - 4 Apr 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-04-04 09:26:24
Closed_By adarshdubey03
avatar adarshdubey03 adarshdubey03 - close - 4 Apr 2026
avatar richard67
richard67 - comment - 4 Apr 2026

@adarshdubey03 Why have you closed this PR? It has 1 successful human test.

avatar Fedik
Fedik - comment - 4 Apr 2026

@richard67 I think that not an issue since update to v6 #41070

avatar adarshdubey03
adarshdubey03 - comment - 4 Apr 2026

@Fedik No the issue is still there, however in yesterdays Friday Pr Testing we observed the issue is in chrome and firefox browser only, on safari this is not an issue as mentioned by Emmanuel in his earlier comment. @richard67 there is a problem with my solution that is it gives console errors mentioned by Emmanuel and i am working on this issue, i will reopen this pr when i will be sure with the solution

avatar Fedik
Fedik - comment - 4 Apr 2026

Okay. I think it is need to look on disconnectedCallback() behavior. When element moved in the DOM it removes old editor from DOM and destroys its instance. Maybe in Safari it actually works correctly but in other browsers there a bug related to this.

avatar adarshdubey03 adarshdubey03 - change - 5 Apr 2026
Status Closed New
Closed_Date 2026-04-04 09:26:24
Closed_By adarshdubey03
avatar adarshdubey03 adarshdubey03 - change - 5 Apr 2026
Status New Pending
avatar adarshdubey03 adarshdubey03 - reopen - 5 Apr 2026
avatar joomla-cms-bot joomla-cms-bot - change - 5 Apr 2026
Category JavaScript Repository NPM Change Unit Tests Repository Administration com_admin com_associations com_content com_fields com_installer JavaScript com_media NPM Change Language & Strings Modules
avatar github-actions[bot]
github-actions[bot] - comment - 5 Apr 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

avatar adarshdubey03 adarshdubey03 - change - 5 Apr 2026
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2026-04-05 06:42:52
Closed_By adarshdubey03
Labels Added: Unit/System Tests Language Change Conflicting Files
avatar adarshdubey03 adarshdubey03 - close - 5 Apr 2026

Add a Comment

Login with GitHub to post a comment