After migrating a site from v. 2.8.0.2 to the current version, entries with multiple nested categories assigned to them get a huge number of duplicates of the same categories assigned to them. I can provide screenshots and other logs/db independently.
The entry we noticed this on has 4 levels deep of categories assigned to it. The top level category is listed 49 times. One of the second level categories is listed 4 time, the other is listed only once. The third and fourth level categories are listed once each. Originally there was only the one top level category with the sub-categories within.
I realize it would be easier to see but I cannot post screenshots of the clients content here.
Do the “duplicates” have draftId or revisionId values in the elements table? If so those are the drafts/revisions of the entries, which are now stored as actual elements instead of JSON data within the entrydrafts / entryversions tables.
@brandonkelly All of the duplicated categories on the entry edit screen have the same element ID, which does not have draftId or revisionId, it is the ID of the Category itself, just over and over.
Sorry, I misunderstood. Any chance you can send your Craft 2 and Craft 3 database backups, as well as Composer files, over to [email protected]? We can take a look at it from there.
I've sent over these files, thanks!
This ended up being due to duplicate data in the relations table, even before updating to Craft 3. We’re not sure how that happened in the first place, but the duplication issue goes away when the duplicate data is removed.
Appreciate you all taking a look!