Skip Navigation

[Resolved] Relationships dissappeard after the last update

This support ticket is created 3 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9: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: Africa/Casablanca (GMT+01:00)

This topic contains 17 replies, has 2 voices.

Last updated by simonM-5 3 years, 6 months ago.

Assisted by: Jamal.

Author
Posts
#1787563

HI Jamal

I updated to all the latest versions of Toolset plugins. I still see the two relationships on the database (see screenshot) but these are not appearing in the Toolset > Relationships GUI.

I appreciate you guys want to keep issues separate - I don't wanna crowd this Favourites ticket with a separate issue, if you prefer you could split it into a separate ticket.

Kind regards
Simon

#1787569

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Simon,

To better investigate this issue, we'll need a backup of your website before the update, so we can run an update and observe if the issue will be reproduced. And we may need a copy of the current state if we were not able to reproduce the issue.
I'll set your next reply as private to let you share download links safely.

Thank you!

#1788903

PS Jamal, please MOVE not COPY the duplicator packages out of the folder onto your local computer as they pose a security risk left there on the FTP server.

Thanks so much! I'm so paranoid now after we got attacked by viruses. Cost me so much time that I didn't have!
Kind regards
Simon

#1788925

PS Jamal, please MOVE not COPY the duplicator packages out of the folder onto your local computer as they pose a security risk left there on the FTP server.

Thanks so much! I'm so paranoid now after we got attacked by viruses. Cost me so much time that I didn't have!
Kind regards
Simon

#1789427

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Simon, I moved the file to my computer and I have also tried to run the new relationship migration again to see if it will fix the issue but it did not.

Let me investigate this a bit and get back to you.

I also hope to understand what did you mean by "All the previous Related Ads are no longer shown"? Do you mean Job-Ads?
Can you check on the trash? Because, I had to remove those that do not have an expiration time, yesterday while working on the expiring jobs view.

#1789611
Screenshot 2020-09-24 at 22.58.53.png

Hi Jamal

What I meant is hopefully demonstrated in this screenshot: I just created a new Message thread using nativenanny2 based on the Job Ad TS Test 11. You can see in the RELATED AD under the messages, that the link is still generated to the Related Job Ad when viewing messages for new messages associated with Job Ads but all the links from previous Job Ads have gone missing.

Like I said, none of these messages are from real customers. We just need to be sure that the site is working as it should be, writing into the correct tables, and that valid Relationships are being shown under Toolset > Relationships. Also I have no problem deleting obsolete tables eg wp_toolset_associations_old since by the time we go live this will no longer be valid.

Kind regards
Simon

#1790519

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Simon,

I just got the change to build your Duplicator copy and work on it. I started with the one before the update(Sep 16), but it does not have the relationships at all. And the database seems already inconsistent. Check this screenshot hidden link
It also holds the latest versions of the plugins instead of the previous ones.

I wonder if you can provide another backup that holds the previous versions of the plugins and where the relationships still appear on the UI?

Thank you and my apologies for this late reply.

#1794131

Hi Jamal

I took a version of the site from 1 Sept and installed it on play.native-nanny.com (also uploaded that to the FTP location), but I don't see any relationships there either. I'm beginning to wonder if they are necessary at all?

When I went to Toolset > Relationships however on play.native-nanny.com, I was prompted to run the migration wizard, so I did that just to see what happened. I was notified of the following:

> Post relationships migration started.
> Maintenance mode enabled.
> Dropped table "wp_toolset_associations".
> Dropped table "wp_toolset_relationships".
> Dropped table "wp_toolset_type_sets".
> The toolset_associations, toolset_relationships and toolset_post_type_sets tables have been created.
> No relationships to migrate.
> Relationship definitions migrated.
> Associations processed.
> The migration process is complete.
> Maintenance mode disabled.

I never got that wizard on the dev.native-nanny.com site.

In any case, as we are not yet live, we don't need the "old" way to do Relationships. We will only need the "new" way. It seems that somehow Toolset is still managing to create 1:n associations between the Messages CPT and Job Ad and Nanny Ad CPTs, despite not seeing any Relationships defined under Toolset > Relationships.

As a test, I created a test CPT "TestCPTs" and was able to post reference fields from the post type FAQs, although I hadn't created any Relationship between the two.

Should that even be possible? It seems illogical to me, since how could Toolset know what kind of relationship exists between the two post types if none was defined yet? I would expect it to only offer me Post Types to reference from existing Relationships in the database.

