Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#3895 closed defect (bug) (fixed)

Reloading the post editing screen in Firefox turns a post from Published to Private

Reported by: johnbillion's profile johnbillion Owned by: mdawaffe's profile mdawaffe
Milestone: 2.2 Priority: high
Severity: critical Version: 2.1
Component: Administration Keywords: has-patch commit
Focuses: Cc:

Description

Steps to reproduce:

  1. Crack open that blog in your Firefox browser and click on 'edit' on a published post, either from the blog itself or from Manage -> Posts.
  2. Once the editing page has loaded, click on reload in your browser window.
  3. Notice that the post's status changes from Published to Private (this can be seen under the 'Post Status' panel on the right hand side).

If you then save the post it will be saved as private, as you'd expect. Pages are not affected, only posts.

This only appears to affect Firefox and only tested on WinXP. It doesn't happen in IE6, IE7, Mozilla 1.7 or Opera 9 (all tested on WinXP).

I've been told by a few on #wordpress that wordpress.com is also affected.

This of course suggests it might be a Firefox bug, but I'm not sure how one would go about determining that.

Attachments (5)

dbx-2.01-formatted.js (20.8 KB) - added by johnbillion 17 years ago.
Nicely formatted version of DBX 2.01
dbx-2.05-formatted.js (21.1 KB) - added by johnbillion 17 years ago.
Nicely formatted version of DBX 2.05
dbx.js.diff (2.2 KB) - added by johnbillion 17 years ago.
A nicely formatted diff of DBX 2.01 and 2.05
3895.diff (1.3 KB) - added by mdawaffe 17 years ago.
3895b.diff (2.3 KB) - added by mdawaffe 17 years ago.
now with ver bumps

Download all attachments as: .zip

Change History (34)

#1 @foolswisdom
17 years ago

  • Milestone set to 2.1.2
  • Priority changed from normal to high
  • Severity changed from normal to critical

ENV: WP trunk r4956
Firefox 2.0.0.2

Confirmed bug.

It does not happen if you do a a hard (full refresh), only a soft refresh (click the fresh button in the toolbar).

#2 @ryan
17 years ago

Very well-written report. I shed a tear of joy as I read it. Thanks.

#3 @ryan
17 years ago

If you refresh over-and-over the status bounces back and forth between published and private.

#4 @ryan
17 years ago

Doesn't happen in 2.0.9. Does happen in 2.1.1.

#5 @ryan
17 years ago

Doesn't happen with JS disabled.

#6 @drmike
17 years ago

Confirm wordpress.com affected as well:

http://en.forums.wordpress.com/topic.php?id=8324
http://en.forums.wordpress.com/topic.php?id=8326

Although no report of what browser has been stated.

#7 @foolswisdom
17 years ago

This is caused by dbx 2.05 . Reverting to dbx 2.01 I no longer encounter this problem either on 2.0.10-alpha or trunk .

#8 @darkfate
17 years ago

Can someone create a diff between 2.01 and 2.05 to see where the problem lies?

#9 @majelbstoat
17 years ago

I'm not sure what file the problem is in, but you should be able to get a diff of the entire trunk between those revisions at:

http://trac.wordpress.org/changeset?old_path=trunk&old=4431&new_path=trunk&new=3503

(It's a big page).

#10 @foolswisdom
17 years ago

majelbstoat, I think you misunderstood my update and darkfate's question. The problem seems to be isolated to dbx.js .

#11 @majelbstoat
17 years ago

Aha, yes... I did *totally* misunderstand that... I thought it was an odd request :) oh well, sorry for the noise.

#13 follow-up: @darkfate
17 years ago

Maybe try using an uncompressed version. Sometimes compression mucks with javascript.

#14 in reply to: ↑ 13 @darkfate
17 years ago

Replying to darkfate:

Maybe try using an uncompressed version. Sometimes compression mucks with javascript.

Another thought. It is probably because the javascript doesn't load fully (for what ever reason). If that was the case, it would be a browser issue with cache instead of WP.

#15 follow-up: @johnbillion
17 years ago

Confirming the bug is still present when using an uncompressed version of DBX 2.05.

#16 in reply to: ↑ 15 ; follow-up: @rob1n
17 years ago

Replying to johnbillion:

Confirming the bug is still present when using an uncompressed version of DBX 2.05.

I believe the problem lies with 2.01, as foolswisdom expressed. Can you try with (un)compressed 2.01 DBX?

#17 in reply to: ↑ 16 @johnbillion
17 years ago

Replying to rob1n:

Replying to johnbillion:

Confirming the bug is still present when using an uncompressed version of DBX 2.05.

I believe the problem lies with 2.01, as foolswisdom expressed. Can you try with (un)compressed 2.01 DBX?

Will do shortly

#18 @johnbillion
17 years ago

As foolswisdom said there are no problems on DBX 2.01 compressed and uncompressed. I'll keep playing with 2.02 and 2.05.

#19 @johnbillion
17 years ago

Okay, I uploaded some nicely formatted versions of DBX but mucked it up. You can't delete files on Trac for some reason so now I feel like an idiot. I'll sort this out tomorrow after I've actually had some sleep.

#20 @masquerade
17 years ago

I took the liberty of clearing your muckups so there's no confusion later. :)

@johnbillion
17 years ago

Nicely formatted version of DBX 2.01

@johnbillion
17 years ago

Nicely formatted version of DBX 2.05

@johnbillion
17 years ago

A nicely formatted diff of DBX 2.01 and 2.05

#21 @johnbillion
17 years ago

Thanks masquerade!

I've attached three new files, a formatted version each of DBX 2.01 and 2.05, and a diff file of the two. As you can see, there's not a lot of difference.

I've found the problem area in 2.05 too, lines 44 to 59. When they're reverted back to 2.01 the problem disappears, however you also lose all the DBX funtionality for some reason.

So, two issues remain:

  1. I've no idea why this is the problem area, it just is.
  2. I've no idea how to fix it.

#22 @johnbillion
17 years ago

Whoops, that should say lines 44 to 60.

#23 @foolswisdom
17 years ago

  • Milestone changed from 2.1.4 to 2.2

#24 @rob1n
17 years ago

I'm +1 for just reverting DBX to a version where we can't reproduce this bug anymore.

#25 @mdawaffe
17 years ago

I'm working on this now.

Can reproduce with:

  • FF 2.0.0.3
  • OS X
  • source:trunk@5279
  • dbx order (important): cats, discussion, pass, slug, status, time, author

#26 @mdawaffe
17 years ago

  • Keywords has-patch commit added
  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

DBX was a red herring.

I can repro this with DBX 2.05, 2.02, 2.01 and with DBX turned off.

The problem is with AJAXcat. Somehow, adding the text field and button input elements via JS freaks FF out on reload. Adding the checkbox elements on the fly via AJAX does not, however.

I think it's a FF bug.

The fix: since the behavior is dependent on how many input elements are added via JS, we add enough input elements to eliminate the symptoms. Patch attached.

Patch also fixes an unrelated JS typo.

@mdawaffe
17 years ago

@mdawaffe
17 years ago

now with ver bumps

#27 @foolswisdom
17 years ago

Confirmed 3895.diff resolves the problem in my scenarios.

#28 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [5280]) AJAXcat fixes and FF workaround from mdawaffe. fixes #3895

Note: See TracTickets for help on using tickets.