XF 2.1 Cannot View Thread, While Having Unread Notifications

🔥Iggy🔥

Well-known member
i am a little confused on this one....does not seem to be happening here, but i was able to confirm the issue on a test mirror, default style, all addons disabled.

happens on "most" threads but not all for some reason....instead of loading the topic, it loads the stack trace...

definitely since 2.1.3 only.

ok so heres the error..

  • XF\Db\Exception: MySQL fetch error [2014]: Commands out of sync; you can't run this command now
  • src/XF/Db/AbstractStatement.php:217
  • Generated by: Admin
  • Jul 24, 2019 at 2:57 AM
Stack trace
SELECT alert_id
FROM xf_user_alert
WHERE content_type = ?
AND content_id IN(701, 703, 726, 868, 905, 1324, 8174, 74184, 77306, 77355, 78926, 158067, 158089, 303178)
AND alerted_user_id = ?
AND view_date = 0
AND event_date < ?

------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL fetch err...', 2014, 'HY000')
#1 src/XF/Db/Mysqli/Statement.php(134): XF\Db\Mysqli\Statement->getException('MySQL fetch err...', 2014, 'HY000')
#2 src/XF/Db/AbstractStatement.php(74): XF\Db\Mysqli\Statement->fetchRowValues()
#3 src/XF/Db/AbstractStatement.php(158): XF\Db\AbstractStatement->fetchColumn(0)
#4 src/XF/Db/AbstractAdapter.php(170): XF\Db\AbstractStatement->fetchAllColumn(0)
#5 src/XF/Repository/UserAlert.php(305): XF\Db\AbstractAdapter->fetchAllColumn('
SELECT aler...', Array)
#6 src/XF/Pub/Controller/Thread.php(57): XF\Repository\UserAlert->markUserAlertsReadForContent('post', Array)
#7 src/XF/Mvc/Dispatcher.php(321): XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#8 src/XF/Mvc/Dispatcher.php(248): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Thread), NULL)
#9 src/XF/Mvc/Dispatcher.php(100): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XF\Pub\Controller\Thread), NULL)
#10 src/XF/Mvc/Dispatcher.php(50): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#11 src/XF/App.php(2178): XF\Mvc\Dispatcher->run()
#12 src/XF.php(390): XF\App->run()
#13 index.php(20): XF::runApp('XF\\Pub\\App')
#14 {main}
Request state
array(4) {
["url"] => string(43) "/community/threads/onetopic.154/"
["referrer"] => string(36) "https://test.mysite.com/community/"
["_GET"] => array(1) {
["/community/threads/onetopic_154/"] => string(0) ""
}
["_POST"] => array(0) {
}
}
 
hmm...not sure...they didnt seem to get much a reply on that topic.....as far as sql version, we are running a newly updated mariadb 10.4.6 so i was thinking it wouldnt be that.......forum and sql were upgraded roughly the same time, so not really sure whats going on...

thank you for the link ozzy..
 
well...i tried on another VM running mariadb 10.3.13
xen 2.1.3 test mirror same same...

could not replicate....

so...a couple other small variables, but seems to suggest a xen bug with mariadb 10.4.6
 
i am told, he cannot revert to the earier mariaDB version....so we seem stuck with 10.4.6 and this bug.

can xen verify and patch this please? or any manual solutions i am also open to...i believe this honestly is a core bug...
 
i am told, he cannot revert to the earier mariaDB version....so we seem stuck with 10.4.6 and this bug.

can xen verify and patch this please? or any manual solutions i am also open to...i believe this honestly is a core bug...

If you believe it's a bug, report it in the bug forum. ;)
 
Then they feel it's not a bug. You can repost it with more information and they might look into it.
thank you to try and help,
that is basically what has happened in this topic.....since i started it, i verified the issue to occur only on the test stage using that mariaDB version....

but the topic had already been moved......i would be happy with any useful support at all, i do not care where the topic is located...

i am not sure what "more information" exactly would make a difference but it would be nice to hear an official reply on how we can step forward toward resolving the issue...which, as you can imagine im sure.....its a HUGE problem issue if members cannot read threads.....

i am unclear what a next step would be....submit a support ticket? can we please get an official reply @Chris D or anyone?

from my tests it seems this is certainly a mariaDB 10.4.6 issue...of course i could be wrong, but the important thing is to be able to keep taking steps and not feel stuck with a broken forum.

thank you
 
It’s going to be a server issue, but not sure what exactly and that’s out of the scope of support.

