[Xen-Soluce] Disallow Links

[Xen-Soluce] Disallow Links [Paid] 2.0.2 Fix 4

No permission to buy (€5.00)

XenSoluce

Well-known member
XenSoluce submitted a new resource:

[Xen-Soluce] Disallow Links in Profile Posts - Disable members from posting links in the profile posts

Description :
  • This add-on allow you to disable members from posting links in the profile posts.
Feature summary :
  • Options :
    • Websites excluded
  • Permissions :
    • User : Can post link
Branding :
  • This add-on does not include branding.
Installation :
  • Download and unzip it.
  • Copy the src/addons/XenSoluce/DisallowLinksProfilePosts directory to your server.
  • From the...

Read more about this resource...
 
Hi @XenSoluce,

Can you confirm if this works for threads?

I have a situation where I want to allow a NODE open for guests to post in, but not allow links to be posted by non members (to prevent spam or trolls).

Also do you accept payment other than PayPal?

Thanks :)
 
Not sure what happens in this situation, but this addon seems to break @Xon warning improvements. Hopefully between the two developers something can be diagnosed somewhere

When trying to post a warning:

Code:
Server error log

    LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: You are not allowed to post a link here.) src/XF/Service/ValidateAndSavableTrait.php:34

    Generated by: Pete Thomas Jun 5, 2020 at 12:47 PM

Stack trace

#0 src/addons/SV/WarningImprovements/XF/Service/User/Warn.php(165): XF\Service\Thread\Creator->save()
#1 src/XF.php(479): SV\WarningImprovements\XF\Service\User\Warn->SV\WarningImprovements\XF\Service\User\{closure}()
#2 src/addons/SV/WarningImprovements/XF/Service/User/Warn.php(168): XF::asVisitor(Object(SV\WarningImprovements\XF\Entity\User), Object(Closure))
#3 src/addons/SV/WarningImprovements/XF/Service/User/Warn.php(104): SV\WarningImprovements\XF\Service\User\Warn->warningActionNotifications()
#4 src/XF/Service/ValidateAndSavableTrait.php(40): SV\WarningImprovements\XF\Service\User\Warn->_save()
#5 src/XF/ControllerPlugin/Warn.php(41): XF\Service\User\Warn->save()
#6 src/addons/SV/WarningImprovements/XF/ControllerPlugin/Warn.php(39): XF\ControllerPlugin\Warn->actionWarn('post', Object(XFMG\XF\Entity\Post), '/posts/383397/w...', Array)
#7 src/XF/Pub/Controller/Post.php(404): SV\WarningImprovements\XF\ControllerPlugin\Warn->actionWarn('post', Object(XFMG\XF\Entity\Post), '/posts/383397/w...', Array)
#8 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Post->actionWarn(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'Warn', Object(XF\Mvc\RouteMatch), Object(LiamW\ThreadSolutions\XF\Pub\Controller\Post), NULL)
#10 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(LiamW\ThreadSolutions\XF\Pub\Controller\Post), NULL)
#11 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#13 src/XF.php(391): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}

Request state

array(4) {
  ["url"] => string(18) "/posts/383397/warn"
  ["referrer"] => string(47) "https://xf2.cafesaxophone.com/posts/383397/warn"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["warning_definition_id"] => string(2) "14"
    ["custom_title"] => string(83) "Miscellaneous User Warning (edit this title, e.g. offensive, copyright or whatever)"
    ["points_enable"] => string(1) "1"
    ["points"] => string(1) "3"
    ["notes"] => string(0) ""
    ["content_action"] => string(0) ""
    ["send_warning_alert"] => string(1) "1"
    ["_xfRedirect"] => string(55) "https://xf2.cafesaxophone.com/threads/im-testing.25965/"
    ["filled_warning_definition_id"] => string(2) "14"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(18) "/posts/383397/warn"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
Not sure what happens in this situation, but this addon seems to break @Xon warning improvements. Hopefully between the two developers something can be diagnosed somewhere

When trying to post a warning:

Code:
Server error log

    LogicException: Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: You are not allowed to post a link here.) src/XF/Service/ValidateAndSavableTrait.php:34

    Generated by: Pete Thomas Jun 5, 2020 at 12:47 PM

Stack trace

