Hello,
I am reporting a serious SP Page Builder frontend editor issue.
When editing a page with the SP Page Builder frontend editor and clicking Save, the page content becomes empty/deleted and the save fails.
The same page saves correctly when using the SP Page Builder backend editor.
Environment:
- Joomla: 6.1.0
- SP Page Builder Pro: 6.4.0
- PHP: 8.3.x
- Database: MariaDB 11.8.x
- Web server: Apache with PHP-FPM
- Joomla debug: Off
- Joomla error reporting: Default
Error returned by the frontend save request:
Warning: Undefined array key "published" in /components/com_sppagebuilder/controllers/page.php on line 734
Warning: Undefined property: stdClass::$access in /components/com_sppagebuilder/models/form.php on line 467
{"status":false,"message":"42000, 1064, You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '' at line 1"}
The browser console also shows:
Uncaught (in promise) SyntaxError: Unexpected token '<', "<br /><b>"... is not valid JSON
This seems to happen because PHP warnings are returned before the JSON response.
Relevant code location:
/components/com_sppagebuilder/controllers/page.php
Around line 734:
$data = $input->json->get('data', [], 'ARRAY');
if ($data['published'] === '')
{
$data['published'] = '0';
}
This appears to assume that "published" always exists in the frontend save payload.
/components/com_sppagebuilder/models/form.php
Around line 467:
$data['view_id'] = !empty($data['view_id']) ? $data['view_id'] : 0;
$data = (object) $data;
$this->setState('filter.access', $data->access);
This appears to assume that "access" always exists in the frontend save payload.
Tests already performed:
- Disabled Joomla cache
- Cleared Joomla cache
- Switched default editor from JCE to TinyMCE
- Confirmed Joomla debug is off
- Confirmed error reporting is default
- Enabled relevant SP Page Builder plugins
- Tested in a browser without extensions
- Backend editor save still works correctly
- Frontend editor save still fails and empties page content
Expected result:
The frontend editor should save the page without deleting content.
Actual result:
The frontend editor save request fails with SQL 1064 and the page content becomes empty.
Possible cause:
The frontend save request appears to be missing the "published" and "access" values, but SP Page Builder uses those values without checking if they exist. This causes PHP warnings and then an invalid SQL query.
Could you please provide an official fix or patch for SP Page Builder 6.4.0?
I would prefer not to manually modify vendor files unless your technical team confirms the correct solution.
Thank you.