WordPress.org

Ready to get started?Download WordPress

Forums

New Pages are not saving (8 posts)

  1. HopkinsProg
    Member
    Posted 7 years ago #

    Hey guys! Perhaps you all can assist me with a problem that I am having.

    I am using WordPress 2.1, and when I go to save a page by either clicking "Save & Continue Editing", "Save" or "Publish", something goes wrong. Instead of being saved as a page, it winds up being saved as a draft Post, whose title reads, "Draft created on [Month] [Day], [Year] at [Time]". All of the content I put in is gone.

    It seems as though this only happens when I add in a custom field (I've made a field called "season" and I re-use it for the pages that I'm trying to make). I type in the title, the text (main content), set the page to be a child of one of my pages, then select my already made custom field and give it a value (spring,summer,fall,winter), and then I go to save/publish and it bombs out on me.

    Do you all have any ideas what might be causing this and how I can fix it?

    I am using WordPress 2.1 on Apache under Windows, PHP 4.4, MySQL 5.0.27. I have the Exec-PHP (3.0) and Role-Manager (1.4.5) modules installed and active. If there's something else you need to know, let me know! :-)

    Thanks a bunch guys!

  2. Samuel B
    moderator
    Posted 7 years ago #

    Role Manager hasn't been updated for 2.1. Could be your problem.

  3. HopkinsProg
    Member
    Posted 7 years ago #

    Unfortunately, the problem still exists when I deactivate Role Manager. :-(

  4. HopkinsProg
    Member
    Posted 7 years ago #

    Okay, Me and one of my friends played around with this for a bit and I think we've figured out why this occurs.

    If "Save and Continue" is clicked BEFORE the custom field is added, then everything works fine.

    I suppose that adding in the custom field before the first save essentially make WordPress try to add a custom field for a record that does not yet exist (hence the error/problem).

    Perhaps you all could look into this a little further for me? Maybe a check can be included into the code to make sure that the post is created before the custom field can be created (or something to that effect)?

  5. moshu
    Member
    Posted 7 years ago #

    I couldn't reproduce that error: was able to add custom field even before saving the post. Actually I added custom field to a completely empty post. Later typed text, title, saved etc.

  6. wisekris
    Member
    Posted 7 years ago #

    The same thing is happening to me so I can vouch that this is actually happening. I'm going to try to create it without the custom fields, save it and then add them to see if that works

  7. bookchiq
    Member
    Posted 6 years ago #

    I had the same problem in 2.2.2 this evening. It happened twice before I searched support for it, and it was exactly as described above: if I went to create a new page, gave it a title and started adding custom fields, when I saved it, the page "disappeared," only to be found as a draft post with a title as described above.

    When I "Save and continue"d the page before adding the custom fields, all worked as expected.

  8. inceweb
    Member
    Posted 6 years ago #

    bookchiq is correct - this is still a bug in 2.2.2
    The problem arises when the user clicks "Add custom field" before a page has been saved using the "Save and continue editing" or "Save" buttons or the autosave.
    As described by HopkinsProg above, a post is created instead of a page, and the page content including custom fields is lost.
    I suspect that the fix would be to force the save action when the "Add custom field" button is clicked, somewhere in admin-functions.php
    The workaround, as described above, is to save the page before trying to add custom fields.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags