- 🇫🇷France Paulmicha Porto Alegre, RS, Brasil
This may happen when some code calls something like :
$entity->get($field)
with a field that is not present on given entity.
i just got the same error when using devel generate to generate content for a custom content type. i did what ccjjmartin 🐛 "InvalidArgumentException: Field field_media_images is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField()" When trying to add an existing field to a new content type Postponed: needs info and wafflefox 🐛 "InvalidArgumentException: Field field_media_images is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField()" When trying to add an existing field to a new content type Postponed: needs info suggested above and cleared my cache using
drush cr
, and then devel generate worked!- Status changed to Closed: cannot reproduce
8 months ago 2:29am 17 April 2024 - 🇦🇺Australia pameeela
Closing this issue as no steps to reproduce were ever provided, and it seems something is going wrong rather than being broken.
If anyone is able to reproduce the issue on a fresh install, please create a new issue with clear steps to reproduce, starting with 'Install Drupal'.
- 🇮🇳India Neelanjana Das
we get this error on get() methods. we need to check the field exists with isset() before we use the get() method.