Support » Fixing WordPress » WP2.2 adds unnecesary records in posts table

  • I use Ecto 2.4.2 for Mac frontend for my blog. Several months ago I could post without problems, but now when I post new blog entry with images, each image and its thumbnail is creating new entry in the wp_posts table. If the last entry had ID=157, then posting new entry with 3 images (which all have thumbnails) creates 7 new entries in this table! And new post has ID=164. I have to open db with phpMyAdmin, delete those unnecesary entries manually and then change ID=164 to ID=158.
    What has gone wrong here with WP? Previously I had WP 2.1.3 and that also had this problem. I think WP.1.x didn’t have such problems, maybe even 2.0.

    After posting message if I press Refresh button in Ecto, it used to download content from the server, but now it replaces content in Ecto with “NO TEXT IN THIS ENTRY!”. I have to open each entry in Ecto, then it really gets content from the server. It wasn’t so in previous versions of WP.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Guntis

    (@guntis)

    Ecto creator asked me to send ecto’s Console log when I upload new entry with images. After log file review he wrote me back:

    “The console log is clean. WP is taking the file data and saving it into it’s upload folder. If it’s creating new entries from the uploaded files, I recommend contacting WP support. Show them the console log and a proof that your sql database is filled with extra entries.”

    You can see Console log here:
    http://bb.infinite-sushi.com/viewtopic.php?p=8647#8647

    And this is what’s inserted in wp_posts database:

    INSERT INTO wp_posts VALUES (159, 1, ‘2007-05-24 08:32:59’, ‘2007-05-24 06:32:59’, ”, ‘2007.03.26-12.40.11-ted-he-1.jpg’, 0, ”, ‘inherit’, ‘open’, ‘open’, ”, ‘20070326-124011-ted-he-1jpg’, ”, ”, ‘2007-05-24 08:32:59’, ‘2007-05-24 06:32:59’, ”, 0, ‘http://www.adventisti.lv/blog/wp-content/uploads/2007/05/2007.03.26-12.40.11-ted-he-1.jpg’, 0, ‘attachment’, ‘image/jpeg’, 0);
    INSERT INTO wp_posts VALUES (160, 1, ‘2007-05-24 08:33:05’, ‘2007-05-24 06:33:05’, ”, ‘2007.03.17-vislatvijas-jauniesu-dievkalpojums-1.jpg’, 0, ”, ‘inherit’, ‘open’, ‘open’, ”, ‘20070317-vislatvijas-jauniesu-dievkalpojums-1jpg’, ”, ”, ‘2007-05-24 08:33:05’, ‘2007-05-24 06:33:05’, ”, 0, ‘http://www.adventisti.lv/blog/wp-content/uploads/2007/05/2007.03.17-vislatvijas-jauniesu-dievkalpojums-1.jpg’, 0, ‘attachment’, ‘image/jpeg’, 0);

    Why does WP 2.2 insert image info in wp_posts table? I think image info is embedded in the real post entry and there is no reason to have extra line in wp_posts for each image used in the post, and every thumbnail as well.

    Any image uploaded via the Write->Post Upload mechanism does write a record into wp_posts. This is normal for WordPress (I believe it started with 2.0 when the upload feature was added)

    Please be aware changing the ID field in wp_posts could have serious consequences as the wp_post2cat table also refers to your post IDs.

    Thread Starter Guntis

    (@guntis)

    OK, but what is the reason to write image info in the wp_posts database? Those images are already registered in my blog entry, why they should be registered twice? If that would make image database, then it’s ok, but still useful only for those images which I’d like to show as photo library. Now if I add 32 images to my blog entry, I get 32 unnecesssary db entries… Or even 64 (!!!), if I’ve set ecto to create thumbnails. Absolute wasting of db space and server resources… Plus, post IDs are scattered, I cannot just change post ID in the URL line to browse to the previous or next post, as there could be 10 or 30 or even 64 “empty” IDs in between… I love order, that every new message has next ID number, but this new WP 2.x just creates complete chaos in ID numbers…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP2.2 adds unnecesary records in posts table’ is closed to new replies.