#0 src/addons/SV/WarningImprovements/XF/Service/User/Warn.php(165): XF\Service\Thread\Creator->save()
#1 src/XF.php(479): SV\WarningImprovements\XF\Service\User\Warn->SV\WarningImprovements\XF\Service\User\{closure}()
#2 src/addons/SV/WarningImprovements/XF/Service/User/Warn.php(168): XF::asVisitor(Object(SV\WarningImprovements\XF\Entity\User), Object(Closure))
#3 src/addons/SV/WarningImprovements/XF/Service/User/Warn.php(104): SV\WarningImprovements\XF\Service\User\Warn->warningActionNotifications()
#4 src/XF/Service/ValidateAndSavableTrait.php(40): SV\WarningImprovements\XF\Service\User\Warn->_save()
#5 src/XF/ControllerPlugin/Warn.php(41): XF\Service\User\Warn->save()
#6 src/addons/SV/WarningImprovements/XF/ControllerPlugin/Warn.php(39): XF\ControllerPlugin\Warn->actionWarn('post', Object(XFMG\XF\Entity\Post), '/posts/383397/w...', Array)
#7 src/XF/Pub/Controller/Post.php(404): SV\WarningImprovements\XF\ControllerPlugin\Warn->actionWarn('post', Object(XFMG\XF\Entity\Post), '/posts/383397/w...', Array)
#8 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Post->actionWarn(Object(XF\Mvc\ParameterBag))
#9 src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass('XF:Post', 'Warn', Object(XF\Mvc\RouteMatch), Object(LiamW\ThreadSolutions\XF\Pub\Controller\Post), NULL)
#10 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(LiamW\ThreadSolutions\XF\Pub\Controller\Post), NULL)
#11 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#13 src/XF.php(391): XF\App->run()
#14 index.php(20): XF::runApp('XF\\Pub\\App')
#15 {main}

Request state

array(4) {
  ["url"] => string(18) "/posts/383397/warn"
  ["referrer"] => string(47) "https://xf2.cafesaxophone.com/posts/383397/warn"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(13) {
    ["warning_definition_id"] => string(2) "14"
    ["custom_title"] => string(83) "Miscellaneous User Warning (edit this title, e.g. offensive, copyright or whatever)"
    ["points_enable"] => string(1) "1"
    ["points"] => string(1) "3"
    ["notes"] => string(0) ""
    ["content_action"] => string(0) ""
    ["send_warning_alert"] => string(1) "1"
    ["_xfRedirect"] => string(55) "https://xf2.cafesaxophone.com/threads/im-testing.25965/"
    ["filled_warning_definition_id"] => string(2) "14"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(18) "/posts/383397/warn"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
Hello,

Are you sure this is from our addon? Because there's nothing in this error that refers to our addon.

Regards, CRUEL-MODZ
 
Hello,

Are you sure this is from our addon? Because there's nothing in this error that refers to our addon.

Regards, CRUEL-MODZ
See top of error: (First error: You are not allowed to post a link here.) That is a phrase from Disallow Links.

If I disable Disallow links, I get no error and the warning works as usual.
 
Any threads/posts by my Warning improvements add-on are marked with \XF\Service\Thread\Creator::setIsAutomated. You'll break functionality in XF and other add-ons if you apply blocking links on automatically created posts.
 
Yes, it's true! You get that mistake when you do what?

When I try to issue a warning. After ticking the various warning parameters, click on the Warn buttion and I get the error. With this addon disabled the warning gets applied as normal.
 
Any threads/posts by my Warning improvements add-on are marked with \XF\Service\Thread\Creator::setIsAutomated. You'll break functionality in XF and other add-ons if you apply blocking links on automatically created posts.

OK thanks xon. So the point is actually moot. I was just testing with all usergroups not allowed to post links, in normal use of course mods and admins will be allowed to post a link and in that case all is fine.

When I allow posting of links for myself, and issue a warning it all works.

It's not a conflict with the addon per se, rather it's an issue in the unlikely scenraio of someone not having permission to post a link, but with permission to issue a warning.
 
Hello,

I installed this mod but users can post new threads with links, however they cannot if replying to a thread etc.

If possible, could you please make it so new threads with links cannot be posted? We receive a lot of spam and I am installing this to prevent it.

Thanks
 
Yes, I downloaded 2.0.2 Fix 2 (first time install)

Does the mod disallow links on new thread creation?

Thanks
 
Back
Top Bottom