Ticket #3895 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: johnbillion Assigned to: mdawaffe
Priority: high Milestone: 2.2
Component: Administration Version: 2.1
Severity: critical Keywords: has-patch commit
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

dbx-2.01-formatted.js (20.8 kB) - added by johnbillion on 03/15/07 04:43:27.
Nicely formatted version of DBX 2.01
dbx-2.05-formatted.js (21.1 kB) - added by johnbillion on 03/15/07 04:44:15.
Nicely formatted version of DBX 2.05
dbx.js.diff (2.2 kB) - added by johnbillion on 03/15/07 04:56:01.
A nicely formatted diff of DBX 2.01 and 2.05
3895.diff (1.3 kB) - added by mdawaffe on 04/17/07 19:42:19.
3895b.diff (2.3 kB) - added by mdawaffe on 04/17/07 19:52:42.
now with ver bumps

Change History

03/01/07 23:42:46 changed by foolswisdom

  • priority changed from normal to high.
  • severity changed from normal to critical.
  • milestone set to 2.1.2.

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).

03/02/07 00:44:54 changed by ryan

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

03/02/07 01:00:17 changed by ryan

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

03/02/07 01:41:06 changed by ryan

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

03/02/07 01:42:24 changed by ryan

Doesn't happen with JS disabled.

03/02/07 14:35:19 changed by drmike

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.

03/06/07 00:10:58 changed by foolswisdom

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 .

03/06/07 00:48:54 changed by darkfate

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

03/06/07 01:09:39 changed by majelbstoat

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).

03/06/07 01:30:56 changed by foolswisdom

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

03/06/07 01:37:03 changed by majelbstoat

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

03/06/07 18:15:27 changed by ryan

(follow-up: ↓ 14 ) 03/07/07 20:25:10 changed by darkfate

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

(in reply to: ↑ 13 ) 03/07/07 20:26:34 changed by darkfate

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.

(follow-up: ↓ 16 ) 03/08/07 02:14:26 changed by johnbillion

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

(in reply to: ↑ 15 ; follow-up: ↓ 17 ) 03/10/07 17:55:00 changed by 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?

(in reply to: ↑ 16 ) 03/10/07 18:39:56 changed by johnbillion

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

03/10/07 19:19:57 changed by johnbillion

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

03/11/07 05:47:14 changed by johnbillion

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.

03/11/07 05:53:39 changed by masquerade

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

03/15/07 04:43:27 changed by johnbillion

  • attachment dbx-2.01-formatted.js added.

Nicely formatted version of DBX 2.01

03/15/07 04:44:15 changed by johnbillion

  • attachment dbx-2.05-formatted.js added.

Nicely formatted version of DBX 2.05

03/15/07 04:56:01 changed by johnbillion

  • attachment dbx.js.diff added.

A nicely formatted diff of DBX 2.01 and 2.05

03/15/07 05:01:34 changed by johnbillion

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.

03/15/07 05:03:27 changed by johnbillion

Whoops, that should say lines 44 to 60.

04/12/07 18:34:42 changed by foolswisdom

  • milestone changed from 2.1.4 to 2.2.

04/15/07 22:08:22 changed by rob1n

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

04/17/07 18:26:56 changed by mdawaffe

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

04/17/07 19:42:08 changed by mdawaffe

  • keywords set to has-patch commit.
  • 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.

04/17/07 19:42:19 changed by mdawaffe

  • attachment 3895.diff added.

04/17/07 19:52:42 changed by mdawaffe

  • attachment 3895b.diff added.

now with ver bumps

04/17/07 19:55:38 changed by foolswisdom

Confirmed 3895.diff resolves the problem in my scenarios.

04/17/07 20:56:41 changed by ryan

  • status changed from assigned to closed.
  • resolution set to fixed.

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

04/17/07 23:30:37 changed by mdawaffe