We are seeing a potential issue with the form alter code when form widgets that have nested form elements that don't include a type. This would be a very minor issue, but it causes AJAX calls on the page to fail in dev environments where notices are being reported. It also affects all form elements, not just those with file uploads.

Notice: Undefined index: #type in file_upload_secure_validator_field_widget_form_alter().

A simple isset() to test for the #type element works, but it might need a more robust solution that steps down into these elements.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

seanbfuller created an issue. See original summary.

stefanos.petrakis’s picture

Hey @sean, thanks for reporting this, will try to reproduce it and get back to you here.

stefanos.petrakis’s picture

Version: 7.x-2.1 » 7.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new855 bytes

Hey @seanbfuller, I had a look at this issue, I think the isset() is adequate and robust enough, here is a patch that you can review and test against your current dev environment(s).

stefanos.petrakis’s picture

I would like to move forward with this minuscule change, would be great to have someone taking a glimpse!

stefanos.petrakis’s picture

Status: Needs review » Reviewed & tested by the community

So, I will set this to RTBC and give it some little time (~1 week) before committing it, to give other people a chance to act if needed.

stefanos.petrakis’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for this @seanbfuller, commited

Status: Fixed » Closed (fixed)

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