Closed dutchiexl closed 9 years ago
The body field has a problem for me because I don't accept language undefined. I am going to rework it tommorow so that it is possible to add languages.
Yes, indeed, the next step for field handlers in D7 is to make them language aware. Could you share the scenario that generates the warning?
@api
Scenario: When a news item is created, I should be able to see it in the overview
Given I created a "News" content:
| title | News feature: News item 1 |
| body | This is a news item |
| field_date | 2018-02-25 07:45:45 |
And I break
And I am on "/news"
Then I should see the link "News feature: News item 1" in the "main" region</code>
Is Given I created a "News" content:
a custom step definition?
Yes it is, it is a copy of Given I am viewing ... but without the goto
Is this still an issue? The corresponding issue was closed without being merged.
Closing. Feel free to re-open if this is still happening.
Warning: Invalid argument supplied for foreach() in /Library/WebServer/Documents/cegeka/ftaworld/vendor/drupal/drupal-driver/src/Drupal/Driver/Fields/Drupal7/DefaultHandler.php line 22
The error is generated by this code:
foreach ($values as $value) { $return[LANGUAGE_NONE][] = array('value' => $value); }
because not all values are arrays.
I changed the code to this:
foreach ((array)$values as $value) {
in all handlers which fixed the problem, but I am still having an issue with the body field, which doesn't seem to be saved.