Demo importer bugs
-
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 anull
value on theget_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
- The topic ‘Demo importer bugs’ is closed to new replies.