Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When using the entity-reference-items
option in drush export command, It throws the following error.
Unable to decode output into JSON: Syntax error
TypeError: Argument 1 passed to Drupal\webform\Plugin\WebformElementBase::prefixExportHeader() must be of the type array, string given, called in /var/www/web/modules/contrib/webfo
rm/src/Plugin/WebformElement/WebformEntityReferenceTrait.php on line 307 in Drupal\webform\Plugin\WebformElementBase->prefixExportHeader() (line 1909 of /var/www/web/modules/contri
b/webform/src/Plugin/WebformElementBase.php).
The drush command to use:
drush wfx webform_id --delimiter=';' --langcode=nl --entity-reference-items=id
Comment | File | Size | Author |
---|---|---|---|
#11 | 3267068-11.patch | 824 bytes | jrockowitz |
#10 | webform.webform.issue_3267068.yml | 5.05 KB | jrockowitz |
#4 | argument1-passed-to-prefixExportHeader-must-be-array-3267068-4.patch | 1.86 KB | hmdnawaz |
Issue fork webform-3267068
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
hmdnawaz CreditAttribution: hmdnawaz as a volunteer commentedComment #4
hmdnawaz CreditAttribution: hmdnawaz as a volunteer commentedComment #5
hmdnawaz CreditAttribution: hmdnawaz as a volunteer commentedComment #6
hmdnawaz CreditAttribution: hmdnawaz as a volunteer commentedComment #7
michel.g CreditAttribution: michel.g at Randstad Digital for Government of Flanders commentedGood catch
Comment #8
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedWe need to create a webform that can be used to replicate this issue and possibly add some test coverage.
This bug can also be addressed via 6.1.x.
Comment #9
JdeGraaff CreditAttribution: JdeGraaff as a volunteer commentedThis patch solved my issue:
ParseError: syntax error, unexpected identifier "WebformElementBase", expecting "function" or "const" in Composer\Autoload\includeFile() (regel 1887 van /var/www/html/web/modules/contrib/webform/src/Plugin/WebformElementBase.php)
Comment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI am able to replicate this issue using the attached webform and the below drush command
drush wfx issue_3267068 --entity-reference-items=id
Comment #11
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commentedI think I found the root cause of this issue. Please review the attached patch.
Comment #15
jrockowitz CreditAttribution: jrockowitz as a volunteer and at The Big Blue House commented