Due to a bug (#1871020: Conflict with Workbench Moderation: tags revert to defaults after moderation change) it is possible that some meta tag data might have been serialized twice. Add an update script to fix this.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | metatag-n1919070-6.patch | 1.27 KB | damienmckenna |
| #2 | metatag-n1919070-2.patch | 1.49 KB | damienmckenna |
Comments
Comment #1
damienmckennaComment #2
damienmckennaThis should take care of the problem, it searches for records with arrays that are three levels deep and removes the outer array.
Comment #3
willvincent commentedMaybe I'm missing something, or not fully understanding the magic of reset(), but I don't see how the logic for fixing corrupt data is removing the extraneous elements.
Specifically in a case where you might end up with an array something like this:
Which is what I previously observed in the data structure that I was getting with beta4.
Also, are you certain the query to find corrupt entries is fully effective? Seems to me it might be better to simply iterate through all records and fix any that are broken (by testing them after unserializing). A bit less performant perhaps, but since it's a one-time update script that shouldn't matter as much.
If I'm totally off base, go ahead and ignore my ramblings here.. just want to be sure we get this licked. ;)
Comment #4
damienmckenna@willvincent: That's a completely valid point, the patch doesn't account for the same problem happening repeatedly on the same records.
Comment #5
damienmckennaBTW the code will take something like this:
and turn it into this:
Comment #6
damienmckennaGoing to leave it to just run once.
Comment #7
damienmckennaCommitted.
Comment #8
damienmckennaNow that Metatag v7.x-1.0-beta5 is out am closing this to keep the issue queue clean.