Warning Improvements by Xon

Warning Improvements by Xon 2.12.5

No permission to download
Would it be possible to add the private conversation made from the warning as a variable in the warning summary phrase? This would allow other moderators to see the conversation sent with it.

edit: Is this similar to the feature request above? Just noticed it, but I'm not sure if I understand it.
^Re: this request from 2019: is there a way to include the text of the Conversation into the thread created by the Warning?

I read through the discussion in 2019-2020 when the option has added to open a Conversation (now DM) in conjunction with issuing the Warning. I read through the related discussions about problems with Conversations with anonymized Warnings. I couldn't find an answer to Feanor's question/request.

When we issue Warnings to members, we include the text of the Code of Conduct with the Warning in the DM that goes to the member. Unfortunately, that citation in the DM isn't recorded with the Warning thread created, so it can only be viewed by the moderator who issued the Warning by finding the DM thread in their Conversations.

Is there a way to record the text of the DM with the Warning thread so that all moderators can review it- either by accessing the Warning on the user profile or by reviewing it directly in the subforum where Warnings are posted?
 
Conversations are basically the wrong tool for working with warnings. It is hard to add new mods en-mass to them, and removing mods means you lose access, etc.

I wrote Warning Acknowledgements add-on to provide an easier way to give more information without using conversations. Something like @Naz's Tickets add-on which can open a ticket for a user would work much saner
 
Last edited:
Hello @Xon ,
After performing urgent updates of PHP and Nginx, and all OS packages :). I also updated XF to version 2031370 (2.3.13), I encountered this plugin error after call function actionWarn().
Did I miss a step, or is the plugin incompatible with this latest version of XF?
Code:
TypeError: SV\WarningImprovements\XF\Service\User\Warn::SV\WarningImprovements\XF\Service\User\{closure}(): Return value must be of type XF\Service\User\Warn, SV\WarningImprovements\XF\Service\User\Warn returned in src/addons/SV/WarningImprovements/XF/Service/User/Warn.php at line 73
and some traceback...

Can you help me?
Thanks.
 
no success after
php cmd.php xf:addon-rebuild [5 plugins, and SV/WarningImprovements ]
php cmd.php xf:rebuild-master-data
 
Any ideas? 😕
Could such an error be caused by the cache?
Maybe the stack trace will help...

TypeError: SV\WarningImprovements\XF\Service\User\Warn::SV\WarningImprovements\XF\Service\User\{closure}(): Return value must be of type XF\Service\User\Warn, SV\WarningImprovements\XF\Service\User\Warn returned in src/addons/SV/WarningImprovements/XF/Service/User/Warn.php at line 73
  1. SV\WarningImprovements\XF\Service\User\Warn->SV\WarningImprovements\XF\Service\User\{closure}() in src/XF.php at line 950
  2. XF::asVisitor() in src/addons/SV/WarningImprovements/Globals.php at line 36
  3. SV\WarningImprovements\Globals::asVisitorWithLang() in src/addons/SV/WarningImprovements/XF/Service/User/Warn.php at line 72
  4. SV\WarningImprovements\XF\Service\User\Warn->setFromDefinition() in src/XF/ControllerPlugin/WarnPlugin.php at line 130
  5. XF\ControllerPlugin\WarnPlugin->setupWarnService() in src/addons/SV/WarningImprovements/XF/ControllerPlugin/Warn.php at line 272
  6. SV\WarningImprovements\XF\ControllerPlugin\Warn->setupWarnService() in src/XF/ControllerPlugin/WarnPlugin.php at line 41
  7. XF\ControllerPlugin\WarnPlugin->actionWarn() in src/addons/SV/WarningImprovements/XF/ControllerPlugin/Warn.php at line 64
  8. SV\WarningImprovements\XF\ControllerPlugin\Warn->actionWarn() in src/XF/Pub/Controller/PostController.php at line 521
  9. XF\Pub\Controller\PostController->actionWarn() in src/XF/Mvc/Dispatcher.php at line 364
  10. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 266
  11. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 121
  12. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 63
  13. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2840
  14. XF\App->run() in src/XF.php at line 850
  15. XF::runApp() in index.php at line 23
 
Try restarting php-fpm/apache or whatever is hosting php.

SV\WarningImprovements\XF\Service\User\Warn extends XF\Service\User\Warn via XF's class proxy system so something is really broken.

:edit: If restarting things doesn't fix it; then this is likely a 3rd party compatibility which is breaking the class proxy system. The best way to narrow that down is to disable XF and non-SV add-ons until it works. then enable them again until it stops working again.
 
Last edited:
After the problem occurred, I restarted nginx and php-fpm multiple times.
it doesnt fix any things.
Disabling all plugins except WarningImprovements with no luck:(
 
What XF and php version?

Because I've been using this exact same add-on on multiple sites across multiple XF versions and multiple php versions and I haven't had this error occur.
 
What XF and php version?

Because I've been using this exact same add-on on multiple sites across multiple XF versions and multiple php versions and I haven't had this error occur.
I use several your plugins :)
Code:
FreeBSD 14.3

XenForo 2.3.13

PHP version    8.3.36
MySQL version    12.3.3 (12.3.3-MariaDB-log)
Server software    nginx/1.30.6

$ php cmd.php  xf:addon-list|grep SV/

  SV/AlertImprovements      Alert Improvements                    2.14.6                      Yes     
  SV/CustomFieldPerms       Custom Fields Permissions             2.8.1                       Yes     
  SV/DailyStatistics        Daily Statistics                      2.3.0                       Yes     
  SV/RedisCache             Redis Cache                           2.18.12                     Yes     
  SV/SignupAbuseBlocking    Signup abuse detection and blocking   1.20.5                      Yes     
  SV/StandardLib            Standard Library                      1.24.11                     Yes     
  SV/StickyAnyPost          Sticky Any Post                       2.5.1                       Yes     
  SV/UserActivity           User Activity                         2.15.0                      Yes     
  SV/WarningImprovements    Warning Improvements                  2.12.5                      Yes
 
Back
Top Bottom