Am I missing something really obvious?

Thanks and regards
Simon

#1794533

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you Simon for this feedback. I have discussed this issue with our 2nd Tier and he will take a look at the provided duplicator package and analyze what the issue is.
I'll get back to you as soon as possible.

#1796577

Hi Jamal

Can you please remove the plugin WordFence from your cloned site(s)? I'm getting messages that our scans can't complete due to licence conflicts.

Thanks and regards
Simon

#1796579

Hi

And Google SiteKit! 🙂

Thanks and regards
Simon

#1797549

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Simon,

Our 2nd tier also confirms that both duplicator packages were already updated to 3.4 and the databases were already migrated.

Because, you have few relationships, our 2nd Tier suggested to recreate them instead of analyzing why they were lost. We suggest:
1. Remove the following tables at the database level, using phpMyAdmin or a similar tool:
wp_toolset_associations
wp_toolset_associations_old
wp_toolset_connected_elements
wp_toolset_relationships
2. Visit Toolset->Relationships to force Toolset Types to recreate the required tables.
3. Recreate the relationships manually.

I hope that this workaround will unlock the situation and let you continue working on your website. Let me know if you have any questions.

Regarding the "Wordfence" and "Google SiteKit", we will delete our copies of the website. You should be able to recover your licenses. Let us know if you are still stuck on that.

Best regards,
Jamal

#1797599

Hi Jamal

1) OK, I thought of doing that myself already, but didn't wanna screw something up on the database. 🙂 I'll give it a whirl this afternoon.

2) I'm still waiting on the answer to my question above though... Should I technically only be able to post-reference fields for which a Relationship has been defined under Toolset > Relationships?

