This is my first time posting an issue so please forgive me if I've done it wrong.
I have created a 'test site' using Drupal 8 in order to test its suitability for a major upcoming project. My company uses the Webforms module routinely so I went ahead and installed it (version 8.x-4.x-dev) on my test site.
The installation of the Webform module went fine and I could immediately access the webform in my "content types" menu.
Then, I added a text field with a "name" label. I went back to see how this looked, and could not see the field showing on my webform at all.
I decided to try to add another field to see if that worked, so I added an "Email field". All was well until the final "Save" (while adding this field) after which I was redirected to a white page reading "The website encountered an unexpected error. Please try again later".
I had a colleague do the same to make sure it wasn't just user error, and he had the same result.
I've attached a screenshot of the error for your reference.
Please advice me if I should go about reporting this differently, and thank you for your time. :)
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | webform_fatal_error_2637114_11.patch | 631 bytes | arunkumark |
| #6 | webform_fatal_error_2637114_6.patch | 553 bytes | arunkumark |
| #5 | _MySQL_5_5_42__127_0_0_1_d8_webform_component.png | 49.78 KB | ironkiat |
| Screen Shot 2015-12-17 at 16.58.57.png | 40.4 KB | RazmatazMcGrav |
Comments
Comment #2
heneryh commentedMe too. Created the form, added name. Added email but that threw one error. Now the whole web site is bonked with
Fatal error: Call to undefined function url() in /Users/Joe/Sites/devdesktop/henriques-dev/docroot/modules/webform/webform.module on line 1847Comment #3
sureshcj commentedMe to got a same error. Kindly provide any solution for this issue.
I got error log message like :
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[HY000]: General error: 1364 Field 'value' doesn't have a default value: INSERT INTO {webform_component} (nid, cid, type, pid, weight, name, form_key, required, extra) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => 3 [:db_insert_placeholder_2] => email [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => 2 [:db_insert_placeholder_5] => Name1 [:db_insert_placeholder_6] => name1 [:db_insert_placeholder_7] => 1 [:db_insert_placeholder_8] => a:2:{s:11:"wrapper_css";s:6:"sdfsdf";s:9:"field_css";s:6:"sfdsdf";} ) in Drupal\webform\ComponentBase->save() (line 274 of /var/www/html/xxx/modules/webform/src/ComponentBase.php).
Comment #4
manasiv commentedAPI change reference:
Use the \Drupal\Core\Url object in place of arrays of route info - https://www.drupal.org/node/2189619
l() and url() are removed in favor of a routing based URL generation API - https://www.drupal.org/node/2346779
Comment #5
ironkiat commentedWhen the error happens, check your PHP log and you should see something like this:
It was trying to insert an empty 'value' into the database table "webform_component"'s "value" field which doesn't allow empty (Null) values.
I manually checked it to Allow Null so I could proceed on to add components, but its just a temporary workaround, may not even be a solution.
I guess the module maintainer has to provide a fix for this...
Comment #6
arunkumarkHi,
Am also try to create the forms using webform 8.x.4-dev faced problems on fatal
As per comment #3 i replicated the issue and patched for that.
Some other issues:
1. Can't create webforms when attached to another content types. it always show blank list.
2. Select Options(Select list, Radio or checkbox option) is not exist in drupal 8
If any one Guide me i can help to fix mentioned issues.
Comment #9
alex.mazaltovThe same issue have been reproduced on email component creation
#6 for me is working well
Comment #10
sk33lz commentedI'm not sure exactly why it's failing testing, but #6 is working to fix the issue with adding email fields to a webform node.
Comment #11
CatherineOmega commentedThe patch in #6 solves adding email fields to a webform for me as well. I think it just needs to be rerolled with consistent indents. Regardless, it actually DOES work.
Comment #12
arunkumarkHi,
As per comment #11 i re rolled patch with proper indentation.
Comment #13
navneet0693 commentedComment #16
navneet0693 commentedRemove extra spacing. And what's the result of simpletest testing on local ?
Comment #17
manpreet saini commentedThe patch in #6 solves adding email fields to a webform for me as well.Thanks
Comment #18
fenstratClosing to clear out the old Webform 8.x-4.x branch. See #2827845: [roadmap] YAML Form 8.x-1.x to Webform 8.x-5.x.