Save the Internet: Click here


Kickass Web Design creates Custom WordPress Themes, CubeCart Templates, ModX Templates, Movable Type Themes, ZenCart Themes, Drupal Themes, Tolranet Directory Script Templates, as well as templates for other web applications. Dreamweaver Templates also available. We can match your current design or create something totally new and different. Interested? Request a Custom Website Template Quote.


‘Are you sure you want to edit this?’ Error in WordPress after upgrade

Since I’m currently doing a lot of upgrades to get all my clients up to the newest version of WordPress, an ugly and frustrating problem has reared its head. The most frustrating thing about it is it’s a problem that has existed since WordPress 2.1 Upgrades, and it still hasn’t been fixed. The newest version is 2.3.2. Can we say “oops” ???

Threads on this problem are on the WordPress Forum here:

Are you sure you want to edit this post?

“are you sure you want to edit this post” nightmare

The problem occurs after you upgrade. You’re writing a new post in Wordpress and you take long enough writing it that the autosave feature kicks in. Then what happens is that when you hit the “publish” button, you are sent to the screen that asks “Are you sure you want to edit this?” which is bizarre since it’s a new post. If you click yes, the post is lost forever and publish doesn’t happen, which tends to piss off the post author pretty severely. Yes, I was one of the people who screamed. So did a couple of my clients.

There is a fix that works well, but there’s also an issue with the fix. This is the fix, and thank you, billybrasov!

ok, i find one solution (for the moment and work for me )

you haft to delete this 2 lines.

the line 58 from : wp-admin/post.php

this is the line 58: “wp_enqueue_script(’autosave’);”

and the line 8 from : wp-admin/post-new.php

this is the line 8: “wp_enqueue_script(’autosave’);”

if you delete this 2 lines everything will be all right..

The line numbers may vary a bit from the numbers stated here, but I found those two bits with no problem, and it does indeed cure the problem, though I just commented them out instead of deleting them entirely. However, there is a gotcha.

I just did an upgrade and used 2.3.2 with those two modified files to complete the upgrade. The upgrade went smoothly BUT when I tried to turn the plugins back on, I got an error. So I overwrote those files with the original versions. Plugins then could be turned back on. I uploaded the altered files afterward. Oddly enough I can now turn plugins on and off with no problem. Strange.

Anyway, it’s a minor issue to upload the fix after the upgrade, but I gotta say that this is a bug that should have been fixed a LONG time ago.

** Update ** This problem seems to happen ONLY on upgrades where a database upgrade takes place. This is just an observation, and probably won’t make a difference to most people, but any dev looking at this now at least has a pointer to where the issue might lie.

Technorati Tags: ,

Share this post:
  • blogmarks
  • del.icio.us
  • digg
  • Furl
  • NewsVine
  • Spurl
  • YahooMyWeb

6 Responses to “‘Are you sure you want to edit this?’ Error in WordPress after upgrade”

  1. vkaryl Says:

    No shit Sherlock…. and of course, I’m going to have to upgrade anyone who’s not going to care about the changes between the 2.0+ branch and the 2.3+ branch.

    I’m still not certain what I’m doing on my own…. I may got to the 2.3+ branch just so I don’t have to think about “age-outs”. I dunno…. I hate it when I waffle!

  2. Don Says:

    My fix for the moment is this, click save, click yes to the question when it comes up, click back twice to get back to my post, click save again and click yes again and it posts the page/post. Don’t know why, but I have to do it twice for it to work …

  3. BJ Says:

    vkaryl, in a lot of ways I’ve found the 2.3 branch to be better, though stupidities like this still irk me. That and the fact that blockquote in the simpletext editor is guaranteed to give you invalid code, yet the rich text editor is still awful and broken.

    Don, I’m glad you found an alternative fix. I do wish they’d fix this though so people don’t have to jump through these stupid hoops. The software is just supposed to WORK. You, as a person who installed wordpress yourself, can choose to “do it twice” but I can’t very well tell a client that he or she has to “do it twice” for it to work.

    For the record, the problem only appears to come up on blogs where the database needs updating during the upgrade.

  4. Rachel Says:

    I started having this problem when I saved a post with just a number in the title. In addition to this annoying question, the Visual Editor has disappeared and none of the buttons in the Code Editor show up unless I unselected the option for the Visual Editor. It almost seems like the post with only a number (935) in the title corrupted something.

    And no upgrades or anything - just that post, and weird things started to happen. I’ve been posting like crazy for a couple weeks now without either of these problems until today when I posted my fateful “935″ post… It’s really bizarre…

  5. affa Says:

    This problem is killing me. In regards to your update - this is occurring for me on two fresh installs. No ‘database upgrades’.

  6. adamthehutt Says:

    I’m having the problem on a fresh install as well. Major PITA.

Leave a Reply


Vista KnowledgeBase Launches on a Custom WordPress Design
vistaknowledgebase250.jpg