- Issue created by @blacksnipe
- 🇧🇪Belgium blacksnipe
Added initial patch for quick fix, but I cannot guarantee the issue's fixed at the root.
We have the module installed on a site with commerce integration. However, when we go through the checkout of the site, we see logs along the lines of
TypeError: _ckeditor_mentions_entity_collect_mentions(): Argument #1 ($entity) must be of type Drupal\Core\Entity\ContentEntityInterface, null given, called in /web/modules/contrib/ckeditor_mentions/modules/ckeditor_mentions_entity/ckeditor_mentions_entity.module on line 107 in _ckeditor_mentions_entity_collect_mentions() (line 17 of /web/modules/contrib/ckeditor_mentions/modules/ckeditor_mentions_entity/ckeditor_mentions_entity.module).
Set parameter one to nullable like so
function _ckeditor_mentions_entity_collect_mentions(?ContentEntityInterface $entity) {
if (!$entity) {
return [];
}
// Rest of the code
}
None.
None.
None.
None.
Active
3.0
Code
Added initial patch for quick fix, but I cannot guarantee the issue's fixed at the root.