• I recently moved my site hosts by following this guide: https://www.wpexplorer.com/migrating-wordpress-website/

    Everything seems to work fine except that I get the following error when trying to add a new post or page: “Object from empty value in /home3/********/public_html/wp-admin/includes/post.php on line 641”

    And then it says: “You are currently editing the page that shows your latest posts.” where I literally don’t have a box to type in, lol.

    Contacting my host support suggests I need to install a fresh copy of WordPress and try to update everything somehow; I tried reinstalling the latest version via admin panel but no luck… hoping there’s an easier fix.

    Thanks.

Viewing 12 replies - 16 through 27 (of 27 total)
  • Do you have another auto incremented column in the database? It kinda sounds like you have two index (ID) columns.
    Can you post a screenshot of the structure of the wp-post table? (select the “structure” tab)

    It’ll look something like this:
    https://www.dubyajay.com/site/uploads/wp-post-table-head.png

    (edit: Add ‘wp-post’)

    • This reply was modified 7 years, 7 months ago by poundsixzeros.
    Thread Starter millenniumfly

    (@millenniumfly)

    Had to merge two screenshots together that’s why the left side looks odd: https://rethinksurvival.com/wp_post_php_screenshot.jpg

    I don’t know if the database is the issue but sometimes things go awry when transferring the db between hosts.
    It looks like another guy on that thread repaired his database. Have you tried that? In phpmyadmin you can repair just the one table.

    Here is a link on how to repair selected tables using phpmyadmin.(disclaimer: I just googled it – don’t know anything abt that site but they had a good description and good photos too ?? )

    All of this can get dicey even if you’re comfortable in databases. Step lightly and be sure to have a backup and know how to restore it.

    Another option is to nuke and re-import your wp-posts table from your backup.

    Thread Starter millenniumfly

    (@millenniumfly)

    Just ran repair and optimize on all tables (though I’ve done that before) with no luck. Can I import just the one wp_posts table? Guess I can give that a shot.

    Thread Starter millenniumfly

    (@millenniumfly)

    I also just “nuked” the wp_posts table and re-imported it without success. After doing so, however, it gave me this error which I believe is related to a plugin that I don’t even use anymore:

    SQL query:
    ALTER TABLE wp_posts ADD FULLTEXT KEY yarpp_title (post_title);
    MySQL said: Documentation
    #1214 – The used table type doesn’t support FULLTEXT indexes

    Unless there are any other suggestions I think I might just go back to my old host considering the trouble I’m having.

    Anyway, thanks for all your help even though my problem isn’t resolved.

    I think the issue is auto-increment on the ID field. I have a test site where I can break things and try to fix them. I just deselected the auto-increment box and tried to add a post and got the same error you got.

    Can you see in the create table statement of wp-posts if auto-increment is set?
    It would look something like:
    CREATE TABLEwp_posts` (
    ID bigint(20) unsigned NOT NULL AUTO_INCREMENT,`

    It seems like when you try to create a new post/page WP can’t assign the next incremented number so it implodes on itself.

    Thread Starter millenniumfly

    (@millenniumfly)

    If that’s the “A.I.” checkbox then no, it wasn’t set and for some reason it won’t let me set it giving me an error stated previously. Ultimately, I’ve given up. Thanks again.

    HI poundsixzeros,

    I am facing the same issue. “You are currently editing the page that shows your latest posts.” kindly help me out.

    I have three sites to be exact installed with wordpress.
    Tried disabling all plugins, no luck

    Hi
    @millenniumfly Did you solve this problem?
    I have same problem in a website
    Any help?

    • This reply was modified 7 years, 2 months ago by aaronsinho.

    For me, it was auto-increment and primary key issue at the time of DB import. Yoast SEO plugin used “utf8mb4_unicode_520_ci” collate, which was not supported on my new server. I edited the SQL backup and replace “utf8mb4_unicode_520_ci” with “utf8mb4_unicode_ci” and imported on the new server. And it worked perfectly fine.

    Hope this helps.
    Cheers

    @mainpal1 you are right. just change it and it’s work well.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Can’t Add New Post Or Page After Host Move’ is closed to new replies.