Title: Virtue theme causing js errors
Last modified: August 23, 2019

---

# Virtue theme causing js errors

 *  [ChristofferBaker](https://wordpress.org/support/users/christofferbaker/)
 * (@christofferbaker)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/)
 * I am getting the following errors in my console on my page: They appear to be
   preventing some of my plugins from working too.
 * Uncaught TypeError: Cannot read property ‘defaults’ of undefined
    at HTMLDocument.
   <anonymous> (virtue_main.min.js:2) at c (jquery.min.js?ver=5250f345529fcfd08605d80a24b93523:
   3) at Object.fireWith [as resolveWith] (jquery.min.js?ver=5250f345529fcfd08605d80a24b93523:
   3) at Function.ready (jquery.min.js?ver=5250f345529fcfd08605d80a24b93523:3) at
   HTMLDocument.H (jquery.min.js?ver=5250f345529fcfd08605d80a24b93523:3)
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvirtue-theme-causing-js-errors%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [hannah](https://wordpress.org/support/users/hannahritner/)
 * (@hannahritner)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/#post-11860707)
 * Hey,
    I would suggest deactivating your plugins to test if any are conflicting.
   Let me know if there’s no change.
 * Hannah
 *  [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/#post-11861506)
 * Hey,
    I noticed a few 404 errors for files that seem to be an incorrect request.
   But it seems like those requests are coming from your child theme. Would it be
   possible for you to deactivate your child theme as a test and only activate the
   parent theme.
 *  Thread Starter [ChristofferBaker](https://wordpress.org/support/users/christofferbaker/)
 * (@christofferbaker)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/#post-11861624)
 * Hi Ben,
 * Using the main theme does remove those 404 errors so I will look into that. But
   the main error still remains:
 * Uncaught TypeError: Cannot read property ‘defaults’ of undefined
    at HTMLDocument.
   <anonymous> (virtue_main.min.js:2) at i (jquery.js:2) at Object.fireWith [as 
   resolveWith] (jquery.js:2) at Function.ready (jquery.js:2) at HTMLDocument.J (
   jquery.js:2)
 *  Thread Starter [ChristofferBaker](https://wordpress.org/support/users/christofferbaker/)
 * (@christofferbaker)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/#post-11861633)
 * I have logged a support ticket with SiteGround.com, our host. After deactivating
   all the plugins I found the error only returned when reactivating SG Optimiser
   which is their feature plugin required for WordPress support. I’ll let you know
   if I get anything from them.
 *  [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * (@britner)
 * [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/#post-11861812)
 * Hey,
    It could be that your plugin is createing a new compressed file and caching
   it. If that plugin is not recreating files after a theme update then that could(
   would) cause your issue.
 * Most plugin like that offer a way to rebuild the scripts.
 * Ben

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

The topic ‘Virtue theme causing js errors’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/virtue/3.4.14/screenshot.png)
 * Virtue
 * [Support Threads](https://wordpress.org/support/theme/virtue/)
 * [Active Topics](https://wordpress.org/support/theme/virtue/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/virtue/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/virtue/reviews/)

## Tags

 * [js](https://wordpress.org/support/topic-tag/js/)

 * 5 replies
 * 3 participants
 * Last reply from: [Ben Ritner – Kadence WP](https://wordpress.org/support/users/britner/)
 * Last activity: [6 years, 8 months ago](https://wordpress.org/support/topic/virtue-theme-causing-js-errors/#post-11861812)
 * Status: not resolved