SPPB 5.0.10 Auto Fix Problems With Legacy Layouts Not Fixing Issue - Question | JoomShaper
Black Friday sale is live with flat 50% OFF. Sale ends soon! Grab your deal now!

SPPB 5.0.10 Auto Fix Problems With Legacy Layouts Not Fixing Issue

‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎

‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎

SP Page Builder 2 years ago

I have tested the new SPPB 5.0.10 and found two things.

  1. typo in dialog-modal "Noew fixing:"
  2. the new feature "New: Implemented a feature to fix legacy page content for improved compatibility" does not fix my issue.

SPPB 3.x:

SPPB 5.0.10 after running the automated fixing tool:

0
8 Answers
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
2 years ago #132478

There is a strange css rule within the head:

<style>@media(min-width: 1400px) {.sppb-row-container { max-width: 1140px; }}</style>

This is not defined by the custom-css of sppb and helix-ultimate.
This rule is inserted by the SPPB it self.

/site/helpers/helper.php:

        public static function addContainerMaxWidth()
        {
                $doc = Factory::getDocument();
                $params = ComponentHelper::getParams('com_sppagebuilder');
                $containerMaxWidth = $params->get('container_max_width', 1320);
                $doc->addStyleDeclaration("@media(min-width: 1400px) {.sppb-row-container { max-width: " . $containerMaxWidth . "px; }}");
        }

After some more digging around I have found the issue.

/administrator/index.php?option=com_sppagebuilder&view=editor&tmpl=component#/settings

Why is there a different default value then the php-script uses?!
In the settings the defaultvalue is 1140 and in the php script it is 1320.
The value in the settings can not be deleted that the default value of php is used.
Instead the SPPB always sets the value 1140, even if the field is empty.

Update:
After I have changed the value within the SPPB-Setting to 1320, the layout is fixed now.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #130935

Hi there,

I appreciate you reaching out. I sincerely apologize for this oversight. I have shared your JSON file to check the issue.  

-Thanks

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #132092

Please update the latest version and let me know. Thanks

0
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
2 years ago #132475

The typo has been corrected, but the fixing tool still does not correct the layout.

0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #132480

I have checked the settings to change the width and it works from my end. Thanks

-1
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
2 years ago #132485

I have not denied that the setting is not possible, but that the field can not be saved as empty, that always the default value of the php script is used.
The interface says that it has saved the empty value, but as soon as you reload the settings, the old value 1140 is back in it.
If you check this via the developer console and look at the ajax that saves the settings, you will see that in the reload after saving the old value is also delivered again.

/administrator/index.php?option=com_sppagebuilder&task=/editor.applicationSettings&_method=get

{
    "success": true,
    "message": null,
    "messages": null,
    "data": {
        "production_mode": 0,
        "gmap_api": "",
        "ig_token": {
            "appId": "",
            "appSecret": "",
            "accessToken": "",
            "igId": ""
        },
        "fontawesome": 1,
        "google_fonts": "1",
        "lazyloadimg": 0,
        "lazyplaceholder": "https:\/\/res.cloudinary.com\/joomshaper\/image\/upload\/v1582107175\/placeholder.svg",
        "disableanimatecss": 0,
        "disablecss": 0,
        "disable_og": 0,
        "fb_app_id": "",
        "disable_tc": 0,
        "joomshaper_email": "[email protected]",
        "joomshaper_license_key": "a3ecd0839ee59895bb5f67583fc63ce6",
        "disable_google_fonts": 1,
        "google_font_api_key": "undefined",
        "enable_frontend_editing": 1,
        "container_max_width": 1140,
        "colors": []
    }
}

Update:
save payload:
/administrator/index.php?option=com_sppagebuilder&task=/editor.applicationSettings

production_mode: 0
gmap_api: 
fontawesome: 1
google_fonts: 1
lazyloadimg: 0
lazyplaceholder: res.cloudinary.com/joomshaper/image/upload/v1582107175/placeholder.svg
disableanimatecss: 0
disablecss: 0
disable_og: 0
fb_app_id: 
disable_tc: 0
joomshaper_email: [email protected]
joomshaper_license_key: a3ecd0839ee59895bb5f67583fc63ce6
disable_google_fonts: 1
google_font_api_key: undefined
enable_frontend_editing: 1
container_max_width: 
ig_token: {"appId":"","appSecret":"","accessToken":"","igId":""}
colors: []
_method: PUT
0
Toufiq
Toufiq
Accepted Answer
Senior Staff 2 years ago #132487

I have informed our team. Thanks

0
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
‏‏‎ ‎J‏‏‎‎e‏‎‏‏‎‎n‏‏‎‎s W.‏‏‎
Accepted Answer
2 years ago #132486

I did again dig more deeply within your sourcecode.
./admin/editor/traits/ApplicationSettingsTrait.php

Your script simply forces the value of 1140.

                $containerMaxWidth = $this->getInput('container_max_width', 0, 'INT');
                $containerMaxWidth = max(1140, $containerMaxWidth);

There is no way you could save the width as empty value.
The function "max" will always make sure you have 1140 as value if nothing or smaller is given.

If you could do this, please provide a screencast where you show how todo this and which version of SPPB you are using.
I have checked this with Version 5.1.1.

0