Closed (duplicate)
Project:
Prepopulate
Version:
8.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jun 2015 at 21:48 UTC
Updated:
1 Oct 2016 at 17:11 UTC
Jump to comment: Most recent
Comments
Comment #1
mrvee commentedI've just tried to set up a prepopulated node on Drupal 8.0.1.
Running into the same WSOD when I try to prepopulate a List(Text) field on a node/add
All other fields are Text fields and working perfect.
"Fatal error: [] operator not supported for strings in /var/www/clients/client0/web19/web/modules/prepopulate/src/Controller/prepopulateController.php on line 51"
Comment #2
mrvee commentedI'm not a programmer, so not sure if this is the right approach, but the following seems to have fixed it for me for the tie being:
line 51 in prepopulateController.php:
$form['widget']['#value'][] = $request_slice;
changed to:
$form['widget']['#value'] = $request_slice;
If this is the solution, maybe someone could create a quick patch, unfortunately I don't have the know how.
Comment #3
juliencarnot commentedThis seems to be an exact duplicate of issue https://www.drupal.org/node/2712529 , which has a patch attached.