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

jhodgdon created an issue. See original summary.

drumm’s picture

Most 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.

where the bacon user is created

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.

Go to node/add/project-theme, fill in the fields, and save. You'll see some PHP warnings that appear to be related

That is worth tracking down, fewer notices are always good.

jhodgdon’s picture

Title: bacon user permissions on dev site seem to be off? » Warnings generated when creating Project node with user bacon
Issue summary: View changes

Ah, OK. well let's change this issue to "Warnings generated"

drumm’s picture

Title: Warnings generated when creating Project node with user bacon » Warnings generated when creating sandbox projects
Project: Drupal.org customizations » Project
Version: 7.x-3.x-dev » 7.x-2.x-dev
Component: Miscellaneous » Releases
Assigned: Unassigned » drumm

I tracked this down to project_release_node_validate()

  • drumm committed e7a6139 on 7.x-2.x
    Issue #3161155: Fix warning when validating a new sandbox project
    
drumm’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

drumm’s picture

Status: Closed (fixed) » Active

I did not test this thoroughly enough.

  • drumm committed 6e5bfc2 on 7.x-2.x
    Issue #3161155: Correctly fix warning when validating a new sandbox...
drumm’s picture

Status: Active » Fixed

Committed a more-correct fix.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.