Noticed that following #3026945, there's a case where a warning gets thrown when editing and then saving a view, as this property isn't set directly checking if it's false throws a warning.

Notice: Undefined property: Drupal\views\Entity\View::$batch_field_defaults in field_defaults_entity_presave() (line 16 of /var/www/drupalvm/docroot/modules/contrib/field_defaults/field_defaults.module)

Will attach a patch.

Comments

ThomWilhelm created an issue. See original summary.

thomwilhelm’s picture

Status: Active » Needs review
StatusFileSize
new490 bytes

Attaching patch to fix this.

littlepixiez’s picture

I get this error using Paragraphs due to the fact the entity doesn't have the property defined. Patch works great for me, thanks!

us_man’s picture

Hello,
thank you for this patch but, i've an error when i try to apply it with composer :

Cannot apply patch Notice: Undefined property $batch_field_defaults (https://www.drupal.org/files/issues/2019-03-18/notice-undefined-property-batch-field-defaults-2.patch)!

Thanks

mrogers’s picture

I can confirm that this patch applies properly for me with the current 1.0 (non-dev) release.

frazras’s picture

Works for me on version 8.x-1.0

danjdewhurst’s picture

Confirmed to work on version 1.0.0, I too have Paragraphs installed.

b_sharpe’s picture

Status: Needs review » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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