Easy User Ban 2 by Siropu

Easy User Ban 2 by Siropu [Paid] 2.1.2

No permission to buy (€19.99)
It is set for the banned users page. Go to the widgets section in ACP to set other positions as well.
 
Current XF 2, latest of this version, error when trying to temp ban using the one hour option, upgrading from the xf1 version. Not sure why the end date would be required when using the one hour available option:

Code:
Server error log
[LIST]
[*]XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'end_date' in 'field list'
[*] 
[*]src/XF/Db/AbstractStatement.php:212
[*]Generated by: anthony
[*] 
[*]Jun 1, 2018 at 7:59 PM
[/LIST]
Stack trace

INSERT  INTO `xf_siropu_easy_user_ban_log` (`action`, `action_user_id`, `action_reason`, `user_id`, `end_date`, `ips`, `date`) VALUES (?, ?, ?, ?, ?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(159): XF\Db\AbstractAdapter->query('INSERT  INTO `x...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1389): XF\Db\AbstractAdapter->insert('xf_siropu_easy_...', Array, false)
#6 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/addons/Siropu/EasyUserBan/Service/Moderator.php(97): XF\Mvc\Entity\Entity->save()
#8 src/addons/Siropu/EasyUserBan/Service/Moderator.php(54): Siropu\EasyUserBan\Service\Moderator->logAction('ban')
#9 src/addons/Siropu/EasyUserBan/XF/Pub/Controller/Member.php(207): Siropu\EasyUserBan\Service\Moderator->ban()
#10 src/XF/Mvc/Dispatcher.php(249): Siropu\EasyUserBan\XF\Pub\Controller\Member->actionQuickBan(Object(XF\Mvc\ParameterBag))
#11 src/XF/Mvc/Dispatcher.php(87): XF\Mvc\Dispatcher->dispatchClass('XF:Member', 'QuickBan', 'json', Object(XF\Mvc\ParameterBag), 'members', Object(Siropu\EasyUserBan\XF\Pub\Controller\Member), NULL)
#12 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#13 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#14 src/XF.php(328): XF\App->run()
#15 index.php(13): XF::runApp('XF\\Pub\\App')
#16 {main}

Request state

array(4) {
  ["url"] => string(32) "/members/modtest.32385/quick-ban"
  ["referrer"] => string(74) "https://www.ptsdnews.com/threads/what-happens-if-i-push-this-button.67095/"
  ["_GET"] => array(1) {
    ["/members/modtest_32385/quick-ban"] => string(0) ""
  }
  ["_POST"] => array(11) {
    ["ban_length"] => string(4) "temp"
    ["length_value"] => string(1) "1"
    ["length_unit"] => string(5) "hours"
    ["end_date"] => string(0) ""
    ["reason"] => string(24) "JoeyLittle reason one..."
    ["ban_reason"] => string(24) "JoeyLittle reason one..."
    ["ban_ip"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(50) "/threads/what-happens-if-i-push-this-button.67095/"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
You seem to have upgraded from an older version of XF1 Easy User Ban that doesn't have that field. This can be fixed by adding end_date (unsigned int) field to xf_siropu_easy_user_ban_log table. Please send me a PM if you need help with that.
 
Top Bottom