Problem/Motivation

I get this warning when editing the node:

Warning: Undefined array key "url" in Drupal\iframe\Plugin\Field\FieldWidget\IframeWidgetBase->formElement() (line 378 of modules/contrib/iframe/src/Plugin/Field/FieldWidget/IframeWidgetBase.php).

Proposed resolution

I have inspected the configuration YAML for the field, and the url: '' is not there.

Of course, when we insert a default value on the URL field of the iframe fieldet, the error is gone.

Thanks.

CommentFileSizeAuthor
#6 3367468-3.patch721 bytessamit.310@gmail.com
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jrochate created an issue. See original summary.

jrochate’s picture

samit.310@gmail.com’s picture

Assigned: Unassigned » samit.310@gmail.com
Status: Active » Needs work

I am working on it.

  • da6b1381 committed on 8.x-2.x
    Issue #3367468: Warning: Undefined array key "url"
    
neffets’s picture

key now checked with !empty

samit.310@gmail.com’s picture

Assigned: samit.310@gmail.com » Unassigned
Status: Needs work » Needs review
FileSize
721 bytes

Issue fixed.

ChrisSnyder’s picture

Status: Needs review » Reviewed & tested by the community

The patch worked.

ilfelice’s picture

Howdy,

Tested on Drupal 10.1.0 installation. Patch works. Would be nice to have a new release. ;)

neffets’s picture

Status: Reviewed & tested by the community » Fixed

Merge in next release

Status: Fixed » Closed (fixed)

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