Warning Improvements by Xon

Warning Improvements by Xon 2.9.5

No permission to download
If you have permission to "view warning issuer", you can see who send the warning. Moderators/admins get that permission by default
 
Hello
Would you consider for the next release also an option to deduct warning points for users that didn’t receive a warning for example for 90 days?
 
You can accomplish something like that by just setting the default warning expiry on the warning to 90 days, and then configure escalating expiry to increase the the suggested expiry by say another 90 days if they have points
 
You can accomplish something like that by just setting the default warning expiry on the warning to 90 days, and then configure escalating expiry to increase the the suggested expiry by say another 90 days if they have points
I would like to make this general regardless the last warning they received
 
how do i make it so i can bạn users and they’re still able to view threads and post in ban appeal section?
This requires a few steps:
  • A new user group, "suspended"
  • On the top level of your forum for each group of nodes you do not want them to post:
    • Set "reply" and "post new thread" (and probably delete/edit/etc) permissions to "No" not "inherit"
  • On the forum you want them to post in, set the above permissions to "yes"
  • Apply this group so the user is suspended in two ways:
    1. Warnings on applying points also apply the "suspended" user-group
    2. Warning Action to apply the "suspended" user-group while the user's point total is above X value.
 
Hello,

I am getting this warning nonstop. Could you please take a look?

1705743056791.webp

Code:
#0 [internal function]: XF\Template\Templater->handleTemplateError(512, '[E_USER_WARNING...', '/var/www/fastus...', 1179)
#1 src/XF/Template/Templater.php(1179): trigger_error('Cannot call met...', 512)
#2 internal_data/code_cache/templates/l1/s3/public/message_macros.php(75): XF\Template\Templater->method(NULL, 'getFormattedVal...', Array)
#3 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, NULL)
#4 internal_data/code_cache/templates/l1/s3/public/post_macros.php(25): XF\Template\Templater->callMacro('message_macros', 'user_info', Array, Array)
#5 src/XF/Template/Templater.php(990): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#6 src/XF/Template/Templater.php(926): XF\Template\Templater->renderExtensionInternal('user_cell', Array, Array, Object(XF\Template\ExtensionSet))
#7 internal_data/code_cache/templates/l1/s3/public/post_macros.php(167): XF\Template\Templater->renderExtension('user_cell', Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Templater.php(990): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#9 src/XF/Template/Templater.php(926): XF\Template\Templater->renderExtensionInternal('full_body', Array, Array, Object(XF\Template\ExtensionSet))
#10 internal_data/code_cache/templates/l1/s3/public/post_macros.php(220): XF\Template\Templater->renderExtension('full_body', Array, Object(XF\Template\ExtensionSet))
#11 src/XF/Template/Templater.php(827): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#12 internal_data/code_cache/templates/l1/s3/public/thread_view.php(883): XF\Template\Templater->callMacro('post_macros', 'post', Array, Array)
#13 src/XF/Template/Templater.php(1654): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#14 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#15 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#16 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#17 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#18 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#19 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#20 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#21 src/XF.php(524): XF\App->run()
#22 index.php(20): XF::runApp('XF\\Pub\\App')
#23 {main}
 
That is unrelated to my add-ons, it is extremely rare for the object being extended and then showing up in the call stack as a function argument to matter.

The issue is whatever is inserting a template modification here;
internal_data/code_cache/templates/l1/s3/public/message_macros.php(75)

You should be able to use the "view template modifications" link on the template and see what template modification is added a call to getFormatterValue. This might always be added via a custom template edit.
 
Since applying the last updates, we're seeing errors that reference Warning Improvements and Search Improvements:

Code:
Server error log

    TypeError: Extension public:thread_view :: structured_data() error: XF\ThreadType\AbstractHandler::isPostVotingSupported(): Argument #2 ($post) must be of type XF\Entity\Post, null given, called in /var/www/live/src/XF/ThreadType/AbstractHandler.php on line 321 src/XF/ThreadType/AbstractHandler.php:506

Stack trace

#0 src/XF/ThreadType/AbstractHandler.php(321): XF\ThreadType\AbstractHandler->isPostVotingSupported(Object(SV\SearchImprovements\XF\Entity\ThreadCollab), NULL)
#1 src/XF/Entity/Thread.php(929): XF\ThreadType\AbstractHandler->getLdStructuredData(Object(SV\SearchImprovements\XF\Entity\ThreadCollab), Object(SV\WarningImprovements\XF\Entity\Post), 1, Array)
#2 src/XF/Template/Templater.php(1195): XF\Entity\Thread->getLdStructuredData(Object(SV\WarningImprovements\XF\Entity\Post), 1, Array)
#3 internal_data/code_cache/templates/l1/s1/public/thread_view.php(13): XF\Template\Templater->method(Object(SV\SearchImprovements\XF\Entity\ThreadCollab), 'getLdStructured...', Array)
#4 src/XF/Template/Templater.php(991): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#5 src/XF/Template/Templater.php(927): XF\Template\Templater->renderExtensionInternal('structured_data', Array, Array, Object(XF\Template\ExtensionSet))
#6 internal_data/code_cache/templates/l1/s1/public/thread_view.php(684): XF\Template\Templater->renderExtension('structured_data', Array, Object(XF\Template\ExtensionSet))
#7 src/XF/Template/Templater.php(1655): XF\Template\Templater->{closure}(Object(SV\WarningImprovements\XF\Template\Templater), Array, Object(XF\Template\ExtensionSet))
#8 src/XF/Template/Template.php(24): XF\Template\Templater->renderTemplate('thread_view', Array)
#9 src/XF/Mvc/Renderer/Html.php(50): XF\Template\Template->render()
#10 src/XF/Mvc/Dispatcher.php(460): XF\Mvc\Renderer\Html->renderView('XF:Thread\\View', 'public:thread_v...', Array)
#11 src/XF/Mvc/Dispatcher.php(442): XF\Mvc\Dispatcher->renderView(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#12 src/XF/Mvc/Dispatcher.php(402): XF\Mvc\Dispatcher->renderReply(Object(XF\Mvc\Renderer\Html), Object(XF\Mvc\Reply\View))
#13 src/XF/Mvc/Dispatcher.php(60): XF\Mvc\Dispatcher->render(Object(XF\Mvc\Reply\View), 'html')
#14 src/XF/App.php(2487): XF\Mvc\Dispatcher->run()
#15 src/XF.php(524): XF\App->run()
#16 index.php(20): XF::runApp('XF\\Pub\\App')
#17 {main}
 
That is unrelated to Warning Improvements or Search Improvements. You have a customized thread_view template (or perhaps related to another thread type) which is incorrectly passing data to the structured_data template extension block.

This was changed in XF2.2.15, so it is likely something didn't merge correctly
 
Back
Top Bottom