SP Page Builder 6.4.0 Frontend Editor Deletes Page Content On Save, Missing Published/access Fields And SQL 1064 - Question | JoomShaper

SP Page Builder 6.4.0 Frontend Editor Deletes Page Content On Save, Missing Published/access Fields And SQL 1064

JM

Janina Meesenburg

SP Page Builder 5 days ago

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.

1
10 Answers
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 4 days ago #223276

Issues resolved! The root cause was a rule in your .htaccess file.

The problematic rule:

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteRule ^index\.php(?:/(.*))?$ /$1 [R=301,L]

This was intercepting all requests to index.php — including the SP Page Builder frontend editor's POST API calls (savePage, saveData). Apache was 301-redirecting them to /?option=..., which caused browsers to convert the POST to a GET, losing the entire request payload. As a result, nothing was saved to the database and the page appeared empty on reload.

Fixed by adding a query string condition, so only clean /index.php URLs (with no query string) get redirected:

RewriteCond %{ENV:REDIRECT_STATUS} ^$
RewriteCond %{QUERY_STRING} ^$
RewriteRule ^index\.php(?:/(.*))?$ /$1 [R=301,L]

The old .htaccess has been renamed to .htaccess.old and the fixed version is now live.

Please test and let us know if everything is working as expected. Thank you!

1
JM
Janina Meesenburg
Accepted Answer
4 days ago #223300

Problem is solved, thanks a lot for your quick and perfect support.🙏😀

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 4 days ago #223305

You are welcome. We greatly value your opinion and would love to hear your feedback about SP Page Builder. If you could spare a moment, it would mean a lot to us!

You can share your review here:

Joomla Extensions Directory

Trustpilot

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 5 days ago #223222

Hello,

Thanks for reaching out to us. Could you please share temporary administrator access to your Joomla backend? You can provide the credentials securely in the hidden content section. Also, please take a full backup of your site before we make any changes.

Once I have access, I’ll investigate further and see what’s causing the issue. Let me know once you’ve shared the details!

Best regards,

0
JM
Janina Meesenburg
Accepted Answer
5 days ago #223227

Thank you for your quick response.

I’ve added the requested login details in the hidden content section.

0
JM
Janina Meesenburg
Accepted Answer
5 days ago #223229

.

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 5 days ago #223230

Please, allow us super admin access to check further.

Thanks

0
JM
Janina Meesenburg
Accepted Answer
5 days ago #223232

I did apply it, please recheck.

0
Ziaul Kabir
Ziaul Kabir
Accepted Answer
Support Agent 5 days ago #223240

Please, try modifying on your end and let us know the update.

We will check further, Issues on your site but on my local end, there is no issues.

Also, make sure your htaccess file correct or you can use fresh htaccess code from Helix Ultimate quickstart.

Thanks for your support.

0
JM
Janina Meesenburg
Accepted Answer
5 days ago #223249

Thanks for ur help, , unfortunately the issue was not fixed.

same error: 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

0