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.
I see this error when I am adding a new node on my site, and sometimes when editing. I think it may depend on the node field config and how workbench access understands that. I didn't look to far into it tbh but I think the attached patch is good since it covers the possibility that
$scheme->fields('node', $node->bundle());
might return empty.
Comment | File | Size | Author |
---|---|---|---|
#2 | 2811445--empty-check-on-fields.patch | 706 bytes | dpolant |
Comments
Comment #2
dpolant CreditAttribution: dpolant commentedHere is a patch.
Comment #3
agentrickardMakes sense. This would be a case where no field is configured.
I suspect we can wrap that whole block in:
Comment #4
agentrickardThe code is easier to read as presented in the patch.