#12954 closed defect (bug) (duplicate)
Javascript error upon updating scheduling date
| Reported by: | dd32 | Owned by: | azaozz |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | JavaScript | Version: | 3.0 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Hi,
updateText function() tried to distinguish between page and post; however, 'page' variable was not defined properly. Fixed.