- Issue created by @mortona2k
- πΊπΈUnited States mortona2k Seattle
I'm able to bypass the config form by editing the yaml file and importing.
Now mapping the key to value is working, however only for IDs for existing terms.
It's not able to create new terms from text, even though the field allows it.
I tried using the automatic detection plugin, hoping that would convert it if needed. Maybe that's where the logic should go for an entity lookup, or should it be another plugin? I'll make another ticket for it, but still hashing out how things work in this one.
- πΊπΈUnited States mortona2k Seattle
I switched to a text field to simplify, but still having trouble. Looks like importing numeric keys from config doesn't work around it.
- πΊπΈUnited States mortona2k Seattle
This call to mergeDeep() is clobbering the array keys:
https://git.drupalcode.org/project/external_entities/-/blob/3.0.x/src/Da... - πΊπΈUnited States mortona2k Seattle
- Merge request !94Use mergeDeepArray to preserve keys when setting config β (Merged) created by mortona2k
- πΊπΈUnited States mortona2k Seattle
Switching from NestedArray:mergeDeep() to mergeDeepArray() with
$preserve_integer_keys = TRUE
seems to work.This will need testing to see if the change breaks anything.
NestedArray:mergeDeep() is still used in many places and may need further review.I'm able to map the integers to text for a text field.
Also able to map integers to taxonomy ids for term reference field.Still can't create new taxonomy terms from the mapped text (#2), but that can be a different issue.
- πΊπΈUnited States mortona2k Seattle
I updated the External Entities Drupal.org submodule to demonstrate how this works.
Just enable external_entities_drupalorg and go to the route for an issue:
/drupalorg-rest-issue/3536965You should see the Title, Body, and Status for this issue.
- π«π·France guignonv Montpellier
I'm on vacation and will have a look when I'm back in a week.
-
guignonv β
committed 407ed74e on 3.0.x authored by
mortona2k β
Issue #3536965 by mortona2k: Value mapping plugin is breaking numeric...
-
guignonv β
committed 407ed74e on 3.0.x authored by
mortona2k β
Automatically closed - issue fixed for 2 weeks with no activity.