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.
Problem/Motivation
When you use the bacon user on a dev site to create a project, you get warning messages.
Steps to reproduce
1. On a dev site, log in as user "bacon".
2. Go to node/add/project-theme, fill in the fields, and save. You'll see some PHP warnings:
Warning: array_values() expects parameter 1 to be array, boolean given in _field_filter_items() (line 517 of /var/www/dev/project-drupal.dev.devdrupal.org/htdocs/modules/field/field.module).
Warning: Invalid argument supplied for foreach() in list_field_validate() (line 393 of /var/www/dev/project-drupal.dev.devdrupal.org/htdocs/modules/field/modules/list/list.module).
Warning: array_values() expects parameter 1 to be array, boolean given in _field_filter_items() (line 517 of /var/www/dev/project-drupal.dev.devdrupal.org/htdocs/modules/field/field.module).
dww says you don't get the warnings if you are logged in as a "regular" user (not sure who).
Proposed resolution
Fix the PHP warnings.
Remaining tasks
TBD
User interface changes
Fewer PHP warnings.
API changes
None.
Data model changes
None.
Comments
Comment #2
drummMost users only have access to the one default format. Core simplifies the form and hides the select element if there is only one option: https://git.drupalcode.org/project/drupal/-/blob/5d1c64e652333034f9aba01...
As far as I can tell, this is working normally. Some limited HTML following https://project-drupal.dev.devdrupal.org/filter/tips is available to use.
They are actually a regular person that webchick chose: https://www.drupal.org/u/bacon. I’m not sure if they know they are a test case. The password is reset by the dev site provisioning script.
That is worth tracking down, fewer notices are always good.
Comment #3
jhodgdonAh, OK. well let's change this issue to "Warnings generated"
Comment #4
drummI tracked this down to
project_release_node_validate()
Comment #6
drummComment #8
drummI did not test this thoroughly enough.
Comment #10
drummCommitted a more-correct fix.