[wp-trac] [WordPress Trac] #32948: media_upload_header() outputs unenclosed post_type string

WordPress Trac noreply at wordpress.org
Thu Jul 9 18:08:07 UTC 2015


#32948: media_upload_header() outputs unenclosed post_type string
----------------------------------------+-----------------------------
 Reporter:  kylegilman                  |      Owner:
     Type:  defect (bug)                |     Status:  new
 Priority:  normal                      |  Milestone:  Awaiting Review
Component:  Media                       |    Version:  trunk
 Severity:  normal                      |   Keywords:
  Focuses:  javascript, administration  |
----------------------------------------+-----------------------------
 I'm seeing "Uncaught ReferenceError: post is not defined" in the
 JavaScript console whenever I load a custom Media Upload tab. I looked
 into it and the media_upload_header() function at source:trunk/src/wp-
 admin/includes/media.php at 32964#L1752 adds the post_type as a JavaScript
 variable without enclosing it in quotes. In previous versions of WordPress
 it only output the post_id which is also not enclosed, but it's an integer
 so there wasn't an error.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/32948>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list