Home>Support>Page Builder

Page Builder

Hello,

i have updated my page builder from 2.4.x to 2.5.x

For each row with more then one cell, page builder generates styles with a comma instead of a dot

width: 33,3333%;
width: calc(33,3333% – ( 0,66666666666667 * 30px ) );

I read about this in an old post https://siteorigin.com/thread/vantage-premium-5/

Maybe this is a Problem in version 2.5?

Thanks, Christian

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 7 years, 2 months ago Alex S
    Hi, I Work Here

    Hi Ch,

    There aren’t any known issues that are like this so we’re not too sure what’s going on.

    Do you have a public URL where we can take a look at what’s going on? Also, would it be possible for you to send me an export for a page that has this issue? To do this open up the page you wish to export in the editor and click Layout button in the Page Builder toolbar. Then click import/export and then click download. Please upload the export to a 3rd party file hosting site such as teknik.io.

  2. 7 years, 2 months ago ch@schoko

    Hi Alex,

    thanks for your reply.

    I made this update to a local copy, not on the live version. So i could not send you a link.

    But i have found the reason of the problem. Because its a german Website the localconv is set by wp to “de_DE” and the decimal_point is a comma “,”. If i set the local to “en_US” or set a str_replace in the generate_css() fucntion in the plugin it works for me.

    public function generate_css( $post_id, $panels_data = false, $layout_data = false) {

    $css->add_cell_css( $post_id, $ri, $ci, ”, array(
    ‘width’ => array(
    str_replace(“,”, “.”, round( $weight * 100, 4 ) . ‘%’),
    str_replace(“,”, “.”, ‘calc(‘ . round( $weight * 100, 4 ) . ‘% – ( ‘ . ( 1 – $weight ) . ‘ * ‘ . $gutter . ‘ ) )’),
    )

    ) );

    Both are not good solutions for me, because i want a updateable plugin and don’t want to set a wrong localconv. It would be great, if you modify the code to be independently from the set locale.

  3. 7 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Ch,

    Unfortunately, while I can’t replicate this issue by switching to WordPress to German, you’ve definitely given us direction. I’m going to bring this up with the development team.

  4. 7 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Ch@schoko

    Thanks. We’ve worked out why this may happen but, unfortunately, we still can’t replicate this issue so we can’t be sure. Can you please send me a copy of your php.ini (it may not help, but it may so it’s worth a try)? Also, if there’s anything else you think that may help us in replicating this issue we would really appreciate that also.

  5. 7 years, 1 month ago ch@schoko

    Hi Alex,

    here some info that could help:

    if create a test.php on my server an call localeconv() it returns a array with the following data:

    array(18) {
    [“decimal_point”]=>
    string(1) “,”
    … more data
    }

    If i call localconv() in a wp file like the footer.php it returns a array with the following data:

    array(18) {
    [“decimal_point”]=>
    string(1) “.”
    … more data
    }

    Because i use the german WP-Version or some other reasons the local is set to ‘de_DE’. So floats has a “,” as seperator.

    With the function setlocale(…) you should be able to test this. Here a example

    echo var_dump(3/2); // float(1,5)

    setlocale(LC_NUMERIC, ‘en_US.UTF8’);
    echo var_dump(3/2); // float(1.5)

    setlocale(LC_NUMERIC, ‘de_DE.UTF8’);
    echo var_dump(3/2); // float(1,5)

  6. 7 years, 1 month ago Alex S
    Hi, I Work Here

    Hi Ch,

    We’ve tried setting the WordPress language to de_DE and that didn’t allow us to replicate this issue – we’ve also tried it on a few dedicated German sites and the issues didn’t occur there either. To clarify, while we can forcefully correct this issue using the method outlined, we need to work out how it’s occurring as it doesn’t appear to only be related to the WordPress language setting. Does that make sense?

  7. 7 years, 1 month ago ch@schoko

    Hi Alex,

    i have created a new wp website on a test-server: http://clients.schokoladenseite.net/test/?page_id=2

    In this clean installation the pagebuilder works with floats like 33.3333 (on a german server with the german wp installation)

    But if i add in the plugincode the following code: setlocale(LC_ALL, ‘de_DE’);

    the format of floats is like 33,3333

    the inline style of the three blocks on the test page have the following values.

    width: 33,3333%;
    width: calc(33,3333% – ( 0,66666666666667 * 30px ) );

    I think on the website with the problem, a config or plugin calls the setlocale(LC_ALL, ‘de_DE’) so the pagebuilder is broken on this page.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More