Skip Navigation

[Resolved] Missing dropdown to select already existing children

This support ticket is created 6 years, 11 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 7 replies, has 2 voices.

Last updated by Nigel 6 years, 11 months ago.

Assisted by: Nigel.

Author
Posts
#606593

I am trying to:
I added a post relation ship many to many between two cpt. But: When I'm in the editor, I can only add new children, but I cant figure out how to use the already existing ones. Am I missing something? This seems like a standard thing one would expect from this feature.

#606657

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Thomas

In the current implementation to add a relationship with existing children you have to edit the child post and assign the parent.

Note that work on the new post relationship implementation is well advanced and will significantly improve the workflow.

You can see more details of that here: https://toolset.com/2017/12/types-and-views-betas-with-many-to-many-relationships/

The beta of Types is available from your downloads page (https://toolset.com/account/downloads/), switching to the beta channel.

An update to the beta is expected around the end of the month and the final release to follow.

#607237

Hi Nigel,

thanks for the answer. Hm, that looks better UI wise. I'll try it out . Otherwise I'll have to use the posts2posts Plugin.
Thanks,
Best wishes,
Thomas

#607239

Well, the migration didn't work:

An error has occured during the activation. Please contact the Toolset support forum with the copy of the technical details you will find below.
"> Migration to many-to-many post relationships started.
> No tables had to be dropped.
> The toolset_associations table created.
> Relationship definitions migrated.
> Migration to many-to-many post relationships started.
> Dropped table "wp_7_toolset_associations".
Dropped table "wp_7_toolset_relationships".
> The toolset_associations table created.
> Relationship definitions migrated."

#607453

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Thomas

Do you have debugging enabled? Can you check your debug log for any errors relating to this?

Otherwise can you activate debug mode and try the migration again?

If you haven't already, turn on the debug log by editing your wp-config.php file and change the line with WP_DEBUG like so:

define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);

That will create a debug.log file in your wp-content directory which you can examine in any text editor. Try running the wizard again and then inspect the log. If you don't find the debug.log file it means it didn't generate any warnings or errors.

#607552

Did that. What the log says:

2018-01-17T17:03:53+00:00 CRITICAL Uncaught InvalidArgumentException: The element to connect with doesn't belong to the relationship definition provided. in /home/httpd/wp.kupf.at/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/potential_association/query_posts.php:64
Stack trace:
#0 /home/httpd/wp.kupf.at/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/potential_association/query_factory.php(31): Toolset_Potential_Association_Query_Posts->__construct(Object(Toolset_Relationship_Definition), Object(Toolset_Relationship_Role_Child), Object(Toolset_Post), Array)
#1 /home/httpd/wp.kupf.at/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/migration_associations.php(77): Toolset_Potential_Association_Query_Factory->create(Object(Toolset_Relationship_Definition), Object(Toolset_Relationship_Role_Child), Object(Toolset_Post))
#2 /home/httpd/wp.kupf.at/wp-content/plugins/types/vendor/toolset/toolset-common/inc/m2m/migration.php(342): Toolset_Relationship_Migration_Associations->migrate_association(12916, 1236

I also tried deactivating the other plugins.

#607555

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

OK, thank you for that.

I have another client reporting something similar and have already escalated their thread to be investigated further, but it may help to have a copy of your site, too.

Could you please provide a duplicate of your site: https://toolset.com/faq/provide-supporters-copy-site/

If you are unfamiliar with duplicator or have problems creating the archive let me know and I can create it myself if I have access to your site.

I'll mark your next reply as private.

#607891

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Thomas

My colleague is having problems narrowing down the issue with the other site reporting the same problem, and it would be very helpful to have a copy of your site for comparison.

Would you mind giving me credentials so I can make a duplicate myself?

Your next reply is private.