I’ve upgraded from EE 2.x to version 6.xx, step by step (2.x to 3.x - 3.x to 4.x - 4.x to 5.x and finally 5.x to 6.x). All almost ok, but few entries, when I try to modify them, give me this error:
Notice unserialize(): Error at offset 4159 of 5177 bytes ee/ExpressionEngine/Service/Model/Column/Serialized/Native.php, line 27 Severity: E_NOTICE
However, I can modify and save these entries, but every time I try to edit, I always got unserialize error. How I can resolve?
Thanks.
Hello. What is the solution to this issue? I have had this site from version one and now running it on V 7.4. Would redoing the entries affected work to solve it?
UPDATE: I copied all the revelant information so that I could recreate the entry. Deleted the original. Reentered everything and set the time to approximately the same original time. Error went away. But I am sure there are other entries that are borked. Would be nice to find an easy fix.
Interesting..
So this service is a core service.. The error means it’s running into a corrupt serialization that it’s trying to unserialize… my guess on the entry front is that it’s related to entry revisions… But that is a bit of a guess.
Do you have entry revisions enabled?
Thanks,
-Tom Jaeger
So what’s happening- some data that was saved in a serialized array is corrupted- do these entries have entry versioning on? Because that would be my bet. The hack to Native.php basically says ‘if the data are corrupt, just drop it’. Which is arguably the best option in this case, but I’m not sure.
I’d say if it happens again, check the versions, see if they will all load ok. I would bet one doesn’t- maybe it’s too long to save and gets truncated, which would cause the error. Deleting a bad revision in that case would resolve it without a hack. If we know that’s what’s going on, throwing a validation error instead of automatically dropping it or erroring would I suspect be the best option. But it would be good to know if that’s what’s happening.
Thanks Robin and Tom for the replies. I do have revisions on for the Channel in question : Blog. Not all the entries throw up this error in attempting to edit them. Here is a screen shot of the errors reported. when I tried to open one of the revisions:
Stack Trace: Please include when reporting this error
I’ll experiment and delete all the revisions of one of the troublesome entries and see if the one remain resolves the issue.
cheers
Update: All the revisions (5) throw errors upon trying to open them. Deleting the entry and re creating the entry has no issues.
I tried opening revisions on those entries that have no problems; BUT some past revisions do throw errors, Some other entries that seem ok, all of their revisions have errors in opening them. The entries that have been recreated and that have a revision or two all seem to be ok.
I would delete all revisions if possible but I didn’t see a way of doing that.
I only have 3-4 more entries to recreate and then the blog channel should be all ok.
I love mysteries but solved mysteries even more…
LOL, yep, solved mysteries are the best kind!
We could nuke all of the revisions or we could write up some php to just nuke the ones that we can’t unserialize.
Do you have a preferrence?
And I think what we’d do first- one of the entries that throws the error when you save, we just nuke those revisions and see if it saves. If so- we know it was the revisions and we can either go nuclear of if you really want them, I suspect it wouldn’t be hard for me to work up some php to drop in a template and run. Basically ‘can’t unserialize? Nuke it. Though I also tend to think that’s what your hack is doing on save.
Robin - Thanks for your offer of a script to nuke the revisions. At the moment I have recreated all the troublesome entries so I have no more toublesome revisions or entries. Deletion of a entry eliminates the revisions and then recreating the entry starts fresh. But I do think it would be useful to have the ability to nuke revisions. It seems that the earliest entries from 2002 to about 2007 were the problematic entries. And later entries don’t seem to have any issues.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.