I actually use that particular MariaDB version myself without issue.

still trying to figure this one out....for whatever it might help....i noticed it is not only "cannot view thread while having unread notifications" on maria 10.4.6....

it is "cannot view thread WITH UNREAD POSTS while having unread notifications"....so one more small distinction there....did you test it like that chris?
...or anyone...not sure what to try kind of seems like it should work lol..
 
There are no issues with that specific version of MariaDB.
noticed now....in some cases it isnt even linked to notifications......just cant read topics.....no work around.....kind of a bad situation if you can imagine...

we really need this fixed so our forum can work again......server engineer says it is more likely xen related......which, as it happened right after upgrading....i mean....yes, it also has to do with the sql version, but where exactly the problem is? how to even take one step to find that answer?

something is trying to run "commands out of synch" would that not be the xen software? seems most logical....

or if not, what kind of settings/processes etc should we even be looking at with the sql?

at the current pace this will take months to fix, but of course that is no good....seriously need some kinda help or a tip here...

thank you :(
 
Which upgrade did you recently do? From which version did you upgrade to 2.1.3?

You say that was a recent change, fair enough. But upgrading to MariaDB 10.4.6 would also be a recent change seeing as it was only released itself in June.

The code in question only changed in XF 2.1.0, so if you have recently upgraded from 2.1.x to 2.1.3 then I can categorically assure you our code hasn't changed, so it would then point to the MariaDB upgrade being the issue.

While I cannot rule out XF being partly responsible, I cannot reproduce the issue, and we're having no other reports, so it makes it difficult to find a fix, so it continues to point to it being an issue with your server environment, perhaps particularly MariaDB so if a previous MariaDB version worked, I suggest you revert back to that, and the same configuration.
 
Which upgrade did you recently do? From which version did you upgrade to 2.1.3?

You say that was a recent change, fair enough. But upgrading to MariaDB 10.4.6 would also be a recent change seeing as it was only released itself in June.

The code in question only changed in XF 2.1.0, so if you have recently upgraded from 2.1.x to 2.1.3 then I can categorically assure you our code hasn't changed, so it would then point to the MariaDB upgrade being the issue.

While I cannot rule out XF being partly responsible, I cannot reproduce the issue, and we're having no other reports, so it makes it difficult to find a fix, so it continues to point to it being an issue with your server environment, perhaps particularly MariaDB so if a previous MariaDB version worked, I suggest you revert back to that, and the same configuration.


from 2.1.2 we upgraded from...

it may be helpful to point out how easy this is to spot, although it did take a couple days after the upgrade as we are still trying to get things working well enough to officially open....so, the maria upgrade, while recent....did not instantly trigger unreadable topics, the way the xen upgrade did...no other changes were made after the xen upgrade, forum or server wise....so that seems to suggest back again to the xen....

again to remind, we can reproduce this on a test mirror with addons disabled and on the default xen style...

i am told he cannot revert sql versions back...that would be pretty nice but im not sure if that has to do with arch linux setup or what exactly...

aside from reverting sql, is there any other step, at all, that we can take here?

thank you
 
aside from reverting sql, is there any other step, at all, that we can take here?
Until we can reproduce the issue, no. You will need to continue troubleshooting the MariaDB setup or revert back to the last known good configuration.

Again, there were no changes in XF 2.1.3 to the code in question. If there was, I'd tell you and we'd work towards reverting those changes in-place. But we didn't change anything there, so I can't.
 
I have same problem. I try to edit style (delete css in 'Extra Freeform CSS/LESS code'). And now my forum can't use style properties and all add-on.

Code:
XF\Db\Exception: MySQL fetch error [2014]: Commands out of sync; you can't run this command now in src/XF/Db/AbstractStatement.php at line 217
XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 134
XF\Db\Mysqli\Statement->fetchRowValues() in src/XF/Db/AbstractStatement.php at line 93
XF\Db\AbstractStatement->fetchAliasGrouped() in src/XF/Mvc/Entity/Finder.php at line 1296
XF\Mvc\Entity\Finder->fetch() in src/XF/Repository/StyleProperty.php at line 56
XF\Repository\StyleProperty->getUngroupedPropertyMapsInStyle() in src/XF/Admin/Controller/Style.php at line 247
XF\Admin\Controller\Style->actionStyleProperties() in src/XF/Mvc/Dispatcher.php at line 321
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 248
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 100
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
XF\App->run() in src/XF.php at line 390
XF::runApp() in admin.php at line 13
 
Back
Top Bottom