Skip Navigation

[Resuelto] Imported relations are stored in toolset_associations but not shown in WP-admin

This support ticket is created hace 4 años, 2 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: 

Este tema contiene 8 respuestas, tiene 2 mensajes.

Última actualización por Simon hace 4 años, 1 mes.

Asistido por: Jamal.

Autor
Mensajes
#1788951

I have successfully imported Films (CPT) and FilmSessions (CPT) with WP All Import together with the Toolset plugin for WP All Import.
The individual posts for Films and FilmSessions are displayed correctly with all the imported data in WP-admin.

The Toolset relation between the CPTs are one-to-many. Where "one" is Films and "many" are FilmSessions. One film can have many sessions.

During the import I'm using the unique Film ID that is stored in both Films and FilmSessions as the identifier for the relation.
I can see all the created relations in the database table toolset_associations . When I cross check them manually by post id's I can see that all filmsessions are correctly linked to corresponding film in the database.

When I in WP-admin view an individual film I can see the graphical relations tab with corresponding fields from FilmSessions.
However there are no entries shown in this tab/GUI. I expected to see the relations that is shown in the database table toolset_associations ?

#1791137

Hello and thank you for contacting the Toolset support.

As of Toolset Types 3.4(released this month), there have been some changes to the way Toolset handles relationships in the database. I would like to know which versions of Toolset plugins you were using, can you please paste your Toolset Debug information in the Debug information field?
- https://toolset.com/faq/provide-debug-information-faster-support/

I assume you were following this documentation for your import, right?
https://toolset.com/course-lesson/import-posts-from-csv-with-relationships-using-wp-all-import/#example-2-one-to-many-relationships

Then, can you please record a screencast of the import, using Loom or Screencastify, and scroll over each page of the import process, so we can see exactly what configurations you have been using.

Then, please share your CSV files or a sample of them, with an export of your CPTs and relationships, using Toolset Modules Manager, on an online sharing service, such as DropBox or GDrive.

#1792887

Hello Jamal!

I can't see the fields for pasting the debug information or which email address to share the files with.

Basic debug information:
Toolset Types 3.4.1
Toolset Views 3.3.1
WP All Import 4.6.3
WP All Import - Toolset Types Add-on Beta 1.0.0-beta-5.3

I have followed the guide that you are refering to.

Please let me know which e-mail address I shall share import log, CSV, settings and debug information to.
The site is in developing mode so I could also share an admin login to you.

Best regards,
Simon

#1794175

Scenario #1:
Importing with WP All Import add on for Toolset Types.

1. WP All Import writes in logfile: Importing relationship Post ID 2408 => Child ID 2461
2. These post id's are inserted in a row in db table toolset_association with: parent_id = 2408, child_id = 2461 and relationship_id = 2.
3. Db table toolset_connected_elements is empty.
4. No relation is shown when viewing Post ID 2408 (movie) or Post ID 2461 (movie session) when editing in WP-admin GUI.

Scenario #2:
Assign a movie session manually to a movie by the GUI in WP-admin.

1. Edit the currently imported movie (ID 2408) and assign to movie session (ID 2461) in WP-admin GUI.
2. The following row is inserted in toolset_association: parent_id = 1, child_id = 2 and relationship_id = 2 .
3. The following two rows are inserted in toolset_conntected_elements:
Row #1: id = 3, element_id = 2408, domain = posts, group_id = 1
Row #2: id = 4, element_id = 2461, domain = posts, group_id = 2
4. The relation is now shown correctly in WP-admin GUI.

Conclusion:
It seems that during the import the Post ID's are placed in the wrong table as in scenario #1.

#1794549

Please use my address jamal.b(at)onthegosystems.com. If you can't share some files in an email, please use Google Drive or DropBox.
I'll also set your next reply as private if you want to share something on it.

#1797095

Thank you for the credentials and the data file.

First, I thought that the import was not correctly configured. None of the "Movies" or "Sessions" import implemented the relationship field. Also, Sessions should be imported before Movies, because there is no way from a session to know what is the parent movie, but we can pull the sessions data from the movie object.

So, I tried with several combinations, using the FOREACH loop, or using hardcoded values and separating them with (,) but that did not help.
enlace oculto

Every time WP All Import Toolset Add-On was not able to build the relationship, and was always returning this message:
"Maximum cardinality achieved, not importing relationship"

So, I analyzed the "WP All Import Toolset Add-On" code and it seems that it relies on the old database schema of Toolset Types.

Starting from Toolset Types 3.4, we have changed the database schema to integrate with WPML. You can read our announcements here https://toolset.com/category/announcements/

I believe that the Add-on is not compatible with this new version.

I'll suggest:
- Reach out to the WP All Import team and report this. Check this screenshot enlace oculto
- Use the Toolset Types plugin(versions < 3.4). Perform the import. Then update the website. Please note, that you can't simply replace the plugins file with old versions. You will have to start with an old backup or a new installation with the old plugin's version.

You may also, implement custom code that will use WP All Import actions to connect the posts using our API, the toolset_connect_posts function. Read more about it here https://toolset.com/documentation/customizing-sites-using-php/post-relationships-api/#toolset_connect_posts

#1804029

WP All Import have now updated their add on plugin to the new database schema.

Thank you for the help!

#1804587

Awesome! I am glad you could get the import done 🙂

I'll have to kindly ask you to mark this ticket as resolved and open a new ticket for any other issue or question.

#1810011

My issue is resolved now. Thank you!