Report Improvements by Xon

Report Improvements by Xon 2.18.3

No permission to download
Hi,

I am running:
XenForo v2.2.2
PHP version7.4.21
MySQL version10.3.29 (10.3.29-MariaDB-0ubuntu0.20.04.1)
i get following Error during the istallation:


Code:
ErrorException: [E_WARNING] Declaration of SV\ReportImprovements\XF\Repository\Warning::processExpiredWarningsForUser(XF\Entity\User $user, bool $checkBannedStatus): bool should be compatible with SV\WarningImprovements\XF\Repository\Warning::processExpiredWarningsForUser(XF\Entity\User $user, $checkBannedStatus) in src/addons/SV/ReportImprovements/XF/Repository/Warning.php at line 31
XF::handlePhpError() in src/vendor/composer/ClassLoader.php at line 444
include() in src/vendor/composer/ClassLoader.php at line 444
Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 322
Composer\Autoload\ClassLoader->loadClass()
spl_autoload_call()
class_exists() in src/XF/Extension.php at line 172
XF\Extension->extendClass() in src/XF/Mvc/Entity/Manager.php at line 255
XF\Mvc\Entity\Manager->getRepository() in src/XF/Mvc/Entity/Entity.php at line 1963
XF\Mvc\Entity\Entity->repository() in src/XF/Entity/Warning.php at line 285
XF\Entity\Warning->getWarningRepo() in src/XF/Entity/Warning.php at line 77
XF\Entity\Warning->getHandler() in src/XF/Entity/Warning.php at line 85
XF\Entity\Warning->getContent() in src/XF/Mvc/Entity/Entity.php at line 157
XF\Mvc\Entity\Entity->get() in src/XF/Mvc/Entity/Entity.php at line 110
XF\Mvc\Entity\Entity->__get() in src/addons/SV/ReportImprovements/Service/WarningLog/Creator.php at line 250
SV\ReportImprovements\Service\WarningLog\Creator->setupDefaultsForWarning() in src/addons/SV/ReportImprovements/Service/WarningLog/Creator.php at line 168
SV\ReportImprovements\Service\WarningLog\Creator->setupDefaults() in src/addons/SV/ReportImprovements/Service/WarningLog/Creator.php at line 97
SV\ReportImprovements\Service\WarningLog\Creator->__construct() in src/XF/Container.php at line 270
XF\Container->createObject() in src/XF/App.php at line 1665
XF\App->XF\{closure}() in src/XF/Container.php at line 228
XF\Container->create() in src/XF/App.php at line 2953
XF\App->service() in src/addons/SV/ReportImprovements/Job/WarningLogMigration.php at line 67
SV\ReportImprovements\Job\WarningLogMigration->SV\ReportImprovements\Job\{closure}() in src/XF.php at line 589
XF::asVisitor() in src/addons/SV/ReportImprovements/Job/WarningLogMigration.php at line 80
SV\ReportImprovements\Job\WarningLogMigration->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 47
XF\Job\AbstractRebuildJob->run() in src/XF/Job/Manager.php at line 258
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 200
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 116
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2300
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13
 
Last edited:
Hi,

I am running:
XenForo v2.2.2
PHP version7.4.21
MySQL version10.3.29 (10.3.29-MariaDB-0ubuntu0.20.04.1)
i get following Error during the istallation:


