You see the diff-view
No diff-view is opened.
See #21851 for more information about diff-view
Labels |
Added:
?
|
Title |
|
Labels |
Added:
J4 Issue
|
Status | New | ⇒ | Discussion |
Issue and JS error confirmed.
Today's build.
The js error happens only when editing a file from an override. When editing any other file not belonging to any override, the js errro doesn't happen. So it seems really to be related to the override management.
No idea what that could be. I think it needs a js expert. Maybe @dgrammatiko can help?
@richard67 No, that's not related.
That could be. I will check details later after work.
@brianteeman Could you have a look on this issue? I think it really can have something to do with the new switchers from PR #24463 , like Sharky supposes, because that diff view for override files in the template manager contains switchers, too, and those seem still be the old ones.
Not able to test right now. the template_overrides table never gets updated
I doubt very much it is anything to do with the switcher code as that is pure css. But you can test it yourself by deleting the class=switcher for two fields in administrator\components\com_templates\forms\source.xml
Title |
|
@brianteeman Thanks, I've tried that, removing class from the 2 switchers, and as you supposed that did not help. It seems the js of that diff view is either broken or not loaded at all. Maybe something to do with the codemirror editors in that view? Do you know who can help here further? I first thought some selector in js may fail because of changed classes, that's why I thought it could be related to your changes.
FWIW the js of that diff view was depending on 2 events emitted by the old switcher. Those events do NOT exist any more, therefore, the script doesn't do anything anymore...
@dgrammatiko This explains a lot. Thanks for helping.
@richard67 I can also describe a possible solution:
((Joomla) => {
Joomla.switchDifState = (event) {
if (event.target.checked) {
event.target.dispatchEvent(new CustomEvent('theNameOfTheExistingEventForOn'));
} else {
event.target.dispatchEvent(new CustomEvent('theNameOfTheExistingEventForOff'));
}
})(Joomla);
@dgrammatiko Thanks. I'll try to find some time on weekend. But if someone who is more familiar with js and events finds time before, I would not be unhappy.
Closed_By | alikon | ⇒ | joomla-cms-bot |
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-09-19 18:32:16 |
Closed_By | ⇒ | alikon |
Set to "closed" on behalf of @alikon by The JTracker Application at issues.joomla.org/joomla-cms/25323
please test #26359
When opening the edit view, a javascript error is reported for the editor (codemirror), and then the loading of the js file is aborted, see following screen shot:
In English: 1. script media/vendor/codemirror/mode/text/x-php/text/x-php.min.js has been loaded even if its MIME type is not valid for javascript, and 2. Loading failed for the same script.
Maybe that's related to this issue?