Reject of a report causes 500 error message
Describe the bug
Pressing 'Reject' on a report in the Mbin admin panel causes errors (see below).
On which Mbin instance did you find the bug? kbin.melroy.org
Which Mbin version was running on the instance? v1.4.1
To Reproduce Steps to reproduce the behavior:
- Go to 'Admin panel'
- Click on 'Reports' tab
- Click on 'Reject' button of a specific report on a comment
- You will see "500" internal error.
Of course in development mode you see the real error message/stack:
LogicException:
at src/Factory/ContentManagerFactory.php:36
at App\Factory\ContentManagerFactory->createManager()
(src/Service/ReportManager.php:54)
at App\Service\ReportManager->reject()
(src/Controller/Magazine/Panel/MagazineReportController.php:67)
at App\Controller\Magazine\Panel\MagazineReportController->reportReject()
(vendor/symfony/http-kernel/HttpKernel.php:181)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:197)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/var/www/kbin.melroy.org/html/vendor/autoload_runtime.php')
(public/index.php:7)
Expected behavior
No errors :). The report should just close itself when pressing "Reject".
Screenshots
Desktop (please complete the following information):
- OS: Linux Mint
- Browser: Firefox
- Firefox Version 123.0 (I don't make this version number up)
I can't replicate this, although I think I might know what it is.... has the reported comment already been deleted/removed by a remote moderator? I've seen this happen where our report manager doesn't update to discard a remote comment/thread/etc that's already been removed, so it tries to reference something that doesn't exist.
Yesn't no the comment is still present on both my server (kbin.melroy.org) as well as the remote server (at least the real origin remote server: mas.to). The author of the comment is also a local user, the reporter is a remote user (which is again from another remote server: babka.social).
EDIT: yes the comment is removed from that other remote server (babka.social).
This issue is stale because it has been open 50 days with no activity. Remove stale label or comment or this will be closed in 6 days.
I can still replicate it today. So if you need more info BentiGorlich, just let me know:
{"message":"Uncaught PHP Exception LogicException: \"\" at ContentManagerFactory.php line 36","context":{"exception":{"class":"LogicException","message":"","code":0,"file":"/var/www/kbin.melroy.org/html/src/Factory/ContentManagerFactory.php:36"}},"level":500,"level_name":"CRITICAL","channel":"request","datetime":"2024-06-29T20:33:14.949629+02:00","extra":{}}