Title: Uncaught TypeError: Cannot read property &#8216;top&#8217; of undefined
Last modified: February 20, 2017

---

# Uncaught TypeError: Cannot read property ‘top’ of undefined

 *  [eatsleepcode](https://wordpress.org/support/users/eatsleepcode/)
 * (@eatsleepcode)
 * [9 years, 3 months ago](https://wordpress.org/support/topic/error-onload/)
 * The following error is thrown into the console when viewing a non-admin page.
   This renders the Query Monitor menu useless. It works fine from the admin pages.
 * Removing the db.php symlink results in no more error, but then of course I can’t
   get the detailed query information:
 *     ```
       Uncaught TypeError: Cannot read property 'top' of undefined
           at HTMLDocument.<anonymous> (/wp-content/plugins/query-monitor/assets/query-monitor.js?ver=1487622877:67)
           at i (jquery.js:2)
           at Object.fireWith [as resolveWith] (jquery.js:2)
           at Function.ready (jquery.js:2)
           at HTMLDocument.K (jquery.js:2)
       ```
   
 * —
 * I note this when I view the Elements in Chrome’s developer tools — only when 
   the db.php symlink is in place –, not sure if that has anything to do with it.
 * PHP Error in AJAX Response”,”infinitescroll_paused”:”Infinite Scroll has been
   paused by Query Monitor”
 * —
 * There are no Query Monitor stats being rendered to the DOM.
    -  This topic was modified 9 years, 3 months ago by [eatsleepcode](https://wordpress.org/support/users/eatsleepcode/).
    -  This topic was modified 9 years, 3 months ago by [eatsleepcode](https://wordpress.org/support/users/eatsleepcode/).
    -  This topic was modified 9 years, 3 months ago by [eatsleepcode](https://wordpress.org/support/users/eatsleepcode/).
    -  This topic was modified 9 years, 3 months ago by [eatsleepcode](https://wordpress.org/support/users/eatsleepcode/).

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [9 years, 3 months ago](https://wordpress.org/support/topic/error-onload/#post-8830319)
 * Thanks for the message.
 * There may be an error occurring in PHP which is ultimately causing this. Can 
   you take a look in your PHP error log and see if there’s a fatal error?
 * Can you let me know which theme you’re using? Also, could try switching to one
   of the default themes (eg. Twenty Seventeen) and see if the error persists?
 * John
 *  [houssameddin](https://wordpress.org/support/users/houssameddin/)
 * (@houssameddin)
 * [9 years, 2 months ago](https://wordpress.org/support/topic/error-onload/#post-8886284)
 * Hi John, I am facing the same issue. I am using a child theme. when I switched
   to the original theme it worked well but its not working in front end for the
   child theme. So doesn’t the plugin work with child themes? thanks.
 *  Plugin Author [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * (@johnbillion)
 * WordPress Core Developer
 * [9 years, 2 months ago](https://wordpress.org/support/topic/error-onload/#post-8886943)
 * It sounds like there’s a problem with the specific child theme you’re using (
   not child themes in general).
 * Can you take a look in your PHP error log and see if there’s a fatal error being
   logged?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Uncaught TypeError: Cannot read property ‘top’ of undefined’ is closed
to new replies.

 * ![](https://ps.w.org/query-monitor/assets/icon.svg?rev=2994095)
 * [Query Monitor](https://wordpress.org/plugins/query-monitor/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/query-monitor/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/query-monitor/)
 * [Active Topics](https://wordpress.org/support/plugin/query-monitor/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-monitor/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-monitor/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [John Blackbourn](https://wordpress.org/support/users/johnbillion/)
 * Last activity: [9 years, 2 months ago](https://wordpress.org/support/topic/error-onload/#post-8886943)
 * Status: not resolved