Wordpress: Your attempt to edit this post has failed - gHacks Tech News

WordPress: Your attempt to edit this post has failed

There are usually two areas that can cause problems and errors in a WordPress blog. The first are plugins that produce incompatibilities or display errors while the second are problems after updates of the blog software itself.

There have been some problematic messages occasionally when trying to publish posts lately. The error message Your attempt to edit this post [..] has failed appeared occasionally after upgrading to WordPress 2.7. WordPress was not able to publish the article which was bad enough but the underlying problem was that all work up to the point of the last auto save was lost as well.

This usually meant that the tags, categories and other last minute edits (like urls) were missing from the posts and had to be added again. The second edit and publishing always succeeded without difficulties.

The first thought was that this could have something to do with the automatic saves of posts before publishing. A quick research on the WordPress support forum seemed to confirm that.

The fix is apparently the following:

Locate the file post-new.php in the wp-admin folder of the WordPress installation. Find the following line in that file wp_enqueue_script('autosave'); and replace it with //wp_enqueue_script('autosave');.

The // in front of the row make the entire row a comment which essentially means that the command will not be executed. This will practically disable auto save during post publishing meaning that you will hacve to click on the Save Draft button before you leave an unfinished post page.





  • We need your help

    Advertising revenue is falling fast across the Internet, and independently-run sites like Ghacks are hit hardest by it. The advertising model in its current form is coming to an end, and we have to find other ways to continue operating this site.

    We are committed to keeping our content free and independent, which means no paywalls, no sponsored posts, no annoying ad formats (video ads) or subscription fees.

    If you like our content, and would like to help, please consider making a contribution:

    Comments

    1. itb said on February 3, 2009 at 11:19 am
      Reply

      Great info!
      it can also happen in earlier version of WordPress due to the lack of resources.
      If your site has reached the memory limit supplied by the hoisting company, then it will cut the post like you’ve motioned.

    2. RG said on February 3, 2009 at 8:04 pm
      Reply

      Thanx Martin, for sure useful. In general autosave is a good feature though, in my opinion.

    3. Raaj said on April 4, 2009 at 8:18 pm
      Reply

      Here is the solution. Just download this plug in and activate it thats all… So simple..

      http://help2design.com/wordpress/your-attempt-to-edit-this-post-has-failed-wordpress-fix/

    4. Andy Fore said on April 27, 2009 at 3:12 am
      Reply

      Great fix. I had been beating my head up against the wall on this one. It also happens with new pages, so you might want to edit the page-new.php file in the same manner.

    5. lisa said on June 12, 2009 at 9:05 pm
      Reply

      Thank you, great fix. I wonder if the new update (2.8) fixes this bug or will we have to apply this fix again?

    6. fedmich said on July 28, 2009 at 5:13 am
      Reply

      Great fix, exactly what I need now.
      wp 2.8.2 is still having this errors, hope they do something about this by 2.8.3

      thanks

    7. BadGirl44 said on October 13, 2009 at 10:57 am
      Reply

      Note how China has significantly closed the gap with these countries over time. ,

    8. JokinSu said on February 19, 2010 at 12:57 am
      Reply

      It’s works.

      Thanks a lot

    9. avi said on May 10, 2010 at 3:03 pm
      Reply

      thanks a lot

      its working by making comment the autosave option n postnew file.

    10. Steve said on May 25, 2010 at 6:43 pm
      Reply

      Yeah the error still exists in 2.9.2. Hoping for 3.0 to clear this issue up! Make sure to edit page-new.php also like Andy said.

    Leave a Reply