wordPress bug?
October 1st, 2007
I’m not sure if this is a bug due to word press, or if one of our team sneaked into the database and did something ugly becasue one day both (designspam) of our blogs started playing up giving this error:
INSERT INTO wp_postmeta (post_id,meta_key,meta_value) VALUES (’59′,’_utw_tags_0′,’a:0:{}’)
after a while scratching my head and looking for answers - i wasnt really coming up with much, all the other blogs were saying that the tables might be currupt or the word press want upgraded propery, but none of these were relevant, so i decided to get knee deep in the database myself.
After creating many test blogs and databases, and updating them with our blog content - i noticed that the error only happens when an entry with the ID of 0 exists in either the wp_posts table or the wp_postmeta table. getting rid of this entry seemed to stabilize the system when creating a new blog…. until you added another one, and it tries adding it as zero again. So the whole problem rests on the fact that as soon as an entry exists in the database with ID 0, then things start going a bit wrong.
I solved the problem by changing the ID structure to auto_incremement, and zero dosnt get a looking, but fear this is a hack that might come back to hurt me later on.
I posted this article for two reasons:
1. To help some poor soul like me speed their day up a bit
2. Maybe get some feedback if this method has been tried and tested before
either way, would love to hear something on this matter
October 9th, 2007 at 12:25 pm
[...] would love to get some feedback on my original post about our word press blogs going wierd. Its now effected out flex user group site. This site to my [...]