• Resolved crewstyle

    (@crewstyle)


    Hi there,

    There are 2 bugs with the latest version during the demo importer.

    1/ Importing SVG
    When you try to import the Travel demo, the script tries to get sizes (width and height) of an SVG file.
    Which is not possible considering SVG files may not be images.

    One solution is to treat the case this way:
    blocksy-companion/framework/features/demo-install/options-import.php:381
    I’ve added this check:

    
    if ('svg' === $file_array['extension']) {
        $xmlget = simplexml_load_file($file);
        $xmlattributes = $xmlget->attributes();
        $data->width = (int) $xmlattributes->width;
        $data->height = (int) $xmlattributes->height;
    } else {
        $data->height = $meta['height'];
        $data->width = $meta['width'];
    }
    

    2/ Importing widgets
    I’ve got a null value on the get_row() function which means that PHP tries to read ->option_value on null variable in this file:
    blocksy-companion/framework/features/demo-install/widgets-import.php:223

    I’ve add this kind of check:

    
    $single_widget_instances = [];
    $row = $wpdb->get_row(
        $wpdb->prepare(
            "SELECT option_value FROM $wpdb->options WHERE option_name = %s LIMIT 1",
            'widget_' . $id_base
        )
    );
    
    if (!is_null($row)) {
        $single_widget_instances = maybe_unserialize($row->option_value);
    }
    

    Can you please check on your side?

    Thanks a lot.
    Achraf

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author creativethemeshq

    (@creativethemeshq)

    Hi Achraf,

    Thanks a lot for the feedback and for going into details.
    Both of these are confirmed and we will have a fix for them in the next public release.

    Thanks again and have a great day!

    Thread Starter crewstyle

    (@crewstyle)

    Hi core team ??

    Thanks for your feedback.
    I’ll be waiting for this new release so.

    Best regards
    Achraf

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Demo importer bugs’ is closed to new replies.