The explode migrate process plugin annotation says that:
/**
* @code
* process:
* bar:
* plugin: explode
* source: foo
* limit: 1
* delimiter: /
* @endcode
*
* If foo is "node/1/edit", then bar will be ['node', '1/edit']. The PHP
* equivalent of this would be:
*
* @code
* $bar = explode('/', $foo, 1);
* @endcode
*/
https://git.drupalcode.org/project/drupal/-/blob/10.1.x/core/modules/mig...
which is not true. To get an array of 2 elements the limit parameter should be 2
If limit is set and positive, the returned array will contain a maximum of limit elements with the last element containing the rest of string.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 3327659-1.patch | 684 bytes | klimp |
Comments
Comment #2
klimpComment #4
quietone commentedThis is a task. The patch still applies, so retesting.
Comment #5
quietone commentedComment #6
quietone commentedThis should be NR.
Comment #7
smustgrave commentedSeems like a simple fix.
Comment #10
catchCommitted/pushed to 11.x and cherry-picked to 10.1.x, thanks!