humhub / reportcontent

This module allows users to report posts to space and super admins.
15 stars 15 forks source link

Report Notification of Deleted Content - Lead Internal Error #77

Open luke- opened 7 months ago

luke- commented 7 months ago
  1. Delete Reported Content
  2. Click on the E-Mail Notification "XYZ has reported post...:" -> View Online
  3. Internal Error

Message:

yii\base\ErrorException: Attempt to read property "content_id" on null in /srv/www/htdocs/community/modules/reportcontent/notifications/NewReportAdmin.php:94
Stack trace:
#0 /srv/www/htdocs/community/modules/reportcontent/notifications/NewReportAdmin.php(94): yii\base\ErrorHandler->handleError()
#1 /srv/www/htdocs/community/modules/reportcontent/notifications/NewReportAdmin.php(63): humhub\modules\reportcontent\notifications\NewReportAdmin->getReportedRecord()
#2 /srv/humhub/protected/humhub/modules/notification/controllers/EntryController.php(61): humhub\modules\reportcontent\notifications\NewReportAdmin->getUrl()
#3 [internal function]: humhub\modules\notification\controllers\EntryController->actionIndex()
#4 /srv/humhub/protected/vendor/yiisoft/yii2/base/InlineAction.php(58): call_user_func_array()
#5 /srv/humhub/protected/vendor/yiisoft/yii2/base/Controller.php(179): yii\base\InlineAction->runWithParams()
#6 /srv/humhub/protected/vendor/yiisoft/yii2/base/Module.php(553): yii\base\Controller->runAction()
#7 /srv/humhub/protected/vendor/yiisoft/yii2/web/Application.php(104): yii\base\Module->runAction()
#8 /srv/humhub/protected/vendor/yiisoft/yii2/base/Application.php(385): yii\web\Application->handleRequest()
#9 /srv/www/htdocs/community/index.php(24): yii\base\Application->run()
#10 {main}
ArchBlood commented 6 months ago

Should be fixed in #79 although I see another issue is that the notification isn't deleted as well. 🤔