3) (On a side note, I suspect I might have found another bug regarding Expired/Expiring Posts, but I haven't finished developing and testing that. I'd prefer that you work on it so I don't have to explain everything all over again to a new support representative, so if I open another ticket can I request that you work the ticket?)

Kind regards
Simon

#1797715

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello Simon,

I am not sure what do you mean by your 2nd point. Relationships are now saved in multiple database tables. What do you mean by fields?

Regarding the issue with expiration, just create a new ticket and ask on it to pass this ticket to me. I'll keep an eye on the queue, but if one of my colleagues took it, he will pass it to me.

#1798231

Hi Jamal

I deleted the tables as requested. Now I cannot create any more relationships. I get the error message that the table doesn't exist on the database.

I also tried reinstalling Toolset Types and Toolset Blocks to see if it would "initiate" the creation of the new tables.

Please advise on how I should proceed now.

Kind regards
Simon

Error message:
WordPress database error: [Table 'kledbdev.wp_toolset_relationships' doesn't exist]
SELECT relationships.id AS id, relationships.slug AS slug, relationships.display_name_plural AS display_name_plural, relationships.display_name_singular AS display_name_singular, relationships.driver AS driver, relationships.parent_domain AS parent_domain, relationships.child_domain AS child_domain, relationships.intermediary_type AS intermediary_type, relationships.ownership AS ownership, relationships.cardinality_parent_max AS cardinality_parent_max, relationships.cardinality_parent_min AS cardinality_parent_min, relationships.cardinality_child_max AS cardinality_child_max, relationships.cardinality_child_min AS cardinality_child_min, relationships.is_distinct AS is_distinct, relationships.scope AS scope, relationships.origin AS origin, relationships.role_name_parent AS role_name_parent, relationships.role_name_child AS role_name_child, relationships.role_name_intermediary AS role_name_intermediary, relationships.role_label_parent_singular AS role_label_parent_singular, relationships.role_label_child_singular AS role_label_child_singular, relationships.role_label_parent_plural AS role_label_parent_plural, relationships.role_label_child_plural AS role_label_child_plural, relationships.needs_legacy_support AS needs_legacy_support, relationships.is_active AS is_active, relationships.autodelete_intermediary AS autodelete_intermediary, relationships.parent_types AS parent_types_set_id, relationships.child_types AS child_types_set_id, GROUP_CONCAT(DISTINCT parent_types_table.type) AS parent_types, GROUP_CONCAT(DISTINCT child_types_table.type) AS child_types FROM wp_toolset_relationships AS relationships JOIN wp_toolset_type_sets AS parent_types_table ON (relationships.parent_types = parent_types_table.set_id ) JOIN wp_toolset_type_sets AS child_types_table ON (relationships.child_types = child_types_table.set_id ) GROUP BY relationships.id

WordPress database error: [Table 'kledbdev.wp_toolset_relationships' doesn't exist]
SELECT relationships.id AS id, relationships.slug AS slug, relationships.display_name_plural AS display_name_plural, relationships.display_name_singular AS display_name_singular, relationships.driver AS driver, relationships.parent_domain AS parent_domain, relationships.child_domain AS child_domain, relationships.intermediary_type AS intermediary_type, relationships.ownership AS ownership, relationships.cardinality_parent_max AS cardinality_parent_max, relationships.cardinality_parent_min AS cardinality_parent_min, relationships.cardinality_child_max AS cardinality_child_max, relationships.cardinality_child_min AS cardinality_child_min, relationships.is_distinct AS is_distinct, relationships.scope AS scope, relationships.origin AS origin, relationships.role_name_parent AS role_name_parent, relationships.role_name_child AS role_name_child, relationships.role_name_intermediary AS role_name_intermediary, relationships.role_label_parent_singular AS role_label_parent_singular, relationships.role_label_child_singular AS role_label_child_singular, relationships.role_label_parent_plural AS role_label_parent_plural, relationships.role_label_child_plural AS role_label_child_plural, relationships.needs_legacy_support AS needs_legacy_support, relationships.is_active AS is_active, relationships.autodelete_intermediary AS autodelete_intermediary, relationships.parent_types AS parent_types_set_id, relationships.child_types AS child_types_set_id, GROUP_CONCAT(DISTINCT parent_types_table.type) AS parent_types, GROUP_CONCAT(DISTINCT child_types_table.type) AS child_types FROM wp_toolset_relationships AS relationships JOIN wp_toolset_type_sets AS parent_types_table ON (relationships.parent_types = parent_types_table.set_id ) JOIN wp_toolset_type_sets AS child_types_table ON (relationships.child_types = child_types_table.set_id ) WHERE ( ( ( relationships.parent_domain = 'posts' ) AND ( parent_types_table.type = 'message' ) ) OR ( ( relationships.child_domain = 'posts' ) AND ( child_types_table.type = 'message' ) ) ) AND ( relationships.is_active = 1 ) AND ( ( ( relationships.parent_domain != 'posts' OR parent_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'fusion_tb_layout', 'fusion_tb_section', 'message', 'job-ad', 'nanny-ad', 'postman_sent_mail', 'avada_portfolio', 'avada_faq', 'themefusion_elastic', 'fusion_icons', 'slide' ) ) ) AND ( ( relationships.child_domain != 'posts' OR child_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'fusion_tb_layout', 'fusion_tb_section', 'message', 'job-ad', 'nanny-ad', 'postman_sent_mail', 'avada_portfolio', 'avada_faq', 'themefusion_elastic', 'fusion_icons', 'slide' ) ) ) ) AND ( relationships.origin = 'wizard' ) GROUP BY relationships.id

WordPress database error: [Table 'kledbdev.wp_toolset_relationships' doesn't exist]
SELECT relationships.id AS id, relationships.slug AS slug, relationships.display_name_plural AS display_name_plural, relationships.display_name_singular AS display_name_singular, relationships.driver AS driver, relationships.parent_domain AS parent_domain, relationships.child_domain AS child_domain, relationships.intermediary_type AS intermediary_type, relationships.ownership AS ownership, relationships.cardinality_parent_max AS cardinality_parent_max, relationships.cardinality_parent_min AS cardinality_parent_min, relationships.cardinality_child_max AS cardinality_child_max, relationships.cardinality_child_min AS cardinality_child_min, relationships.is_distinct AS is_distinct, relationships.scope AS scope, relationships.origin AS origin, relationships.role_name_parent AS role_name_parent, relationships.role_name_child AS role_name_child, relationships.role_name_intermediary AS role_name_intermediary, relationships.role_label_parent_singular AS role_label_parent_singular, relationships.role_label_child_singular AS role_label_child_singular, relationships.role_label_parent_plural AS role_label_parent_plural, relationships.role_label_child_plural AS role_label_child_plural, relationships.needs_legacy_support AS needs_legacy_support, relationships.is_active AS is_active, relationships.autodelete_intermediary AS autodelete_intermediary, relationships.parent_types AS parent_types_set_id, relationships.child_types AS child_types_set_id, GROUP_CONCAT(DISTINCT parent_types_table.type) AS parent_types, GROUP_CONCAT(DISTINCT child_types_table.type) AS child_types FROM wp_toolset_relationships AS relationships JOIN wp_toolset_type_sets AS parent_types_table ON (relationships.parent_types = parent_types_table.set_id ) JOIN wp_toolset_type_sets AS child_types_table ON (relationships.child_types = child_types_table.set_id ) WHERE ( ( ( relationships.parent_domain = 'posts' ) AND ( parent_types_table.type = 'job-ad' ) ) OR ( ( relationships.child_domain = 'posts' ) AND ( child_types_table.type = 'job-ad' ) ) ) AND ( relationships.is_active = 1 ) AND ( ( ( relationships.parent_domain != 'posts' OR parent_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'fusion_tb_layout', 'fusion_tb_section', 'message', 'job-ad', 'nanny-ad', 'postman_sent_mail', 'avada_portfolio', 'avada_faq', 'themefusion_elastic', 'fusion_icons', 'slide' ) ) ) AND ( ( relationships.child_domain != 'posts' OR child_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'fusion_tb_layout', 'fusion_tb_section', 'message', 'job-ad', 'nanny-ad', 'postman_sent_mail', 'avada_portfolio', 'avada_faq', 'themefusion_elastic', 'fusion_icons', 'slide' ) ) ) ) AND ( relationships.origin = 'wizard' ) GROUP BY relationships.id

