Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#12954 closed defect (bug) (duplicate)

Javascript error upon updating scheduling date

Reported by: dd32's profile dd32 Owned by: azaozz's profile azaozz
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: JavaScript Keywords:
Focuses: Cc:


Schedule a post for publish at a later date, Click OK, Save the post.

Edit the scheduling on the post to a future date(note: previous date not affected), attempt to click OK, experience a JS error


JavaScript - http://localhost/wordpress-commit/wp-admin/post.php?post=438&action=edit

Uncaught exception: ReferenceError: Undefined variable: page
Error thrown at line 388, column 4 in updateText() in http://localhost/wordpress-commit/wp-admin/js/
    if ( page )
called from line 510, column 3 in <anonymous function>() in http://localhost/wordpress-commit/wp-admin/js/
    if ( updateText() )
called via Function.prototype.apply() from line 55, column 294 in <anonymous function: handle>(a) in http://localhost/wordpress-commit/wp-includes/js/jquery/jquery.js?ver=1.4.2:
called via Function.prototype.apply() from line 49, column 569 in <anonymous function: o>() in http://localhost/wordpress-commit/wp-includes/js/jquery/jquery.js?ver=1.4.2:
    return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(o.elem,arguments):w

Code in question:

				if ( page )
					$('#publish').val( postL10n.updatePage );
					$('#publish').val( postL10n.updatePost );

page is referenced twice in the same format, I cant see anywhere in the file its mentioned.

Attachments (1)

post_type_page.diff (641 bytes) - added by harry.nguyen 14 years ago.

Download all attachments as: .zip

Change History (6)

#1 @harry.nguyen
14 years ago

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


updateText function() tried to distinguish between page and post; however, 'page' variable was not defined properly. Fixed.

#2 @nacin
14 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

#3 follow-up: @ocean90
14 years ago

Similar to #12829, #12834 and #12928

#4 in reply to: ↑ 3 @duck_
14 years ago

  • Resolution set to duplicate
  • Status changed from reopened to closed

Replying to ocean90:

Similar to #12829, #12834 and #12928

#5 @nacin
14 years ago

  • Milestone 3.0 deleted
Note: See TracTickets for help on using tickets.