What's new
Xen Factory

Register today to become a member! Once signed in, you'll be able to start purchasing our products, ask questions, request support and suggest new ideas!

  • We are aware that a no permission error was shown when you tried to purchase in the last 2 days, this is now fixed.

Bug Fixed Mysql error on setting "Who has read this thread - Mode"

pipin

New Member
I switched the setting "Who has read this thread - Mode" from "last read date" to "all dates" and got the following error:



  • XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '3033-432684' for key 'user_id_thread_id'
  • src/XF/Db/AbstractStatement.php:228
Stack-Trace
INSERT INTO `xfa_wrtt_thread_read` (`thread_id`, `user_id`, `thread_read_date`) VALUES (?, ?, ?)
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL query err...', 1062, '23000')
#1 src/XF/Db/Mysqli/Statement.php(77): XF\Db\Mysqli\Statement->getException('MySQL query err...', 1062, '23000')
#2 src/XF/Db/AbstractAdapter.php(94): XF\Db\Mysqli\Statement->execute()
#3 src/XF/Db/AbstractAdapter.php(221): XF\Db\AbstractAdapter->query('INSERT INTO `x...', Array)
#4 src/addons/XFA/WhoReadThisThread/XF/Repository/Thread.php(72): XF\Db\AbstractAdapter->insert('xfa_wrtt_thread...', Array)
#5 src/XF/Pub/Controller/Thread.php(89): XFA\WhoReadThisThread\XF\Repository\Thread->markThreadReadByVisitor(Object(XFA\WhoReadThisThread\XF\Entity\Thread), 1597160619)
#6 src/XF/Mvc/Dispatcher.php(350): XF\Pub\Controller\Thread->actionIndex(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(261): XF\Mvc\Dispatcher->dispatchClass('XF:Thread', 'Index', Object(XF\Mvc\RouteMatch), Object(XFA\WhoReadThisThread\XF\Pub\Controller\Thread), NULL)
#8 src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch(Object(XF\Mvc\RouteMatch), Object(XFA\WhoReadThisThread\XF\Pub\Controller\Thread), NULL)
#9 src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#10 src/XF/App.php(2190): XF\Mvc\Dispatcher->run()
#11 src/XF.php(391): XF\App->run()
#12 index.php(20): XF::runApp('XF\\Pub\\App')
#13 {main}
 

Fred

Administrator
Staff member
Hi,
Sorry i have forgot you
I work on new release for XF2.2 compatibility
You still have this error on last release or not ?

Regards
 

pipin

New Member
Hi,
Sorry i have forgot you
I work on new release for XF2.2 compatibility
You still have this error on last release or not ?

Regards


Still happening if I change the mode:


XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '3033-436703' for key 'user_id_thread_id' in src/XF/Db/AbstractStatement.php at line 228
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
  3. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  4. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 221
  5. XF\Db\AbstractAdapter->insert() in src/addons/XFA/WhoReadThisThread/XF/Repository/Thread.php at line 72
  6. XFA\WhoReadThisThread\XF\Repository\Thread->markThreadReadByVisitor() in src/XF/Pub/Controller/Thread.php at line 89
  7. XF\Pub\Controller\Thread->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
  8. XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
  9. XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
  10. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
  11. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2191
  12. XF\App->run() in src/XF.php at line 391
  13. XF::runApp() in index.php at line 20
 

Fred

Administrator
Staff member
Thanks for feedback
I back to home next week
I will try to fix it during this time
Don’t hesitate to bump me if needed ;)
 

Fred

Administrator
Staff member
I didn't see anything about this on my dev forum

Edit: It's seems it's an old feature of this addon who cause this issue.
You have 3 possibilities:
  1. Save content of xfa_wrtt_thread_read table, you uninstall addon and reinstall new version of addon and you restore table content
  2. Drop user_id_thread_id and thread_read_date in xfa_wrtt_thread_read table via phpmyadmin
  3. Send me phpmyadmin access and forum access by PM. I will fix it for you
 
Last edited:

javokhir

New Member
  • XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry '1349407-230232' for key 'xfa_wrtt_thread_read.user_id_thread_id'
  • src/XF/Db/AbstractStatement.php:228
I am getting this error every time, on XF 2.2.6
 

javokhir

New Member
XF\Db\DuplicateKeyException: MySQL query error [1062]: Duplicate entry 'post-1478764' for key 'xf_report.content_type_content_id'
src/XF/Db/AbstractStatement.php:230

the same error after update
 

Fred

Administrator
Staff member
Hi
As you can see, is not related to this addon. xf_report is a XF table and my addon doesn't use it.

Regards
 
Top