When deleting a Product having comments, the Comment Dashboard Widget throws an Error:
craft\services\Elements::getElementById() must be of the type int, null given.
Steps to reproduce
Create a product (or an entry)
Add a comment
Delete the product
Show the comment widget on the dashboard
Error!
Additional info
Plugin version: 1.8.4
Craft version: 3.5.18
Multi-site: Yes
Additional context
// /verbb/comments/src/elements/Comment.php
if ($cacheKey && $this->_owner = $renderCache->getElement($cacheKey)) {
return $this->_owner;
}
// ⚠ This line seems to be problematic!
$this->_owner = Craft::$app->getElements()->getElementById($this->ownerId, null, $this->siteId);
if ($this->_owner) {
$renderCache->addElement($cacheKey, $this->_owner);
}
Description
When deleting a Product having comments, the Comment Dashboard Widget throws an Error: craft\services\Elements::getElementById() must be of the type int, null given.
Steps to reproduce
Additional info
Additional context