I have been made aware of this issue and I have located the cause of the PHP error. A beta with the fix will be released this coming week.
However, a further complication has arisen, perhaps due to the inclusion of Tinymce 5 in Joomla 4. SP PageBuilder appears to load both Tinymce and JCE on the same page. This causes a conflict between the 2 versions of Tinymce (the core version and the one used by JCE) that causes errors when editing SP Page Builder content with JCE.
The only solution I can see is to not load the core Tinymce editor if JCE is the selected Joomla editor. This can be done by editing administrator/components/com_sppagebuilder/helpers/sppagebuilder.php and adding a condition for loading the editor, eg:
$editor = $conf->get('editor');
if ($editor == 'tinymce') {
if(JVERSION < 4)
{
$doc->addScript(Uri::root(true) . '/media/editors/tinymce/tinymce.min.js');
$doc->addScriptdeclaration('var tinyTheme="modern";');
}
else
{
$wa = $doc->getWebAssetManager();
if (!$wa->assetExists('script', 'tinymce'))
{
$wa->registerScript('tinymce', 'media/vendor/tinymce/tinymce.min.js', [], ['defer' => true]);
}
if (!$wa->assetExists('script', 'plg_editors_tinymce'))
{
$wa->registerScript('plg_editors_tinymce', 'plg_editors_tinymce/tinymce.min.js', [], ['defer' => true], ['core', 'tinymce']);
}
$wa->useScript('tinymce')
->useScript('plg_editors_tinymce');
$doc->addScriptdeclaration('var tinyTheme="silver";');
$doc->addStyledeclaration('.tox-tinymce-aux {z-index: 130012 !important;}');
}
}
// JCE Editor
if ($editor == 'jce') {
require_once(JPATH_ADMINISTRATOR . '/components/com_jce/includes/base.php');
wfimport('admin.models.editor');
$editor = new WFModelEditor();
$settings = $editor->getEditorSettings();
$app->triggerEvent('onBeforeWfEditorRender', array(&$settings));
echo $editor->render($settings);
}
Please pass this on to the SP PageBuilder developers. They can contact me using the email address in my profile. I have made as many changes as I can to address this problem in JCE, but cannot see another solution without the code change above.
Thank you
Ryan Demmer
JCE Developer