1

I have been successfully using a homemade article including a form and some javascript for a while now on Joomla 3 which also uses the Regularlabs Sourcerer plugin.

Turns out that I recently migrated this article to Joomla 4.1.1 (so far) as part of my website upgrade attempt and the script breaks.

Looking into what was saved, I figured that the select "onChange" element was transformed into "on-change"!

I then tried with a basic minimum code indicated below (nothing fancy) and here's what came out after save:

<select name="optone" size="1" id="optone" on-Change="javascript:setOptions(this.value)">
<option value="0">Choose a type</option>
<option value="1">Sports</option>
<option value="2">Educational</option>
</select>

I have tried to see if this could come from the editor I use, switching from JCE to TinyMCE, with no luck.

Could this be looking like a Joomla 4 "uncommented feature"?

1

1 Answer 1

1

Well, in fact, I found the issue. It is related to some settings of the editor. I will contact the developer.


[EDIT] Developer contact is unavailable if you don't have a paid subscription etc.

Anyway, what happens is that the Joomla 4 version of the editor (JCE) settings include a sort of HTML 4/5/Mixed validation switch.

By default, this validation is activated and this is what causes onChange to be changed to on-change which, obviously, prevents the script from working as expected.

If you deactivate the switch, the behavior goes back to normal.

Since I could not touch base with the developer, I could not raise a flag and/or get information about why this change happened.

1
  • Please accept your own answer to mark this question resolved. If someone adds another answer in the future and you think it adds more value than your own answer, you can always move the green tick.
    – mickmackusa
    Apr 26 at 10:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.