XF 1.5 Data too long for column 'ignored'

howarde

Member
When trying to add a certain user as a super mod, we get this error:

Thanks.

Mysqli statement execute error : Data too long for column 'ignored' at row 1
  1. Zend_Db_Statement_Mysqli->_execute() in Zend/Db/Statement.php at line 297
  2. Zend_Db_Statement->execute() in Zend/Db/Adapter/Abstract.php at line 479
  3. Zend_Db_Adapter_Abstract->query() in Zend/Db/Adapter/Abstract.php at line 632
  4. Zend_Db_Adapter_Abstract->update() in XenForo/DataWriter.php at line 1654
  5. XenForo_DataWriter->_update() in XenForo/DataWriter.php at line 1623
  6. XenForo_DataWriter->_save() in XenForo/DataWriter.php at line 1419
  7. XenForo_DataWriter->save() in XenForo/Model/User.php at line 72
  8. XenForo_Model_User->update() in XenForo/Model/UserIgnore.php at line 52
  9. XenForo_Model_UserIgnore->rebuildUserIgnoreCache() in XenForo/Model/UserIgnore.php at line 43
  10. XenForo_Model_UserIgnore->rebuildUserIgnoreCacheByIgnoring() in XenForo/DataWriter/User.php at line 1084
  11. XenForo_DataWriter_User->_postSave() in XenForo/DataWriter.php at line 1423
  12. XenForo_DataWriter->save() in XenForo/DataWriter/Moderator.php at line 138
  13. XenForo_DataWriter_Moderator->_postSave() in XenForo/DataWriter.php at line 1423
  14. XenForo_DataWriter->save() in XenForo/Model/Moderator.php at line 309
  15. XenForo_Model_Moderator->insertOrUpdateGeneralModerator() in XenForo/ControllerAdmin/Moderator.php at line 275
  16. XenForo_ControllerAdmin_Moderator->actionSave() in XenForo/FrontController.php at line 351
  17. XenForo_FrontController->dispatch() in XenForo/FrontController.php at line 134
  18. XenForo_FrontController->run() in /var/www/html/forums/admin.php at line 13
 
It's the act of displaying them as staff which prevents people from ignoring them. We've handled the length case in importing, but I may need to expand it to day to day use as well.

It does require a user to ignore 1000+ users (note that in this case, it's that this user is being ignored by another who ignores huge numbers of people, not the other way around). You can identify this person via this query:
Code:
SELECT user_id, COUNT(*) AS ignored
FROM xf_user_ignored
GROUP BY user_id
ORDER BY ignored DESC
LIMIT 20;
The user ID listed first will almost certainly be the problem. (I'd be curious how many people they're ignoring.)

The only way to stop them ignoring some people would be to remove some of those records from the database directly unfortunately.
 
  • Like
Reactions: Xon
It's a little strange, but you'll need to remove some records from xf_user_ignored for that user ID (based on the user_id column). I'd probably remove a few hundred. Alternatively, you can tell this user to remove people. It's a bit odd for someone productive to be ignoring 3700 people, but that may vary based on your forum.

There isn't actually a great way to force a rebuild of the ignore cache for this user consistently, but if you toggle the "display as staff" option for a user this person is ignoring (which is what you did in the original post), it should rebuild it as necessary.
 
As it turned out, the user with 3k ignores isn't the Mod, but someone else entirely. This particular user hasn't been active in 5 years and our Xenforo is still in Dev. We're migrating from VB hopefully this week.

It doesn't make sense to me why
a) This guy had ignored that many people (why even use the forums then)?
b) Why this guy's ignores were blocking us from adding only this one (other) person as a mod

I dumped his ignores in the VB DB so that they don't transfer over, and hopefully everything is kosher when I do the real migration.

Thanks for the help.
 
Top Bottom