Nested categories from Drupal 8
-
Running a migration with v 1.67.1 on Drupal 8.6.2, I found that all the categories were being flattened – no parent categories were migrated. Looking into it, the code doesn’t to accommodate Drupal 8.5+’s new taxonomy_term__parent table. I was able to fix it by adding another case to get_taxonomy_term_hierarchy():
$table_name = 'taxonomy_term__parent'; $sql = " SELECT h.entity_id as tid, h.parent_target_id as parent FROM ${prefix}${table_name} h WHERE h.parent_target_id != 0 ";
Thanks for this well-written plugin. I hope this is helpful.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Nested categories from Drupal 8’ is closed to new replies.