This doesn't happen on 3.8.13
Install Joomla 4.0-dev @ 9d3acfd
Login to Admin -> System -> Site Templates -> Cassiopeia Details and Files -> index.php
Be able to see enough of the file to meaningfully edit it.
Only see one editor instance
only 19 rows of the editor are visible (on my laptop)
On resizing the browser from big to small and back to big - I now get THREE editor instances!
Google chrome 70 on mac
Labels |
Added:
?
|
Labels |
Added:
J4 Issue
|
I can still replicate this today on all browsers on mac (Google Chrome, Safari, Firefox tested) which rules out this being a browser issue and rules out extensions in google chrome and rules out it being specific to my work mac (as its 0549am and Im at home now on a different mac)
Exact URL I'm on http://0.0.0.0/administrator/index.php?option=com_templates&view=template&id=510&file=L2NvbXBvbmVudC5waHA%3D
To replicate this, drag the right hand side of the browser to the left to crate a tall browser window (all the way, and back again)
Each time you do that you will get THREE textareas. Each time
I am afraid I do not even get codemirror here
:-( Javascript error on page for you?
Only this:
SyntaxError: expected expression, got '<'[Learn More] localhost:8888:2
It is on a multilingual site btw.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-02-10 21:32:28 |
Closed_By | ⇒ | PhilETaylor |
Why was this issue closed? Or is there a PR for it now? I'm still getting multiple instances of codemirror when resizing my desktop screen to a smaller width. I've just checked on the Joomla_4.0.0-alpha11-dev-Development-Full_Package build Sat 03 Aug 2019.
Status | Closed | ⇒ | New |
Closed_Date | 2019-02-10 21:32:28 | ⇒ | |
Closed_By | PhilETaylor | ⇒ |
Status | New | ⇒ | Discussion |
Could this be linked to overrides in some way? When working on an override it is possible to have the three views, headed "Overridden file (editable)", "Original file (readonly)" and "Diff between original and overridden file" respectively. On re-sizing the wide desktop to a narrow view, each of the first two views is duplicated, but interestingly, not the 'differences' view. Resize back and forth again, and the first two views have four copies but the last one is still single.
Just to confirm this still happens today, and in beta 1
Still here in beta 3
404 Failed to load resource: /media/vendor/codemirror/mode/text/html/text/html.min.js
I found a javascript error here : /media/plg_editors_codemirror/js/joomla-editor-codemirror.js
this.checkElement('CodeMirror', 'findModeByName').then(() => {
// For mode autoloading.
window.CodeMirror.modeURL = this.getAttribute('mod-path'); // Fire this function any time an editor is created.
On a second call a new instance of the editor is created with the bad url.
console.log(' modeURL = ' + this.getAttribute('mod-path'))
Adding a counter of instance seems to resolve the problem :
super()
this.n = 0
this.n += 1
if (this.n > 1) {
return;
}
window.CodeMirror.modeURL = this.getAttribute('mod-path');
works also with multiple editors like in associations for example
Thats great - could you submit a pull request please
After several tests this created new bugs but I think I found where the error really came from.
if (this.instance !== '') {
Joomla.editors.instances[this.element.id] = this.instance;
return;
}
if you don't add the instance to the list, buttons like readmore don't work anymore
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-07-30 19:45:36 |
Closed_By | ⇒ | richard67 |
Feel free to re-open this issue if the PR doesn't fix it completely.
I have create a new pull request because I don't have updated my fork before.
I discover a little github, very sorry :(
Ok, no problem.
Cannot replicate on Chrome 70 - windows