Code:
ErrorException: [E_WARNING] Declaration of SV\ReportImprovements\XF\Repository\Warning::processExpiredWarningsForUser(XF\Entity\User $user, bool $checkBannedStatus): bool should be compatible with SV\WarningImprovements\XF\Repository\Warning::processExpiredWarningsForUser(XF\Entity\User $user, $checkBannedStatus) in src/addons/SV/ReportImprovements/XF/Repository/Warning.php at line 31
XF::handlePhpError() in src/vendor/composer/ClassLoader.php at line 444
include() in src/vendor/composer/ClassLoader.php at line 444
Composer\Autoload\includeFile() in src/vendor/composer/ClassLoader.php at line 322
Composer\Autoload\ClassLoader->loadClass()
spl_autoload_call()
class_exists() in src/XF/Extension.php at line 172
XF\Extension->extendClass() in src/XF/Mvc/Entity/Manager.php at line 255
XF\Mvc\Entity\Manager->getRepository() in src/XF/Mvc/Entity/Entity.php at line 1963
XF\Mvc\Entity\Entity->repository() in src/XF/Entity/Warning.php at line 285
XF\Entity\Warning->getWarningRepo() in src/XF/Entity/Warning.php at line 77
XF\Entity\Warning->getHandler() in src/XF/Entity/Warning.php at line 85
XF\Entity\Warning->getContent() in src/XF/Mvc/Entity/Entity.php at line 157
XF\Mvc\Entity\Entity->get() in src/XF/Mvc/Entity/Entity.php at line 110
XF\Mvc\Entity\Entity->__get() in src/addons/SV/ReportImprovements/Service/WarningLog/Creator.php at line 250
SV\ReportImprovements\Service\WarningLog\Creator->setupDefaultsForWarning() in src/addons/SV/ReportImprovements/Service/WarningLog/Creator.php at line 168
SV\ReportImprovements\Service\WarningLog\Creator->setupDefaults() in src/addons/SV/ReportImprovements/Service/WarningLog/Creator.php at line 97
SV\ReportImprovements\Service\WarningLog\Creator->__construct() in src/XF/Container.php at line 270
XF\Container->createObject() in src/XF/App.php at line 1665
XF\App->XF\{closure}() in src/XF/Container.php at line 228
XF\Container->create() in src/XF/App.php at line 2953
XF\App->service() in src/addons/SV/ReportImprovements/Job/WarningLogMigration.php at line 67
SV\ReportImprovements\Job\WarningLogMigration->SV\ReportImprovements\Job\{closure}() in src/XF.php at line 589
XF::asVisitor() in src/addons/SV/ReportImprovements/Job/WarningLogMigration.php at line 80
SV\ReportImprovements\Job\WarningLogMigration->rebuildById() in src/XF/Job/AbstractRebuildJob.php at line 47
XF\Job\AbstractRebuildJob->run() in src/XF/Job/Manager.php at line 258
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 200
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 116
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2300
XF\App->run() in src/XF.php at line 488
XF::runApp() in admin.php at line 13
Update the Warning Improvements add-on
 
Hi @Xon
For some reason, old, uncommented reports are not getting auto-expired.
I've got Days Until Auto Resolve set to 13 and have tried both of the Auto Resolve Action options.
1627642431651.webp
1627642473462.webp

I've had a quick look at the code and ran the query which gathers the batches of users and it seems to work correctly, resulting in several rows in the result. The cron entry is enabled and doesn't resolve any reports, even when run manually.
 
Hi @Xon
For some reason, old, uncommented reports are not getting auto-expired.
I've got Days Until Auto Resolve set to 13 and have tried both of the Auto Resolve Action options.
View attachment 255372
View attachment 255373

I've had a quick look at the code and ran the query which gathers the batches of users and it seems to work correctly, resulting in several rows in the result. The cron entry is enabled and doesn't resolve any reports, even when run manually.

Make sure svReportImpro_expireUserId (Reporter, will rename to "Comment Reporter" next update) is set to a valid user, or userId 1 exists.

Otherwise, try patching the src/addons/SV/ReportImprovements/Job/ResolveInactiveReport.php file with this version;

It will log to the XF error log if configuration isn't correct and any errors rather than silently failing.
 
Make sure svReportImpro_expireUserId (Reporter, will rename to "Comment Reporter" next update) is set to a valid user, or userId 1 exists.

Otherwise, try patching the src/addons/SV/ReportImprovements/Job/ResolveInactiveReport.php file with this version;

It will log to the XF error log if configuration isn't correct and any errors rather than silently failing.
Thanks. I changed the Reporter user - I had it set to "administrator" (user 1) which we don't generally use and probably doesn't have the required permissions set. I think the behaviour only changed after we upgraded to 2.2.

I did that change, manually ran the cron job and didn't see any difference, so swapped that updated file in and tried again. No error messages and no immediate change to reports.

I went back 15 minutes later and the expiry had worked, so I guess the cron job took some time to get going.
Down from 130 report to 16 now!

Many thanks for your help with this, @Xon, it's very much appreciated!
 
  • Like
Reactions: Xon
Looks like quotes aren't being stripped when displaying search results. Probably a bug.

