XF 1.3 unserialize(): Error at offset 0 of 1 bytes

Hornstar

Well-known member
I did an import from vb 3.8 today, and I am now all live. I have just checked my error log, and I seem to keep getting these errors:
unserialize(): Error at offset 0 of 1 bytes

Code:
Server Error Log
Error Info
ErrorException: unserialize(): Error at offset 0 of 1 bytes - library/XenForo/Model/UserChangeLog.php:45
Generated By: ermanakburu6, Today at 8:17 PM
Stack Trace
#0 [internal function]: XenForo_Application::handlePhpError(8, 'unserialize(): ...', '/home/**/...', 45, Array)
#1 /home/**/public_html/forums/library/XenForo/Model/UserChangeLog.php(45): unserialize('0')
#2 /home/**/public_html/forums/library/XenForo/Model/User.php(2794): XenForo_Model_UserChangeLog->logChanges(827854, Array, NULL)
#3 /home/**/public_html/forums/library/XenForo/DataWriter/User.php(1047): XenForo_Model_User->logChanges(827854, Array)
#4 /home/**/public_html/forums/library/XenForo/DataWriter.php(1409): XenForo_DataWriter_User->_postSave()
#5 /home/**/public_html/forums/library/XenForo/ControllerPublic/Account.php(1004): XenForo_DataWriter->save()
#6 /home/**/public_html/forums/library/XenForo/FrontController.php(347): XenForo_ControllerPublic_Account->actionContactDetailsSave()
#7 /home/**/public_html/forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /home/**/public_html/forums/index.php(13): XenForo_FrontController->run()
#9 {main}
Request State
array(3) {
["url"] => string(62) "http://www.gamerzneeds.net/forums/account/contact-details-save"
["_GET"] => array(0) {
}
["_POST"] => array(13) {
["email"] => string(25) "**_**@hotmail.com"
["password"] => string(8) "********"
["receive_admin_email"] => string(1) "1"
["allow_send_personal_conversation_enable"] => string(1) "1"
["allow_send_personal_conversation"] => string(7) "members"
["email_on_conversation"] => string(1) "1"
["custom_fields"] => array(7) {
["aim"] => string(0) ""
["icq"] => string(0) ""
["yahoo"] => string(0) ""
["skype"] => string(0) ""
["gtalk"] => string(0) ""
["facebook"] => string(0) ""
["twitter"] => string(0) ""
}
["custom_fields_shown"] => array(7) {
[0] => string(3) "aim"
[1] => string(3) "icq"
[2] => string(5) "yahoo"
[3] => string(5) "skype"
[4] => string(5) "gtalk"
[5] => string(8) "facebook"
[6] => string(7) "twitter"
}
["_xfToken"] => string(8) "********"
["save"] => string(23) "Değişiklikleri Kaydet"
["_xfRequestUri"] => string(31) "/forums/account/contact-details"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
All seem similar in nature. Happening to different users when something is saved. Examples of locations that it has reported it happening in:
Code:
http://www.gamerzneeds.net/forums/account/preferences-save
http://www.gamerzneeds.net/forums/account/personal-details-save
http://www.gamerzneeds.net/forums/account/contact-details-save
http://www.gamerzneeds.net/demo/admin.php?users/testuser2006.23040/save
etc.
 
Well, it's possible the big board importer is relevant, but I would need FTP details and access to a user that can reproduce it to do any debugging. When I investigated it before, I didn't see any obvious reason for it to happen.

If you can provide that, please submit a ticket with those details.
 
That error means you didn't rebuild the user cache:

Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches

The big board importer requires that you rebuild the user cache after the import. That will rebuild the custom_fields cache in the user records which is what that error message is complaining about.
 
That error means you didn't rebuild the user cache:

Admin CP -> Tools -> Rebuild Caches -> Rebuild User Caches

The big board importer requires that you rebuild the user cache after the import. That will rebuild the custom_fields cache in the user records which is what that error message is complaining about.
Maybe it didn't complete as I ran all the caches. I will try again. Thanks.
 
@Jake I am still getting the error. So I ran the user cache again, and left it overnight. I woke up this morning and it was up to about user 300 000 but not going any further. Almost like it timed out or something. In another tab I opened up the admincp and signed in again, and when I went back to the other tab it said it had finished. However I have roughly 800 000 users to rebuild. I don't have any errors in the error log over night either.

So my question is, if I am having trouble rebuilding nearly a million users, how can I go about this so I can get through them all, so I stop getting these errors?
 
You could maybe edit this file to change the batch size or change what is done by that rebuild:

library/XenForo/Deferred/User.php

Your rebuild is going to take a while with 800k users.
 
I just noticed we are getting a lot of these errors too.

#0 [internal function]: XenForo_Application::handlePhpError(8, 'unserialize(): ...', '/var/www/librar...', 1113, Array)
#1 /var/www/library/XenForo/Model/Post.php(1113): unserialize('Glad to have yo...')
#2 /var/www/library/XenForo/ControllerPublic/Thread.php(93): XenForo_Model_Post->preparePost(Array, Array, Array, Array)
#3 /var/www/library/Andy/SimilarThreads/ControllerPublic/Thread.php(12): XenForo_ControllerPublic_Thread->actionIndex()
#4 /var/www/library/Andy/Calendar/ControllerPublic/Thread.php(12): Andy_SimilarThreads_ControllerPublic_Thread->actionIndex()
#5 /var/www/library/DailyStats/ControllerPublic/Thread.php(7): Andy_Calendar_ControllerPublic_Thread->actionIndex()
#6 /var/www/library/XenForo/FrontController.php(347): DailyStats_ControllerPublic_Thread->actionIndex()
#7 /var/www/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#8 /var/www/index.php(13): XenForo_FrontController->run()
#9 {main}

Request State
array(3) {
["url"] => string(69) "http://jetboaters.net/threads/rattle-trap-fatmat-sound-deadener.1821/"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Could you execute this query on your database, please, and let us know the output?

Code:
SELECT like_users
FROM xf_post
WHERE post_id = 27998

It appears as though you may have some weird data in that field for that post (maybe others).

It's doubtful it's happening at run time (which would suggest an add-on interfering) but I just want to rule that out. Was it an add-on that deleted the user? Or was the user deleted by a member of staff in the Admin CP?

It would appear to be related to likes left by the deleted user.
 
Back
Top Bottom