WordPress database error: [Table 'kledbdev.wp_toolset_relationships' doesn't exist]
SELECT relationships.id AS id, relationships.slug AS slug, relationships.display_name_plural AS display_name_plural, relationships.display_name_singular AS display_name_singular, relationships.driver AS driver, relationships.parent_domain AS parent_domain, relationships.child_domain AS child_domain, relationships.intermediary_type AS intermediary_type, relationships.ownership AS ownership, relationships.cardinality_parent_max AS cardinality_parent_max, relationships.cardinality_parent_min AS cardinality_parent_min, relationships.cardinality_child_max AS cardinality_child_max, relationships.cardinality_child_min AS cardinality_child_min, relationships.is_distinct AS is_distinct, relationships.scope AS scope, relationships.origin AS origin, relationships.role_name_parent AS role_name_parent, relationships.role_name_child AS role_name_child, relationships.role_name_intermediary AS role_name_intermediary, relationships.role_label_parent_singular AS role_label_parent_singular, relationships.role_label_child_singular AS role_label_child_singular, relationships.role_label_parent_plural AS role_label_parent_plural, relationships.role_label_child_plural AS role_label_child_plural, relationships.needs_legacy_support AS needs_legacy_support, relationships.is_active AS is_active, relationships.autodelete_intermediary AS autodelete_intermediary, relationships.parent_types AS parent_types_set_id, relationships.child_types AS child_types_set_id, GROUP_CONCAT(DISTINCT parent_types_table.type) AS parent_types, GROUP_CONCAT(DISTINCT child_types_table.type) AS child_types FROM wp_toolset_relationships AS relationships JOIN wp_toolset_type_sets AS parent_types_table ON (relationships.parent_types = parent_types_table.set_id ) JOIN wp_toolset_type_sets AS child_types_table ON (relationships.child_types = child_types_table.set_id ) WHERE ( ( ( relationships.parent_domain = 'posts' ) AND ( parent_types_table.type = 'nanny-ad' ) ) OR ( ( relationships.child_domain = 'posts' ) AND ( child_types_table.type = 'nanny-ad' ) ) ) AND ( relationships.is_active = 1 ) AND ( ( ( relationships.parent_domain != 'posts' OR parent_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'fusion_tb_layout', 'fusion_tb_section', 'message', 'job-ad', 'nanny-ad', 'postman_sent_mail', 'avada_portfolio', 'avada_faq', 'themefusion_elastic', 'fusion_icons', 'slide' ) ) ) AND ( ( relationships.child_domain != 'posts' OR child_types_table.type IN ( 'post', 'page', 'attachment', 'oembed_cache', 'user_request', 'fusion_tb_layout', 'fusion_tb_section', 'message', 'job-ad', 'nanny-ad', 'postman_sent_mail', 'avada_portfolio', 'avada_faq', 'themefusion_elastic', 'fusion_icons', 'slide' ) ) ) ) AND ( relationships.origin = 'wizard' ) GROUP BY relationships.id

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.