[wp-trac] [WordPress Trac] #46280: Uncaught javascript error on comment-reply.js

WordPress Trac noreply at wordpress.org
Tue Feb 19 14:12:38 UTC 2019


#46280: Uncaught javascript error on comment-reply.js
--------------------------+-----------------------------
 Reporter:  xknown        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Comments      |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In r42360, there was a change that adds the following code
 {{{
 var supportsDataset = !! document.body.dataset;
 }}}
 While this seems to work in most cases, some (legacy) themes use XHTML
 doctype declarations like the classic p2
 ([https://themes.trac.wordpress.org/browser/p2/1.5.8/header.php#L8]).
 Using this theme along with WordPress 5.1, there's the following error
 being shown in the JS console
 {{{
 Uncaught TypeError: Cannot read property 'dataset' of null
 }}}

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


More information about the wp-trac mailing list