- Issue created by @acbramley
- πͺπΈSpain miguelarber
I confirm this issue exists, as I needed to map a value when one field was empty (NULL), but doing so causes a YAML parse error (as described in the ticket).
In the StaticMap process plugin, it's documented that mapping NULL is supported: https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/migra...
* A NULL can be mapped. If the value of the source property 'foo' is NULL then
* the value of the destination property bar will be 'to'.
*
* @code
* process:
* bar:
* plugin: static_map
* source: foo
* map:
* NULL: to
* @endcode
Doing this causes a YAML parse error
Non-string keys are not supported. Quote your evaluable mapping keys instead at line 57 (near "NULL: 0").
If you quote the NULL string then you don't get the parse error, but that then maps the literal string "NULL" not the NULL value so it doesn't have the desired effect.
Mapping NULL is required (in my case) to map a value when a field is empty.
Either remove documentation for the support, or come up with a solution
Active
11.0 π₯
I confirm this issue exists, as I needed to map a value when one field was empty (NULL), but doing so causes a YAML parse error (as described in the ticket).