New demo content installer
Hi!
I've just updated to Unyson 2.4.10 and updated all Unyson extensions, but once i removed {theme}/auto-install/ directory and created {theme}/demo-content/{demo-name}/ "Content install" page is gone from Tools menu.
Also i tried to register demo data from Hook, as described in documentation, without result.
Is it possible that Backup extension was not updated, because it seems it works in the same way as previous Backup?
We didn't touched the old Backup extension. It should work as always without any changes.
Also i tried to register demo data from Hook, as described in documentation, without result.
It should work. Make sure your hook is executed.
Ok, as i understand, "Backup & Demo Content extension" is not the same as old "Backup" extension, but how can i install and activate new backup extension? It is not present in WP admin in /wp-admin/admin.php?page=fw-extensions page
You need to remove 'backup' (old backup) from your theme manifest 'supported_extensions'
Sorry, but i can't confirm that this extension works fine:
-
I can't create full database backup. "Create Full Backup Now" button doesn't create any archive when it finished, and it is not displayed in the list
-
demo data installer is not working: https://yadi.sk/i/a3jRHcZpkag5Q
-
Please check the Activity Log for errors
-
I think your mysql user is not allowed to create tables ( can you check that? )
My activity log is following:
3 mins ago Files Export: Failed to copy: D:/Cloud/OpenServer/domains/mytheme.local/www/wp-content/plugins/unyson/framework/extensions/shortcodes/extensions/page-builder/includes/page-builder/includes/items-corrector/class-page-builder-items-corrector-row-container.php
mysql has right permissions (i installed WordPress, it creates tables) and when i activate additional plugins like Ninja Forms, they are available to create new tables in DB
Failed to copy: D:/.../class-page-builder-items-corrector-row-container.php
If it's Windows, the problem may be in path length limit. Our extensions are nested and the full path of the extension may be very long and reaches the Windows limit. Can you google "how to increase windows path length limit" and try to do that and let us know if it fixes the problem?
or try to move your server root folder to make the path as short as possible (for e.g. move the www/ directory in D:/www/, that will cut /Cloud/OpenServer/domains/mytheme.local from path)
you're right, the problem may be in this, i'll check it now. Thank you again for your great support!
mysql has right permissions (i installed WordPress, it creates tables) and when i activate additional plugins like Ninja Forms, they are available to create new tables in DB
Strange. Please try to create the same table name from code. Add in {theme}/functions.php:
add_action('fw_init', function(){
global $wpdb; /** @var WPDB $wpdb */
fw_print(
$wpdb->query(
'CREATE TABLE _fwbk_wp_ninja_forms_fav_fields ('.
' `id` bigint(20) unsigned NOT NULL '.
')'
)
);
});
thank you, problem #1 was resolved, the problem was in a path length (i'm using Windows)
the problem #2 still exists:
add_action('fw_init', function(){
global $wpdb; /** @var WPDB $wpdb */
fw_print(
$wpdb->query(
'CREATE TABLE _fwbk_wp_ninja_forms_fav_fields ('.
' `id` bigint(20) unsigned NOT NULL '.
')'
)
);
});
returns false, but when i try to create another table, e.g.
add_action('fw_init', function(){
global $wpdb; /** @var WPDB $wpdb */
fw_print(
$wpdb->query(
'CREATE TABLE _my_test_table ('.
' `id` bigint(20) unsigned NOT NULL '.
')'
)
);
});
it returns true.
is it possible that the problem in a table name length again? but what if i can't to rename table for demo installation, e.g. tables for third-party plugins
http://stackoverflow.com/a/6868316 says the length limit is 64, _fwbk_wp_ninja_forms_fav_fields is 31.
Maybe your server has a custom (lower) length limit? Can you check that?
i've just created a test table via phpMyAdmin with 35 characters in name, so i believe this is not a reason of problem. fw_print displays "false", because "_fwbk_wp_ninja_forms_fav_fields" table was already created when i tried to install a demo content (although it fails with "Failed to create tmp table _fwbk_wp_ninja_forms_fav_fields").
If i remove _fwbk_wp_ninja_forms_fav_fields and try to create it again with simple $wpdb query, it creates without problem.
I'm using: MySql 5.5.35 php 5.3.27 Apache 2.2.26
it creates without problem.
what fw_print() shows when it creates without problem?
it displays "true"
Can you check your apache error log to see if there are some errors related to CREATE TABLE ? (Maybe the encoding is not supported)
P.S. The error happens here
You can add here
file_get_contents('http://requestb.in/1m9x7at1?s='. urlencode($sql));
reproduce the error, then check this link to see the sql and try to run the same sql in your {theme}/functions.php like here https://github.com/ThemeFuse/Unyson/issues/1029#issuecomment-158203987
Here is an error:
[You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'order int(11) NOT NULL, data longtext NOT NULL, name varchar(255) NOT NULL, PRIM' at line 2]
SQL query: http://requestb.in/1m9x7at1?inspect
CREATE TABLE _fwbk_wp_ninja_forms_fav_fields ( id int(11) NOT NULL AUTO_INCREMENT, row_type int(11) NOT NULL, type varchar(255) NOT NULL, order int(11) NOT NULL, data longtext NOT NULL, name varchar(255) NOT NULL, PRIMARY KEY (`id`)) ENGINE=InnoDB AUTO_INCREMENT=93 DEFAULT CHARSET=utf8
is it possible that my MySQL 5.5.35 doesn't met Unyson requirements? What is minimum mySQL version should be?
I think order is the problem, it's a special keyword in mysql (ORDER BY).
Please replace this line with
$cols_sql[] = '`'. esc_sql( $col_name ) . '` ' . (
Now i get following error :) https://yadi.sk/i/YoEJIBZmkakRA
Please check again apache error log