Fixed Error on inline moderation, unapproved post

Affected version
2.0 Beta 6
#1
Hello, I upgrade from Beta 5 to Beta 6 and now i see this error. I do not think I saw it in beta 5.

The error appear on ramdom messages, that is, not always.

Code:
XF\Db\Exception: MySQL query error [1264]: Out of range value for column 'position' at row 1 src/XF/Db/AbstractStatement.php:183
Generated by: admin Oct 12, 2017 at 1:07 AM

Stack trace
#0 src/XF/Db/Mysqli/Statement.php(66): XF\Db\AbstractStatement->getException('MySQL query err...', 1264)
#1 src/XF/Db/AbstractAdapter.php(67): XF\Db\Mysqli\Statement->execute()
#2 src/XF/Db/AbstractAdapter.php(227): XF\Db\AbstractAdapter->query('UPDATE  xf_post...', Array)
#3 src/XF/Mvc/Entity/Entity.php(1179): XF\Db\AbstractAdapter->update('xf_post', Array, '`post_id` = 556...')
#4 src/XF/Entity/Post.php(617): XF\Mvc\Entity\Entity->fastUpdate('position', -1)
#5 src/XF/Entity/Post.php(421): XF\Entity\Post->postHidden()
#6 src/XF/Mvc/Entity/Entity.php(1109): XF\Entity\Post->_postSave()
#7 src/XF/InlineMod/Post.php(55): XF\Mvc\Entity\Entity->save()
#8 src/XF/InlineMod/SimpleAction.php(79): XF\InlineMod\Post->XF\InlineMod\{closure}(Object(XF\Entity\Post), Array)
#9 src/XF/InlineMod/AbstractAction.php(87): XF\InlineMod\SimpleAction->applyToEntity(Object(XF\Entity\Post), Array)
#10 src/XF/InlineMod/AbstractAction.php(80): XF\InlineMod\AbstractAction->applyInternal(Object(XF\Mvc\Entity\ArrayCollection), Array)
#11 src/XF/Pub/Controller/InlineMod.php(131): XF\InlineMod\AbstractAction->apply(Object(XF\Mvc\Entity\ArrayCollection), Array)
#12 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\InlineMod->actionPerform(Object(XF\Mvc\ParameterBag))
#13 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:InlineMod', 'Perform', 'json', Object(XF\Mvc\ParameterBag), '', Object(XF\Pub\Controller\InlineMod), Object(XF\Mvc\Reply\Reroute))
#14 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#15 src/XF/App.php(1831): XF\Mvc\Dispatcher->run()
#16 src/XF.php(328): XF\App->run()
#17 index.php(13): XF::runApp('XF\\Pub\\App')
#18 {main}


Request state
array(4) {
  ["url"] => string(17) "/test/inline-mod/"
  ["referrer"] => string(45) "https://www.*****.com/test/threads/5283/"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(6) {
    ["type"] => string(4) "post"
    ["action"] => string(9) "unapprove"
    ["_xfRequestUri"] => string(19) "/test/threads/5283/"
    ["_xfWithData"] => string(1) "1"
    ["_xfToken"] => string(8) "********"
    ["_xfResponseType"] => string(4) "json"
  }
}

Thanks
 

Kier

XenForo developer
Staff member
#3
Fixed now. (We don't actually allow the first post in a thread to be unapproved - we actually apply the moderation to the containing thread instead - we'd just forgotten to actually implement that for XF2 ;))
 
Top