[wp-trac] [WordPress Trac] #50507: The modal window is blank depending on the URL

WordPress Trac noreply at wordpress.org
Mon Jun 29 13:33:08 UTC 2020


#50507: The modal window is blank depending on the URL
--------------------------------+-----------------------------
 Reporter:  madeinua            |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  External Libraries  |    Version:  5.4.2
 Severity:  minor               |   Keywords:  has-patch
  Focuses:  ui, javascript      |
--------------------------------+-----------------------------
 Hi there,

 I found that the function tb_parseQuery() can incorrectly parse some URLs
 that lead to incorrect displaying of modal windows: they are empty because
 of the undefined parameter "inlineId".

 Sample URL:

 https://test.localhost/wp-admin/index.php#TB_inline?inlineId=modal_123

 tb_parseQuery() of this URL returns nothing.

 Should be:

 Object { page: "media#TB_inline", inlineId: "modal_123" }

 The solution to the problem is to change this:

 {{{
 var Pairs = query.split(/[;&]/);
 }}}

 into this

 {{{
 var Pairs = query.split(/[;&?]/);
 }}}

 Not sure if this will not break something else, but it makes the Thickbox
 window work.

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


More information about the wp-trac mailing list