User tests: Successful: Unsuccessful:
Pull Request resolves #47755.
Follow-up of #47789
This pull request addresses cross-platform path compatibility issues, particularly for Windows environments, by ensuring that module paths consistently use forward slashes in codemirror build.
Cross-platform path handling improvements:
getPackagesUnderScope in resolve-package.mjs to use forward slashes when constructing module names, avoiding issues with backslashes on Windows that can break Rollup's external module matching.builder.mjs to replace any backslashes with forward slashes, ensuring asset paths are valid in joomla.asset.json.run npm ci
apply patch
run npm ci again
rename media folder to e. g. media_old
run npm ci again
Please check if the assets are loading correctly in the backend for the codemirror editor e. g. System -> Site Templates - Open any file. (ref: #47789 (comment))
Issues are currently occurring on Windows, to validate the test results, please specify the operating system on which the tests were executed. The fix for Windows should not cause regressions on other operating systems It would be helpful if we could validate this simultaneously here.
Error during execution on Windows - see #47755
should work as expected without errors.
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
Thanks @joomdonation!
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository |
| Labels |
Added:
PR-6.2-dev
|
||
Tested successfully on Windows 11. The npm installation completed without errors (806 packages added, 807 audited).
Please use "Test this" here: https://issues.joomla.org/tracker/joomla-cms/47793
I have tested this item ✅ successfully on 439a4e6
I have tested this item ✅ successfully on 439a4e6
The npm error is gone, the \\ in codemirror changed to / but as I've mentioned, the codemirror still looks like this in my setup:

In plg_editors_codemirror, when I added this missing line manually there, the codemirror worked correctly.

I don't know if it's related only to my setup but I tried more than three times and got the same reason.
The expected view of codemirror in my setup looks like this:
The npm error is gone, the \\ in codemirror changed to / but as I've mentioned, the codemirror still looks like this in my setup:

In plg_editors_codemirror, when I added this missing line manually there, the codemirror worked correctly.

I don't know if it's related only to my setup but I tried more than three times and got the same result.
The expected view of codemirror in my setup looks like this:
6.2 after importmaps using inlineDynamicImports: true (working)
joomla.asset.json
After comparing my working versions of 6.2 and 5.4 what I found is:
/ not \\ and it works\\ not / and it works"version": "5.0.0" or "version": "6.0.0" and both works\\ not / (it's not a problem) but doesn't have "version": "6.0.0" (this is the problem).@LadySolveig, I see that both \\ and / works correctly but not sure which are the correct approach.
the only problem now is just the "version" is not added.
also, if both are correct approaches then we don't need to user .replace().
6.2 after importmaps using inlineDynamicImports: true (working)
joomla.asset.json
After comparing my working versions of 6.2 and 5.4 what I found is:
/ not \\ and it works\\ not / and it works"version": "5.0.0" or "version": "6.0.0" and both works\\ not / (it's not a problem) but doesn't have "version": "6.0.0" (this is the problem).@LadySolveig, I see that both \\ and / works correctly but not sure which are the correct approach.
the only problem now is just the "version" is not added.
also, if both are correct approaches then we don't need to use .replace().
@CSGoat0 Thank you for the report and further testing. As discussed here we don't want to use the inlineDynamicImports
https://github.com/joomla/joomla-cms/pull/47680/changes/BASE..3f335799c5f1bbaf7f9674f544b94123ae8c1a75#r3137880336
I can look into later where this behavior might come from and if there's an inconsistency here.
Could you please try to have someone reproduce your issue in parallel (perhaps ask in the BugSquad or Developer Channel on Mattermost)?
@LadySolveig I am not suggesting to use inlineDynamics, what I mean is when i had the complied media folder on windows after importmaps Implementation somehow (inlineDynamics), this is what i get.
The variations among both 5.4 and 6.2 is already confirmed (by others) in the first PR.
The Version is missing when comparing 5.4 to 6.2 just as the replacement of / with \\.
You can confirm that probably even without windows device if you can look into joomla.asset.json of 6.2 after importmaps Implementation. If you have the \\ in the file then you won't have the version.
Even if it works on some browser without the Version and doesn't work on some others, it's still a missing piece compared with 5.4 no? The issue isn't that codemirror doesn't work for me, it's that the file is different from 5.4.
I am just trying to help 😊
It's great that you mentioned the issue again here. @CSGoat0
However, it actually has very little to do with the path fix which we made here. 😊
Would you please check if it is already missing from the original file.
media_source/plg_editors_codemirror/joomla.asset.json
Please try to do it all over again in a fresh empty folder and pull the branch. Then check again.
Only additional explanation
The only way I can explain you issue that it must already be missing here.
The build script does nothing more than read the file here
and populate it after filling it with the dynamic data from the build process
It's great that you mentioned the issue again here. @CSGoat0
However, it actually has very little to do with the path fix which we made here. 😊
Would you please check if it is already missing from the original file.
media_source/plg_editors_codemirror/joomla.asset.json
Please try to do it all over again in a fresh empty folder and pull the branch. Then check again.
Only additional explanation
The only way I can explain your issue, that it must already be missing here.
The build script does nothing more than read the file here
and populate it after filling it with the dynamic data from the build process
| Status | Pending | ⇒ | Fixed in Code Base |
| Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2026-05-23 12:54:05 |
| Closed_By | ⇒ | MacJoom |
Thank you all!
Tested successfully on Windows 11. The npm installation completed without errors (806 packages added, 807 audited).