WordPress.org

Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3895 closed defect (bug) (fixed)

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

Reported by: johnbillion Owned by: 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 8 years ago.
Nicely formatted version of DBX 2.01
dbx-2.05-formatted.js (21.1 KB) - added by johnbillion 8 years ago.
Nicely formatted version of DBX 2.05
dbx.js.diff (2.2 KB) - added by johnbillion 8 years ago.
A nicely formatted diff of DBX 2.01 and 2.05
3895.diff (1.3 KB) - added by mdawaffe 8 years ago.
3895b.diff (2.3 KB) - added by mdawaffe 8 years ago.
now with ver bumps

Download all attachments as: .zip

Change History (34)

comment:1 @foolswisdom8 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).

comment:2 @ryan8 years ago

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

comment:3 @ryan8 years ago

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

comment:4 @ryan8 years ago

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

comment:5 @ryan8 years ago

Doesn't happen with JS disabled.

comment:6 @drmike8 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.

comment:7 @foolswisdom8 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 .

comment:8 @darkfate8 years ago

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

comment:9 @majelbstoat8 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).

comment:10 @foolswisdom8 years ago

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

comment:11 @majelbstoat8 years ago

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

comment:13 follow-up: @darkfate8 years ago

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

comment:14 in reply to: ↑ 13 @darkfate8 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.

comment:15 follow-up: @johnbillion8 years ago

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

comment:16 in reply to: ↑ 15 ; follow-up: @rob1n8 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?

comment:17 in reply to: ↑ 16 @johnbillion8 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

comment:18 @johnbillion8 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.

comment:19 @johnbillion8 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.

comment:20 @masquerade8 years ago

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

@johnbillion8 years ago

Nicely formatted version of DBX 2.01

@johnbillion8 years ago

Nicely formatted version of DBX 2.05

@johnbillion8 years ago

A nicely formatted diff of DBX 2.01 and 2.05

comment:21 @johnbillion8 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.

comment:22 @johnbillion8 years ago

Whoops, that should say lines 44 to 60.

comment:23 @foolswisdom8 years ago

  • Milestone changed from 2.1.4 to 2.2

comment:24 @rob1n8 years ago

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

comment:25 @mdawaffe8 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

comment:26 @mdawaffe8 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.

@mdawaffe8 years ago

@mdawaffe8 years ago

now with ver bumps

comment:27 @foolswisdom8 years ago

Confirmed 3895.diff resolves the problem in my scenarios.

comment:28 @ryan8 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.