Skip Navigation

[Closed] Error messages after migrating website.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 22 replies, has 2 voices.

Last updated by Christopher Amirian 1 year, 7 months ago.

Assisted by: Christopher Amirian.

Author
Posts
#2640413

I've launched another website and am having problems with Toolset after the migration from the development subdomain to the root domain. I was forced to do a manual migration, which I know is not ideal. We tried using Duplicator Pro and it failed due to fatal errors. So I migrated manually and replaced all instances of the URL in the MySQL database to use the root domain, not the subdomain.

I've usually been able to do this with some difficulty but nothing too bad to where I couldn't figure it out and fix it. But this time with debug mode on, I'm seeing many more non-fatal errors that I'd like to resolve. Some of them involve Toolset.

We currently see the following errors on a page that is heavily reliant on Toolset.

Warning: Undefined array key 0 in /______/________/public_html/wp-content/plugins/toolset-blocks/application/models/WooCommerce/WcQuery.php on line 428

Warning: Undefined array key 0 in /______/________/public_html/wp-content/plugins/toolset-blocks/application/models/WooCommerce/WcQuery.php on line 428

Can you assist in figuring out what is causing this?

Note that I have gotten us past two fatal errors and am still seeing lots of issues that have me worried the site may be very broken. But I don't think all of these errors/warnings are related to the migration. We have some errors/warnings showing on the development site as well.

#2640483

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I searched our forum and did not find any instances of a report like that. This leads me to guess that it might be related to the migration.

But you can easily test by checking the development environment and see if the same warning is there or not.

The only thing that I can suggest at the moment is to make sure you have a backup and using the latest version of Toolset plugins:

https://toolset.com/faq/how-to-install-and-register-toolset/#automatic-update-requires-registration

Thanks.

#2640517

This particular error is also happening on the development site, so this one isn't because of the migration. It's actually a warning, not error.

In the file shown as having the problem I'm seeing these lines:

426 // Get order + orderby args from string.
427 $orderby_value = is_array( $orderby_value ) ? $orderby_value : explode( '-', $orderby_value );
428 $orderby = esc_attr( $orderby_value[0] );
429 $order = ! empty( $orderby_value[1] ) ? $orderby_value[1] : $order;
430 } else {
431 // $orderby might be a string containing order + ordeby if it comes from a search URL parameter, as above.
432 $orderby_value = explode( '-', $orderby );
433 $orderby = esc_attr( $orderby_value[0] );
434 $order = ! empty( $orderby_value[1] ) ? $orderby_value[1] : $order;
435 }

Any idea how to stop this warning.

Ugh, now I'm seeing an error too. It's saying

Date: [03-Sep-2023 13:47:00 UTC]
Type: PHP Fatal error
Message: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, bool given
In: /_____/________/public_html/wp-content/plugins/toolset-blocks/backend/Services/ViewParsingService.php:216

Something is wrong with Toolset Blocks here. Any suggestions?

Remember that Duplicator Pro also failed with the migration so I don't know that I have an option other than manual migration.

#2640971

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

After searching for the warning that you shared, the only thing that popped up was this:
https://toolset.com/forums/topic/fatal-error-28/

Which was a compatibility issue with the woocommerce brands plugin. Maybe this can identify if there is a compatibility issue:

- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except Toolset plugins.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.

Thanks.

#2641071

We're not using the Woocommerce Brands plugin, so I'm not sure here.

Now I just got another fatal error. This is one that is NOT happening on the development site.

