[wp-trac] [WordPress Trac] #43005: JavaScript error Cannot read property 'action' of null on chrome

WordPress Trac noreply at wordpress.org
Fri Jan 5 19:07:42 UTC 2018


#43005: JavaScript error Cannot read property 'action' of null on chrome
------------------------------------------------+--------------------------
 Reporter:  manikmist09                         |       Owner:
     Type:  defect (bug)                        |      Status:  new
 Priority:  normal                              |   Milestone:  Awaiting
Component:  Administration                      |  Review
 Severity:  normal                              |     Version:  4.9.1
 Keywords:  has-patch 2nd-opinion dev-feedback  |  Resolution:
                                                |     Focuses:  javascript
------------------------------------------------+--------------------------

Comment (by ediamin):

 Hi, I can confirm this is not related to Grammarly extension. I'm using
 Vue js in one of my plugins and got the same error. Here is my test plugin
 to reproduce the error:
 [https://github.com/ediamin/wp_action_error_reproduce_plugin]

 The main reason is in update.js we are listening for `message` event which
 is produced by `window.postMessage()`. Now, if any of the enqueued scripts
 has `postMessage('', 'http://yourdomain.com')`, then the `message` will be
 null and hence, `message.action` throws `Cannot read property 'action' of
 null` error.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43005#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list