Skip Navigation

[Resolved] Missing records after CSV import into intermediary post type

This support ticket is created 4 years, 2 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 4 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1510753
updating associations.png

I have imported 4000 records into an intermediary post type as described here: https://toolset.com/forums/topic/how-to-import-data-from-a-database-with-m-n-relationships/#post-1505905

After the import, these records are not visible in the WordPress backend.

When I go to Toolset > Relationships and try to edit the custom fields of this relationship, I get an alert saying that 2000 existing associations need to be updated (see screenshot). When I do this, 50 intermediary post types are created. The next time I try to edit the custom fields of this relationship, I get the same alert, but this time only 1950 existing associations need to be updated. When I do this, another 50 intermediary post types are created. And so on.

So basically three things don't work as expected here:

1. The imported records should be visible in the WordPress backend instantly (without that workaround of editing the relationship's fields).

2. The alert tells me that it is going to update 2000 associations, but updates only 50.

3. I have imported 4000 records, but Toolset sees only half of them.

What's wrong here?

#1511765

Hi, whenever there's a 3rd-party tool involved in imports like this, there's always a chance that there is a problem in their plugin. It's hard to guess, but what I can do is install a copy of your site pre-import, then run the import process, and see if I can replicate the same problem. If so, I can escalate it to my 2nd tier support team to see if there is a problem with Toolset or if the 3rd party tool is not working as expected. Then I can give you some feedback. If that's okay, please let me know how you would like to proceed. I can download clones from Drive or Dropbox if you post a download URL here. All URLs you share in the forum are obscured for your privacy.

#1523415

Hi Christian

Thank you for your support. Please find a copy of our website as well as the imported data below:

WordPress database:
hidden link

WordPress files:
hidden link
There is an admin user «toolset» with password «metoki» for you.

Import CSV file:
hidden link

Our data structure is basically as follows:
– We have a custom post type «Marken» (= Brands).
– We have another custom post type «Firmen» (= Companies).
– These two custom post types are connected through a many-to-many-relationship «Vertriebe» (= Distribution); this relationship contains basically the information «Which company sells which brand».

Importing «Marken» and «Firmen» worked fine. The problem described above occured when we tried to import the CSV file marken_firmen.csv, which should update all existing records in «Marken» with their corresponding records in «Vertriebe».

This CSV files contains the following columns:
– intPkBrands: This was the primary key in our former database.
– vchrBrand: This is the brand name, which became the post title in WordPress.
– MarkenPostID: This is the post ID of the brand (our new primary key).
– FirmenPostIDs: These are post IDs of the companies related to each brand; importing this column should create the intermediary posts (which worked only for half of the brands in our case, as described above).

Please let me know if you have further questions.

Regards,
Martin

#1528781

A few follow-up questions:
- Is this database dump from before or after the import?
- The documentation explicitly states that intermediary post types are not supported by the WP All Import Add on, yet the CSV file is not formatted per standard CSV import specifications provided by Beda in the other ticket. So are you trying to use the All Import Add On, or some other import method?

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