Meta data corrupts easily
-
Every since “upgrading” a bunch of old sites that were running 1.9.1, I have noticed a ton of problems with corrupt meta-data. I run a direct query on the db where I need to get height and width values from the meta_data field in wp_ngg_pictures, and this is almost impossible now because any save of a gallery corrupts this field. I can get meta data back temporarily by selecting all my images and using “import metadata” from the drop-down, but as soon as ANY change or save is made to the gallery, they are corrupt again. This is happening across 3 of my sites hosted in various places. Does anyone know of a fix?
-
@stephen S – The current versions of NextGEN Gallery save the image meta data as base64, if you decode that information you will find all of the meta details.
Also to note, NextGEN Legacy versions (pre-2.0.x) did not use base64 encoding of the meta data so it would appear more like “plain text” and will continue to do so until the meta data is edited and/or re-saved.
– Cais.
Well, that is somewhat of a help, thanks, except that the data (no matter how many times I re-save it) seemed to be serialized incorrectly. When I try the following:
while($row = $rs->fetch_assoc()){ $variables = unserialize(base64_decode($row["meta_data"])); $wid = $variables["width"]; echo $wid; }
It will not return width values, AND it gives me a PHP notice about an Error at offset 0, which usually indicates badly serialized data.
Any ideas?
@stephen S – At the moment, no … but this topic has been flagged into another issue one of our developers has been trying to work on. I’ll add another note for them to have a look at this when they have the opportunity.
– Cais.
So there is no workaround to get the original width directly from the db? I need to downgrade to 1.9.1?
@stephen S – I’ve asked one of our developers to look into this as part of another issue they are looking at regarding meta data as they believe it may be related.
With that I have specifically ask they review this topic to address your question, I do not have an answer at this time on how best to get to the details you are looking for; and, we do *not* recommend rolling back to NextGEN Legacy versions (pre-2.0.x).
– Cais.
- The topic ‘Meta data corrupts easily’ is closed to new replies.