The description in webform_drush_command() is wrong. The component option keys have to be prefixed with "webform_".
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | webform-drush_wfx_form_keys-2532878-5.patch | 2.49 KB | danchadwick |
| #4 | webform_drush_map_form_keys_to_cids.patch | 2.06 KB | morenstrat |
Comments
Comment #1
danchadwick commentedConfirmed, but it's not clear what we want. I think the intention of prefixing the submission info fields with webform_ is to prevent conflicts with actual component form keys. But the command doesn't accept form keys, but rather component cid's.
I see three options for this isssue:
I like Option 3 myself. Comments?
Comment #2
morenstratI'm also in favor of option 3 and created a patch for it.
Comment #3
danchadwick commentedVery nice. My comments are trivial and stylistic only. I haven't tested it yet, but it looks good.
Unneeded blank lines.
Combine these lines, I think.
Need an unset of $component. Reference loop variables are PHP timebombs.
Comment #4
morenstratNew patch attached!
Comment #5
danchadwick commentedThanks very much!
To clarify my third comment, I don't object to reference loop variables, but they need to be unset immediately after to loop. If you happen to (maybe years later) reuse that variable name, it will still be a reference, leading to much hair pulling. I restored your original version of the loop and added an unset.
Committed to 7.x-4.x and 8.x.
Also, one tiny request: if you name patches according to the Drupal convention, it is easier for maintainers to track them.