Yes, that’s because IDs of 0 cannot exist…
Right, but it seems like WordPress should handle this (either by not creating a post with an ID of 0 or by automatically updating the ID of any post it finds that is 0).
Yes, and that’s what it usually does. Is it working non (without manual adjustments?)
Pretty sure WP assumes that it has a “working” mysql database. Those keys are auto-generated.
If you look at the table properties for the restored db, are those ID columns defined as “auto_increment”?
actually, posts and comments both had auto incrementation set to no. I just changed it. Hopefully it will work now. =)
Is there some sort of catchall we can add to the code?
on(saveToDB){
if (ID.auto_increment == false)
ID.auto_increment = true;
I realize that isn’t in PHP, but could we do something like it?
Thanks!
I’ve experienced this behaviour after a migration too — auto_increment needed to be enabled on two tables post migration (different MySQL versions, if that’s relevant, although the dump was 323 compatible), followed by a new post being entered as id=0 and buggering up the Page Management view, plus that post. Stupid bug.