Replacing fails for options table
-
Hi there,
this Plugin works fine for all tables…except the options table. Here I get an error. Decreasing the number of pages doesn’t help.
There is an old thread here, but it is closed:
https://www.ads-software.com/support/topic/error-processing-options-table/
People suggest switching to PHP 7.1…but we cannot do that.Is there another way of solving this?
Thanks ??
-
Hi there!
Better Search Replace Support Team here, Thanks for reaching out with your query we would be happy to assist
Have you tried setting the Max Page Size to1000
and Max Results to20
which is the lowest possible values for both?
If the issue persists, can you please try editing your wp-config.php file on the server to replace this line:define( 'WP_DEBUG', false );
With these lines –define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
This will cause all runtime errors, warnings, and notices to be written to/wp-content/debug.log
, which will hopefully yield some better information about what’s going on.
Can you please try the process again and then send on thedebug.log
file if created?
More details about that at https://www.ads-software.com/support/article/editing-wp-config-php/#wp_debug
Once we have finished troubleshooting, you should revert that config change and delete the debug.log file.Thank you. The Max Page Size is already at 1000. But I cannot find the Max Results Setting. Where is it?
OK,. I did this. The only error (not warning) is this:
PHP Fatal error: Uncaught Error: Cannot access property starting with “\0” in /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php:354There is an error stack with 19 elements just after that. Do you need that too?
- This reply was modified 1 year, 4 months ago by Gerdski.
Hi @gerdski ,
Thanks for the information about the Fatal error. Yes, please also send us the error stack for this particular error.
I checked our internal tickets, and I’ve only seen one other ticket similar to this. It seems a record in your options table has some type of Object data that Better Search Replace cannot handle. However, I’m not sure if there is a resolution to the issue.
As an alternative, you can try our other plugin WP Migrate Lite. It also has a Find and Replace tool, which maybe can handle the data in your options table.
Thanks for the hint to install your other plugin. But will it be possible to select just one table for replacing in the free version? We have too many tables here which are too big…this will not work.
Here is the full error stack that we had:
PHP Fatal error: Uncaught Error: Cannot access property starting with "\0" in /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php:354
Stack trace: 0 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php(341): BSR_DB->recursive_unserialize_replace('https://before…', 'https://after…', Object(WC_Product_Simple), false, 'off') 1 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php(341): BSR_DB->recursive_unserialize_replace('https://before…', 'https://after…', Array, false, 'off') 2 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php(335): BSR_DB->recursive_unserialize_replace('https://before…', 'https://after…', Array, true, 'off') 3 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php(341): BSR_DB->recursive_unserialize_replace('https://before…', 'https://after…', 'a:1:{s:32:"c5c1…', false, 'off') 4 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php(335): BSR_DB->recursive_unserialize_replace('https://before…', 'https://after…', Array, true, 'off') 5 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php(275): BSR_DB->recursive_unserialize_replace('https://before…', 'https://after…', 'a:21:{s:4:"cart…', false, 'off') 6 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-ajax.php(144): BSR_DB->srdb('wp_options', 5, Array) 7 /www/htdocs/mywebsite/wp-includes/class-wp-hook.php(308): BSR_AJAX->process_search_replace('') 8 /www/htdocs/mywebsite/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters('', Array) 9 /www/htdocs/mywebsite/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 10 /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-ajax.php(78): do_action('bsr_ajax_proces…') 11 /www/htdocs/mywebsite/wp-includes/class-wp-hook.php(308): BSR_AJAX->do_bsr_ajax('') 12 /www/htdocs/mywebsite/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(NULL, Array) 13 /www/htdocs/mywebsite/wp-includes/plugin.php(517): WP_Hook->do_action(Array) 14 /www/htdocs/mywebsite/wp-settings.php(617): do_action('init') 15 /www/htdocs/mywebsite/wp-config.php(100): require_once('/www/htdocs/w01…') 16 /www/htdocs/mywebsite/wp-load.php(50): require_once('/www/htdocs/w01…') 17 /www/htdocs/mywebsite/wp-admin/admin.php(34): require_once('/www/htdocs/w01…') 18 /www/htdocs/mywebsite/wp-admin/tools.php(40): require_once('/www/htdocs/w01…') 19 {main} thrown in /www/htdocs/mywebsite/wp-content/plugins/better-search-replace/includes/class-bsr-db.php on line 354Is there a Version of WP Migrate Lite that can only take one table (the options table)?
Hi @gerdski ,
Yes, it’s possible to search and replace only one table with WP Migrate Lite. To do this, please select the Database dropdown > Select “Search only in selected tables below” > Deselect All > Select wp_options. Please see screenshot – https://share.getcloudapp.com/eDuERbY4
Please try the WP Migrate lite plugin first. If that did not resolve the issue, please let us know so we can dig deeper with the error you’ve provided.
Great…the Search&Replace has worked with the WP Migrate lite plugin.
Thanks a lot! Problem solved ??
- The topic ‘Replacing fails for options table’ is closed to new replies.