Black Friday 2026 50% off every plan Our biggest deal of the year on #1 Joomla products.
Ends in 13d 05h 36m 01s
Claim 50% off
Staff replied SP Page Builder Joomla 6 v6.10.0

common.js` Unconditionally Adds `.com-sppagebuilder` to `document.body` on Non-SPPB Pages

Asked by Philip S. Hempel 1 week ago Last activity 1 week ago

common.js Unconditionally Adds .com-sppagebuilder to document.body on Non-SPPB Pages

  • Product: JoomShaper SP Page Builder Pro (com_sppagebuilder)
  • Product Version: 6.10.0
  • Joomla Version: 6.2.0
  • File: components/com_sppagebuilder/assets/js/common.js (line 1)

What the Bug Is

components/com_sppagebuilder/assets/js/common.js runs a DOMContentLoaded listener that unconditionally adds the com-sppagebuilder class to document.body whenever common.js is loaded on a page (for example, via an SP Page Builder module or asset dependency), even when the active component is com_content, com_users, or com_easystore. Templates (including Helix Ultimate) that scope full-width container rules to body.com-sppagebuilder then apply full-bleed page styling to standard Joomla articles, login pages, and store pages.

How to Reproduce It

  1. Publish any module or asset that loads components/com_sppagebuilder/assets/js/common.js on a com_content or com_easystore menu item.
  2. Inspect document.body.classList in the browser console after DOMContentLoaded.
  3. document.body has both com-easystore (or com-content) and com-sppagebuilder, triggering body.com-sppagebuilder #sp-main-body > .container { max-width: 100%; padding: 0; }.

Fix (Unified Patch Against Clean com_sppagebuilder 6.10.0)

--- a/components/com_sppagebuilder/assets/js/common.js
+++ b/components/com_sppagebuilder/assets/js/common.js
@@ -1 +1 @@
-window.addEventListener("DOMContentLoaded",(()=>{const d=document.body.classList;d.contains("com-sppagebuilder")||d.add("com-sppagebuilder")}));
\ No newline at end of file
+window.addEventListener("DOMContentLoaded",(()=>{if(!document.querySelector("#sp-page-builder"))return;const d=document.body.classList;d.contains("com-sppagebuilder")||d.add("com-sppagebuilder")}));
\ No newline at end of file

3 replies

Anne Staff

Hello Philip,

Thank you for the detailed bug report and for providing the reproduction steps and proposed fix. We’ll forward this to our development team for review so they can investigate the issue and take the necessary steps to address it.

Regards

Mehtaz Afsana Borsha Staff

Hi,

Thank you for the detailed bug report, reproduction steps, and proposed patch.

We appreciate your efforts in identifying this issue with SP Page Builder Pro 6.10.0.

Based on your findings, the common.js script appears to add the com-sppagebuilder class to the body element even when SP Page Builder is not the active component. This may cause unintended layout changes on other Joomla pages, particularly when using Helix Ultimate.

Your suggested fix is helpful and provides a possible way to prevent this behaviour. However, we'll need to verify that the proposed condition works correctly across different SP Page Builder layouts and module configurations.

We'll share your findings and proposed patch with our development team for further investigation and review.

Thank you again for your valuable feedback and contribution to improving SP Page Builder.

Best regards.

Philip S. Hempel Asked this

Yes, the patches are just suggestions for how to resolve, a point of reference for what I have used on my site

Mehtaz Afsana Borsha Staff

Thanks for your suggestions.

Log in to reply.