Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#12829 closed defect (bug) (fixed)

JS for page/post submit meta-box doesn't update page dynamically

Reported by: duck_'s profile duck_ Owned by: azaozz's profile azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version: 3.0
Component: JavaScript Keywords: has-patch needs-testing
Focuses: Cc:

Description

Go to edit the page/post status or visibility in the submit meta box, then click the cancel button. The page then jumps to element with id="post_status" or id="visibility" (jumping doesn't occur for published on because no id="edit_timestamp").

I believe this occurs because there is a javascript error in post.js where the variable "page" is not defined. Introduced in r13551 when "page" declaration was removed when another occurrence of its use was removed.

Attachments (2)

post.dev.js.diff (439 bytes) - added by duck_ 15 years ago.
post.dev.js.2.diff (788 bytes) - added by duck_ 15 years ago.
var post only used in updateText(), declaring it there probably makes more sense

Download all attachments as: .zip

Change History (6)

@duck_
15 years ago

#1 @duck_
15 years ago

  • Keywords has-patch needs-testing added

#2 @duck_
15 years ago

  • Summary changed from Page/post misc publishing actions cancel buttons cause page to jump to id tag to JS for page/post submit meta-box doesn't update page dynamically

Actually worse than just the jumping to the element with matching id. The entire post submit meta box doesn't update on the page dynamically when new options from status, visibility or published on.

E.g. try changing published page to draft (edit, select draft, click ok). Status text stays as "Published" and submit button doesn't change to "Update Page".

@duck_
15 years ago

var post only used in updateText(), declaring it there probably makes more sense

#3 @ocean90
15 years ago

See also #12834.

#4 @dd32
15 years ago

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

See wordpress: dd32 * r14125 /trunk/ (3 files in 2 dirs): Fix undefined page var in Post Javascript; Fixes inactive cancel button in Publish time selection. Props duck_. Fixes #12829

Note: See TracTickets for help on using tickets.