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 CreditAttribution: Sergii commentedPlease review.
Comment #2
Sergii CreditAttribution: Sergii commentedUpdate patch to alpha7.
Comment #3
sdrycroft CreditAttribution: 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 CreditAttribution: sdrycroft commentedThe previous patch is failing due to a completely unrelated error/exception. The attached patch fixes that too.
Comment #6
Andrew Gorokhovets CreditAttribution: Andrew Gorokhovets as a volunteer commentedUpdated patch for the latest dev version.
Comment #7
MegaChriz CreditAttribution: MegaChriz at WebCoo commentedThis needs tests that ensure the following:
Comment #8
Andrew Gorokhovets CreditAttribution: Andrew Gorokhovets as a volunteer 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 CreditAttribution: MegaChriz as a volunteer commented@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.