- Issue created by @Foxy-vikvik
- Merge request !9Issue #3408968: Added condition if empty $fieldDefinition CommentDeleteManager β (Closed) created by Foxy-vikvik
- Status changed to Needs review
about 1 year ago 7:45am 15 December 2023 - πΊπΈUnited States robphillips
The field definition should never be null so this patch is not correct. Take a look at the lines immediately before your changes (shown below). If the comment entity doesn't have a field something in your sites entity or configuration is broken.
$commentedEntity = $comment->getCommentedEntity(); /** @var \Drupal\field\FieldConfigInterface $fieldDefinition */ $fieldDefinition = $commentedEntity->getFieldDefinition($comment->getFieldName());
If you could provide steps to replicate on a fresh installation I will reopen.
- Status changed to Postponed: needs info
about 1 year ago 1:34pm 15 December 2023 - πΊπ¦Ukraine Foxy-vikvik
Steps to reproduce:
- In content type we had one comment type - with a "text plain" field
- Some comment entities were created
- We need to change "text plain" to "text field formatted - need CKEditor" that's why we created a new comment type (prev we use in other content types)
- I have removed comment field with plain text and created with formatted
and in the /admin/content/comment found an issueThe website encountered an unexpected error. Please try again later. Error: Call to a member function getSetting() on null in Drupal\comment_delete\CommentDeleteManager->getConfig() (line 121 of modules/contrib/comment_delete/src/CommentDeleteManager.php).
- πΊπ¦Ukraine Foxy-vikvik
I know it looks like an exception but It may happen
- Status changed to Active
23 days ago 6:54pm 10 December 2024