mbin icon indicating copy to clipboard operation
mbin copied to clipboard

Reject of a report causes 500 error message

Open melroy89 opened this issue 1 year ago • 2 comments

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:

  1. Go to 'Admin panel'
  2. Click on 'Reports' tab
  3. Click on 'Reject' button of a specific report on a comment
  4. 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

reject_failure

Desktop (please complete the following information):

  • OS: Linux Mint
  • Browser: Firefox
  • Firefox Version 123.0 (I don't make this version number up)

melroy89 avatar Mar 14 '24 20:03 melroy89

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.

ghost avatar Mar 14 '24 22:03 ghost

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).

melroy89 avatar Mar 15 '24 16:03 melroy89

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.

github-actions[bot] avatar May 29 '24 02:05 github-actions[bot]

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":{}}

melroy89 avatar Jun 29 '24 18:06 melroy89