Hi! We have created a system plugin (Joomla 4, PHP 8.0) to manipulate the article title. We discovered that this system plgun causes issues when JCE is uploading a file. We get this error: "The server returned an invalid JSON response."
We can solve this issue by making a change to the system plugin:
function onContentBeforeSave($context, &$article, $isNew, $data)
When we remove the $data variable, there are no issues. So this $data variable is causing the upload issue.
I am not sure why this is happening. The system plugin should not affect the JCE file upl;oad. Correct?
in the Joomal docs I read this regarding the $data parameter of onContentBeforeSave:
+++++
data: The data to save. Note this data should be already validated by the extension. Since Joomla 3.7. Required to be set by extensions as of Joomla 4.0 as the core joomla content plugin uses this property
+++++
Any thoughts? Should I just leave the $data variable out or should JCE handle this differently?
Kind regards,
Jip
We can solve this issue by making a change to the system plugin:
function onContentBeforeSave($context, &$article, $isNew, $data)
When we remove the $data variable, there are no issues. So this $data variable is causing the upload issue.
I am not sure why this is happening. The system plugin should not affect the JCE file upl;oad. Correct?
in the Joomal docs I read this regarding the $data parameter of onContentBeforeSave:
+++++
data: The data to save. Note this data should be already validated by the extension. Since Joomla 3.7. Required to be set by extensions as of Joomla 4.0 as the core joomla content plugin uses this property
+++++
Any thoughts? Should I just leave the $data variable out or should JCE handle this differently?
Kind regards,
Jip