I use both parent mappings: Parent Guid and Parent Name.
The case of using such approach is when the source provides some kind of fallback if the parent is not specified directly, i.e.:
if (!empty($parent_id)) {
$item['parent_guid'] = $guid;
} else {
$item['parent_name'] = $fallback_name;
}
But in some reason in FeedsTermProcessor hardcoded that if parent's (guid, name) value is empty it is necessary to put zero (top level) to the term object.
So, even though zero level is default for terms and in next iteration other mapping might set the real parent, it always goes to the top level.
Comments
Comment #1
Sergii commentedPlease review.
Comment #2
Sergii commentedUpdate patch to alpha7.
Comment #3
sdrycroft commentedI have just run into this exact same issue. The enclosed patch is for the latest dev release. This really is a no-brainer, and should be applied ASAP.
Comment #5
sdrycroft commentedThe previous patch is failing due to a completely unrelated error/exception. The attached patch fixes that too.
Comment #6
Andrew Gorokhovets commentedUpdated patch for the latest dev version.
Comment #7
megachrizThis needs tests that ensure the following:
Comment #8
Andrew Gorokhovets commentedThank you MegaChriz!
You are right. Autotests really needed for this. I try to do it ASAP.
Also I updated a patch, it was required after testing.
Comment #9
megachriz@Andrew Gorokhovets
Great that you want to develop the automated tests. If you hit any roadblocks or have any questions during the development of the tests, don't hesitate to ask for help! Maybe with a simple answer or hint you can continue.
Comment #10
bluegeek9 commentedDrupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.
If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.
If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!