Fatal error: Uncaught TypeError: Argument 2 passed to OTGS\Toolset\Views\Controllers\Admin\ContentTemplate::set_default_content_template_meta() must be an instance of WP_Post, null given, called in /_____/________/public_html/wp-includes/class-wp-hook.php on line 310 and defined in /_____/________/public_html/wp-content/plugins/toolset-blocks/backend/Controllers/Admin/ContentTemplate.php:138 Stack trace: #0 /_____/________/public_html/wp-includes/class-wp-hook.php(310): OTGS\Toolset\Views\Controllers\Admin\ContentTemplate->set_default_content_template_meta(0, NULL, false) #1 /_____/________/public_html/wp-includes/class-wp-hook.php(334): WP_Hook->apply_filters(NULL, Array) #2 /_____/________/public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #3 /_____/slicecre/public_html/wp-includes/post.php(4762): do_action('wp_insert_post', 0, NULL, false) #4 /_____/________/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/inc/autoloaded/field/group/factory.php(347): wp_insert_post(Array in /_____/________/public_html/wp-content/plugins/toolset-blocks/backend/Controllers/Admin/ContentTemplate.php on line 138

This one happened when I tried to go to an admin page for our theme. It is a template builder page. I was trying to address a problem with the site's main menu not displaying on mobile devices. But when I went to the page to try to edit the header template, I was stopped with this fatal error. This is not looking good. I have no idea why all of this is suddenly happening. I'm seeing errors I've never seen before, some of which are on the live site only, but some of which are on both the live site and the development site.

#2641473

I just tried disabling Toolset Blocks and installing Toolset Views. I then tried to access the same page that caused the error described above and I still got the same error.

I have no idea why all of this is happening. At this point I'm just hoping I don't have to rebuild the entire website from scratch due to having no solution for the errors it is producing.

#2641807

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

The best way to go forward is to check the development website and give us an error that happens there to follow up as it will eliminate the possibility of being a problem migrating the website.

I'd appreciate it if you could provide us the login information of the development website and tell us the steps to reproduce the issue and we will check.

Please set the next reply as private to share the login information and we will need your permission to copy the development website to our server if needed a deeper dive into the issue.

Thanks.

#2642207

Hey, now I'm no longer getting that red Site Errors admin menu item at all in the dashboard. This is an extremely positive development. The WP Memory plugin that showed this is now working as it should and not reporting errors on the development site. It hasn't done this the whole time. I don't know if you fixed things further at all in there, but this has me very hopeful that Duplicator Pro might work this time. I am going to have the client repurchase Duplicator Pro so we can try it again. I previously had her get a refund because I couldn't get it to work.

Let me try that again now before you look around the live site.

#2642511

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

I'm glad that the issues are fixed on the development website, I did not do anything as now I wanted to see the backend.

Thanks.

#2643551

OK, I tried Duplicator Pro again. I did get farther this time, but I'm still having problems on the live site. I'm getting the following message when I go to the Plugins page:

Toolset plugin cannot connect to toolset.com
Toolset needs to connect to its server to check for new releases and security updates. Something in the network or security settings is preventing this. Please allow outgoing communication to toolset.com to remove this notice.

Need help?

See the communication error details and let us know in Toolset technical support.

#2643575

I'm now also seeing that the live site is getting this warning again when I go to this page:

hidden link.

Date: [13-Sep-2023 09:14:12 UTC]
Type: PHP Warning
Message: Undefined array key 0
In: /_____/________/public_html/wp-content/plugins/toolset-blocks/application/models/WooCommerce/WcQuery.php on line 428

Let me know if you need admin access on the live site at this point. I have no idea why this is happening and my frustration level with it is very high right now. It seemed like Duplicator Pro worked this time, but I'm still seeing problems.

During the Duplicator Pro import process on the live site, it said that there may be problems because we're moving from PHP 7.4 to PHP 8.2 and the mismatch may cause problems. But we're not doing that. In our cPanel, it says our domain is using PHP 7.4 just like on the development site. We'll upgrade that once everything is working, but I have no idea why Duplicator Pro said we're using PHP 8.2. I just tried upgrading it to PHP 8.0 to see what would happen and that seemed to go OK. I'm not seeing new problems from doing that, so I guess I can leave it there. But Duplicator Pro saying what it said is the only clue I have that could point to why this is happening.