OK, so this is displaying reported content. Which can include quotes which do matter. I'm not really sure there is a great solution tbh
 
Last edited:
Xon updated Report Improvements by Xon with a new update entry:

2.10.5 - Feature update

  • If installed, strongly recommend updating to Warning Improvements v2.7.3+ after installing this add-on
  • If installed, strongly recommend updating to Report Centre Essentials v2.6.4+ after installing this add-on
  • Fix incorrectly stating a new report will be created when issuing a warning
  • Fix edge case where report resolve alerts where not sent as expected...

Read the rest of this update entry...
 
My version might be out of date, but is/could there be a way to turn off the reports generated on reply ban? I like the add-on otherwise, but the reply ban reports are annoying since I use reply ban for other purposes.
 
Logging reply-bans to reports has been there for a while.

You should be able to make it resolve the reports on issuing a reply ban which will at least make the report stop off the active list.
 
@Xon Why Warnings report are not closed with this update? We have all Warnings report are opened with this update.
There was some tightening of permission checks to only resolve reports a moderator could actually resolve when issuing warnings.

Make sure the "Resolve Report on Warning" is set (so the option is set by default), and the moderators have the "Update Report" permission is granted. They will need to view the report too.

Do you have Report Centre Essentials? If so there is a "Analyze permissions" option to check a moderator's permission for the report queues. Otherwise the global permissions check should work.
 
Last edited:
  • Error: Call to a member function hydrateRelation() on null
  • src/addons/SV/ReportImprovements/Repository/ReportQueue.php:83

Stack trace​

#0 src/addons/SV/ReportImprovements/XF/Pub/Controller/Report.php(125): SV\ReportImprovements\Repository\ReportQueue->addReplyBansToComments(Object(XF\Mvc\Entity\ArrayCollection))
#1 src/XF/Mvc/Dispatcher.php(352): SV\ReportImprovements\XF\Pub\Controller\Report->actionView(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'View', Object(XF\Mvc\RouteMatch), Object(SV\ReportImprovements\XF\Pub\Controller\Report), Object(XF\Mvc\Reply\Reroute))
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ReportImprovements\XF\Pub\Controller\Report), Object(XF\Mvc\Reply\Reroute))
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#6 src/XF.php(512): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
 
There was some tightening of permission checks to only resolve reports a moderator could actually resolve when issuing warnings.

Make sure the "Resolve Report on Warning" is set (so the option is set by default), and the moderators have the "Update Report" permission is granted. They will need to view the report too.

Do you have Report Centre Essentials? If so there is a "Analyze permissions" option to check a moderator's permission for the report queues. Otherwise the global permissions check should work.

All are set by default. This issue happened after 2.10.5 update. We have not Report Centre Essentials.
 
  • Error: Call to a member function hydrateRelation() on null
  • src/addons/SV/ReportImprovements/Repository/ReportQueue.php:83

Stack trace​

#0 src/addons/SV/ReportImprovements/XF/Pub/Controller/Report.php(125): SV\ReportImprovements\Repository\ReportQueue->addReplyBansToComments(Object(XF\Mvc\Entity\ArrayCollection))
#1 src/XF/Mvc/Dispatcher.php(352): SV\ReportImprovements\XF\Pub\Controller\Report->actionView(Object(XF\Mvc\ParameterBag))
#2 src/XF/Mvc/Dispatcher.php(259): XF\Mvc\Dispatcher->dispatchClass('XF\\Pub\\Controll...', 'View', Object(XF\Mvc\RouteMatch), Object(SV\ReportImprovements\XF\Pub\Controller\Report), Object(XF\Mvc\Reply\Reroute))
#3 src/XF/Mvc/Dispatcher.php(115): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(SV\ReportImprovements\XF\Pub\Controller\Report), Object(XF\Mvc\Reply\Reroute))
#4 src/XF/Mvc/Dispatcher.php(57): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#5 src/XF/App.php(2345): XF\Mvc\Dispatcher->run()
#6 src/XF.php(512): XF\App->run()
#7 index.php(20): XF::runApp('XF\\Pub\\App')
#8 {main}
Fixed for the next version.

All are set by default. This issue happened after 2.10.5 update. We have not Report Centre Essentials.
Can you do the permission check? There was a fix around ensuring it fully respected permissions.
 
Top Bottom