Drupal\Core\Entity\EntityStorageException: Field is unknown

Created on 26 June 2023, 12 months ago
Updated 16 November 2023, 7 months ago

Problem/Motivation

Seeing fatals when using this module configured to use the "HTML-safe field output" which seems to be the default and no "Source"

Steps to reproduce

1. Enable the paragraphs_anchor module
2. Create a new paragraph with a single link field
3. Add the paragraph type to an entity reference field on a node
4. Add a new node
5. Add the new paragraph
6. Save

The website encountered an unexpected error. Please try again later.

Drupal\Core\Entity\EntityStorageException: Field is unknown. in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 815 of core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

Drupal\Core\Entity\ContentEntityBase->get('') (Line: 21)
paragraphs_anchor_paragraph_presave(Object)
call_user_func_array(Object, Array) (Line: 426)
Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}(Object, 'paragraphs_anchor') (Line: 405)
Drupal\Core\Extension\ModuleHandler->invokeAllWith('paragraph_presave', Object) (Line: 433)
Drupal\Core\Extension\ModuleHandler->invokeAll('paragraph_presave', Array) (Line: 249)
Drupal\Core\Entity\EntityStorageBase->invokeHook('presave', Object) (Line: 900)
Drupal\Core\Entity\ContentEntityStorageBase->invokeHook('presave', Object) (Line: 563).....

Proposed resolution

I appreciate this is a config issue more than anything, but we could check for the field being available and not empty?

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom aaron.ferris

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024