- Issue created by @maicol07
- ๐ฎ๐ณIndia vinodhini.e chennai
vinodhini.e โ made their first commit to this issueโs fork.
- Merge request !13Issue #3539051: TypeError when deleting a content type โ (Open) created by Unnamed author
- ๐ฎ๐ณIndia vinodhini.e chennai
Hi, I have tested this module on Drupal 11.2.2.
I encountered a fatal error when an entity referenced in a menu item was deleted.
To resolve this, I updated the TranslatedMenuLink.php file by making the $entity property nullable and adding a check to ensure both entity_type and entity_id are set before attempting to load the entity.
This avoids the TypeError when the entity is missing or deleted and ensures graceful fallback behavior for title, description, and cache methods.
After applying the changes, the issue is resolved and the menu works correctly without throwing errors.
Please review and let me know if anything further needs to be added or adjusted. Thanks.
Confirming the fix as described in the comment above. Applied the patch, deleted the Article content type on a fresh D10.5.1 installation. No errors.