You need to be logged in to post in the forum - Log In

An active JCE Pro Subscription is required to post in the forum - Buy a Subscription

Support is currently Offline

Official support hours
Monday to Friday
09:00 - 17:00 Europe/London (BST)

Please create a new Ticket and we will get back to you as soon as we can.

#109169 Issue on front page in a multilingual site with non-english language as default

Posted in ‘Editor’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Latest post by Ryan on Thursday, 28 October 2021 11:06 BST

chr_lan
Hello,
I am reporting the following issue encountered on three different multilingual Joomla 4 websites.
How to reproduce ?
- Install a Joomla 4 website using Multilingual Sample Data (PHP 7.4).
- Install another language: french in my case.
- Set System - Language Filter > Remove URL Language Code.
- Install JCE 2.9.16 and set it as default editor.
- Important: set the non-english language as default language.
- Set the default menu item as a single article.
- Set Shared Sessions to Yes in order to use frontend editing.
- Go to the site global home page (without the language code in the URL) and edit the article (should be the non english content).
- Clicking save should trigger an error like this one and won't save any data:

2021-10-23T12:41:52+00:00 INFO ::1 controller Holding edit ID com_content.edit.article.14 Array ( [0] => 14 )
2021-10-23T12:41:52+00:00 INFO ::1 controller Checking edit ID com_content.edit.article.14: 1 Array ( [0] => 14 )
2021-10-23T12:41:56+00:00 CRITICAL ::1 error Uncaught Throwable of type Error thrown with message "Call to a member function format() on bool". Stack trace: #0 /Users/christophelance/Sites/joomla4/libraries/src/Form/Form.php(1149): Joomla\CMS\Form\Field\CalendarField->filter('23-10-2021 13:2...', NULL, Object(Joomla\Registry\Registry))
#1 /Users/christophelance/Sites/joomla4/libraries/src/MVC/Model/FormModel.php(218): Joomla\CMS\Form\Form->filter(Array)…

Note: switching to tiny mce doesn't trigger any error.
Thanks for your help,
Christophe

Ryan
Please send me a login - https://www.joomlacontenteditor.net/contact/site-login

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

Ryan
I'm getting similar errors when opening dialogs from the Joomla buttons below the editor (using JCE or CodeMirror editors) that suggest that this issue migth have another cause, and not specifically to do with JCE.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.

chr_lan
Thanks for spotting that, the buttons at the bottom were blocked by the template switch feature of Admin Tools. I will investigate further.

chr_lan
So far, the only way I found to make JCE work on my home page without language code is to create an override of /components/com_content/tmpl/form/edit.php and edit the form action URL (see screenshot)
It seems to work with all three editors and I haven't seen any downsides yet, but obviously I didn't find the root cause of the bad language redirection or any misconfiguration on my site. Trying to inject the Itemid in the router didn't work.

Attachments

Ryan
I'm also confused as to why this happens only with JCE, as clicking save only initiates a javscript action within JCE, the rest is done by the Joomla API as part of the article component.

Also the error trace does not highlight any JCE functions, but links specifically to the Joomla Calendar field.

Ryan Demmer

Lead Developer / CEO / CTO

Just because you're not paranoid doesn't mean everybody isn't out to get you.