Skip Navigation

[Resolved] Issues after DB upgrade while updating Toolset Type plugin from 3.3.7 to 3.4.17

This support ticket is created 2 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 25 replies, has 3 voices.

Last updated by Minesh 2 years, 5 months ago.

Assisted by: Minesh.

Author
Posts
#2523757
old.png
new.png

I am trying to:
Upgrade Toolset Types and View plugins to the latest version.

I expected to see:
The relationship between posts are not correct after upgrading the database when prompted by Toolset plugin after update.

For reference
https://toolset.com/forums/topic/db-upgrade-error-while-updating-toolset-type-plugin-from-3-3-7-to-3-4-16/

Earlier I put the upgrade on hold, but now I am planning to upgrade again. As expected the issue persists when I update the plugin and then upgrade the DB as notified by the plugin.

The plugin renames the old 'wp_toolset_associations table' to 'wp_toolset_associations_old' and creates a new table instead. I think the issue is occurring because the row ids are reset.

Let's take an example of author relation: Author relates to Articles CPT with many to many relationship.

In old screenshot you can see the ids are reset (as expected from a new table) but you will also notice the the parent id (author) was 9177 and its child (article) was 10240 earlier which is now changed to 1 and 2 now.

The author with ID 9177 still present in the article CPT but I double checked and 9177 is not present in the associations table now.

Is this causing the issues?

#2524323

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

It should not create any issues.

Before doing any migration I suggest that you should take full backup of your database and website so in any worst case you will have a complete backup with you and you can restore it.

I suggest you should try to follow the following steps:
- Take full backup of your database and website
- Update Toolset plugins
- check all relationships are correct if yes:
- Edit few posts and which are involved in post relationship and check all related posts are displayed with post-relationship box

If you see all related posts are displayed then everything should be find and you are ready to go.

#2527109

Hello Minesh

That is the issue I am facing. Once I migrate the database in the new plugin version, the relationships stop working properly on the frontend.

In the backend I can still see that each relation type shows correct posts

#2527491

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

That is really strange.

Can you please share information where I can find it not working and setup a staging site for me where I can review all those issues.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2535275

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please confirm where should I perform the search - do you mean I've to use the default WordPress search? or you have created custom search view? If yes, can you please share problem URL where you added that custom search view?

#2535311

Yes Minesh. The default search on the website.

I have not updated the plugin on staging yet, I tried it earlier but due to the issues I downgraded again.

#2535329

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I search for the "Ayu Sutriasa" key word after updating the Toolset plugins on your install to latest version. I see the first page loaded after search has same entry as the live site:
> hidden link

Can you please confirm.

#2535331
Screenshot_20230116_044448.png

Please check after doing the migration, as shown in attached image.

#2535341

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

While activating the Types plugin after updating it I see there is some database related error. There is a great chance that there will be no permission to update the database. Can you please make sure that on your database server there is enough permissions granted so that when such script or plugin try to interact with database and try to update it the operation should be successful.

Do you confirm that there is enough permission granted on database?

And I hope that you already have a backup as once I will try to update database there is no chance to revert back.

#2535357
Screenshot_20230116_053112.png

I think that is an error with wp_redis no, and can be ignored. BTW while checking it I ran the migration script by mistake. You can check the attached image for that. It skipped some associations due to some posts being 404. Otherwise all went okay.

Now I think you will see mismatch in search results between live and staging.

Yes I took full backup of the site already.

#2535383

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Could you lease try to click on "Fix orphaned intermediary post types" and "Delete leftover posts":
=> hidden link

Do you see it working?

#2535415

Did both the things, but still I can see 5038 results when searching.

#2535729

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can I have duplicator copy of your production site where its working: hidden link

More info:
- https://toolset.com/faq/provide-supporters-copy-site/

I have set the next reply to private which means only you and I have access to it.

#2536867

Minesh I can provide you a duplicator backup of the staging site (before we upgraded the plugin and migrated DB) Using that backup you can create 2 sites may be and compare them.

Makes sense?

#2537039

Hi,

Just wanted to update you that Minesh is on vacation. He will be able to follow up on this when he gets back tomorrow.

Thank you for your patience.

regards,
Waqar