#12954 closed defect (bug) (duplicate)
Javascript error upon updating scheduling date
Reported by: | dd32 | Owned by: | azaozz |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.0 |
Component: | JavaScript | Keywords: | |
Focuses: | Cc: |
Description
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
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/post.dev.js?ver=20100403: if ( page ) called from line 510, column 3 in <anonymous function>() in http://localhost/wordpress-commit/wp-admin/js/post.dev.js?ver=20100403: 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: i=i.handler.apply(this,arguments); 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 ); else $('#publish').val( postL10n.updatePost );
page is referenced twice in the same format, I cant see anywhere in the file its mentioned.
Attachments (1)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Hi,
updateText function() tried to distinguish between page and post; however, 'page' variable was not defined properly. Fixed.