#2643957

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

Ok, the Toolset connect issue is a new thing and it is indeed a server-related one that needs to be addressed.

Please contact your live website hosting service provider and ask them to make sure there is access to the following:

hidden link

Check if they have any sort of firewall preventing the connection.

You can also go to the WordPress admin to this page: YOURWEBSITE/wp-admin/admin.php?page=otgs-installer-support

There you will see a complete log of the connection errors.

Regarding the PHP version, we do not support PHP version 8.2 yet. So you need to keep it within 8.0.x.

You can provide the debug information in the next reply which will show us what version Toolset detects the PHP is.

https://toolset.com/faq/provide-debug-information-faster-support/

Regarding the PHP warning, it might be PHP version-related, but please consider that the warning is not preventing the website from working.

You can always turn off reporting in WordPress:

Would you please access your website files and edit the "wp-config.php" file on the root folder of your WordPress installation and add the code below into the file:

define( 'WP_DEBUG', false );

Please add the code above the line below:

/* That's all, stop editing! Happy blogging. */

That will turn off warnings.

Thanks.

#2644407

I thought I sent a reply, but now I'm not seeing it. Resending here.

The message on the Toolset admin page you steered me to is as follows:

toolset: Unable to register: Site key not matching subscription-fetching 2023-15-09 09:09:20

Can I see if you have an easy fix for this before I contact our ISP?

Understood on not using PHP 8.2.

Regarding the warning message, it is not impacting front-end site functionality as far as I can tell. But it is preventing a plugin called WP Memory from working in the admin area. The message that plugin is giving says:

Your site has errors. Here are the last lines of the error log files.
Our plugin can't function as intended. Errors, including JavaScript errors, may lead to visual problems or disrupt functionality, from minor glitches to critical site failures. Promptly address these issues before continuing because these problems will persist even if you deactivate our plugin.

This is a plugin we installed to help us with trying to improve site performance. I'd like to get this working again. This Toolset warning looks like it is the only one that is still happening. We had other errors in here, but the Toolset one is the only one that is dated today. The rest are from 2 days ago at least and may be resolved. So it would be preferable if we could stop this warning rather than ignoring it because it isn't impacting front-end functionality. I don't know how I stopped it on the development site, but once I stopped getting any current errors or warnings on new page loads there, that plugin message above went away and the plugin started working again. That's what prompted me to go ahead with trying Duplicator Pro again. Thanks if you can help stop this warning.

#2644409

I included the debug information in the above post.

#2644649

Christopher Amirian
Supporter

Languages: English (English )

Hi there,

The "toolset: Unable to register: Site key not matching subscription-fetching 2023-15-09 09:09:20" error is an indication that the Site Key used on the website does not match what you have added in https://toolset.com/account/sites/

Please follow the steps below to re-register Toolset on the new website:

- Make sure that you are logged in to toolset.com.
- Go to "WordPress Dashboard > Plugins > Add New > Commercial (Tab)".
- Click the "Untrgister" link to unregister the website.
- Click the "Register WPML" at the right section of the screen.
- Click the "Get a key for this site" link annotated in the screenshot below.
- A new page will open up and the auto-generated key will show in pop-up.
- Copy the key and paste it into the "Site Key" input box annotated in the screenshot below.
- Click the "OK" button.

----------------------

The warning should not have any impact on other plugins as it is an internal Toolset code. The best way to test is to deactivate Toolset plugins and see if you still have issues working with that plugin or not.

The only thing that I have found in our reported issues regarding the warning in question is this ticket:

https://toolset.com/forums/topic/product-archives-show-no-result-after-updating-to-toolset-views-3-5-2/#post-2075259

DSo maybe something that you can check and see if you used such custom field to do order by in a Woocommerce archive page or not on your website.

Other than that I have no other clue regarding the warning itself.

The topic ‘[Closed] Error messages after migrating website.’ is closed to new replies.