When using Joomla Custom field type Editor with Editor-None, Codemirror, then Joomla editor-xtd buttons are not working. When I click on any of buttons (except Read More) they are not working. For example if I click Media the screen gets grey transparent overlay but modal window doesn't show up.
Additional information - on main tab Content those xtd buttons works. They only not working on Joomla Custom fields.
When clicking on Joomla editor-xtd buttons then modal window popup should show up so you can choose for example to insert Article (link), Media (image), Menu (link), etc.
You will see that modal windows is not opening, and you can not do anything with those buttons
My Desktop
OS: macOS Monterey
Browser: Chrome ver. 107, but same in Firefox and Safari
CMS
Joomla 4.2.5
Linux server
PHP 7.4
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Hi, I checked, but there is no javascript errors in the browser console.
Also on Network tab of browser developer tools I don't see any request with 404 status.
Confirmed
Labels |
Added:
bug
|
There should be an older issue for this one (edit: #37297) but anyways I will try to explain what is happening, what is actually wrong in the Joomla codebase and the 3 possible ways to fix this. The default editor is rendered in the first tab of the article edit form. In that tab also ALL the modals are rendered (echoed from PHP if you prefer). The tab Fields
that has the second instance of the editor has ONLY the buttons (bellow the none/codemirror). The problem (is not unique to this case, it also happens in the toolbar and other places where the modal could be under a hidden div/section/etc) is that the modal when it's being called will never appear because one of the parent elements has a display:none
, it is hidden, so you only get the backdrop. Great stuff!
How to solve it? There are some nasty hacks and some nice ways (you pick your poison):
Pick your poison...
I think I found a 4th one, please see #39287 :)
@OctavianC that would work but also explodes the number of elements in a page (in other words it won't scale, so also tinyMCE is wrong in that case. Probably I'm the one to be blamed there)
I agree, but on the other hand, I don't think you'll stumble upon that many editor instances on a single page...
Hi, just to mention, there can be variable number of editors on a single page on article, when using custom fields.
You can have some fixed number of custom fields type Editor,
and also variable number of editors when using editors within Subform field with repeatable option.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-11-23 22:46:52 |
Closed_By | ⇒ | richard67 |
I have tested this, #39287 and #39295, and both works for me. Great job!
Please check your browser console for any javascript errors