Support » Fixing WordPress » BUG? Add New Post in admin > Custom Fields pre-filled with an old post's data?!

  • Resolved chickwithbob


    When we try and ‘Add New Post’ in the admin, we are having a weird issue where the Custom Fields at the bottom are all pre-filled with an old post’s data!

    Rather than just having the drop down showing with the available fields as selectable options in the Custome Fields Panel, each option is displayed with the input field content displaying the content belonging to an old post – and always the same post.

    Has anyone seen this sort of behaviour?

    We are using the ‘Custom Field Template’ plugin successfully, and I am unsure whether the source of the issue resides with this plugin.

    Can anyone suggest anything I could do??
    Really tearing my hair out here – I’ve run out of things to try and places to look…

Viewing 1 replies (of 1 total)
  • Never mind – I finally found the cause of the issue.

    searching the wp_postmeta database table for the data showing in the input fields revealed that these all belonged to records with a post_id = 0

    Hence when adding a new post, the post was behaving like a ‘edit post’ by finding the data belonging to post with post_id = 0

    Deleting all records from the table with post_id=0 fixed the problem.

    How records with a post_id=0 came to exist in the table was due to a separate issue that was also resolved.

    Wheee! I’m done 🙂

Viewing 1 replies (of 1 total)
  • The topic ‘BUG? Add New Post in admin > Custom Fields pre-filled with an old post's data?!’ is closed to new replies.