joshdb
Forum Replies Created
-
I reinstalled the Speed Optimizer plugin and the issue returned.
After disabling the “Defer Render-blocking JavaScript” setting, it seems to resolve the issue.
This setting is enabled by default, so I imagine I’m not the first person that this has been an issue for.
- This reply was modified 1 year, 3 months ago by joshdb.
TL;DR
Speed Optimizer 7.4.4 by SiteGround is the problem.
Versions
- WordPress: 6.4.2
- WooCommerce: 8.3.1
- WooCommerce – ShipStation Integration: 4.3.9
- WooCommerce – Shipping and Tax: 2.4.2
- WooPayments: 6.9.1
wp-includes and wp-admin directories deleted then replaced from a fresh WordPress install did not have any effect.
I took a look at where jquery scripts are being loaded and they are in the body tag after the page content grouped with other script tags. The domain replaced with “[domain.com]”.
<script defer type="text/javascript" src="https://[domain.com]/wp-includes/js/jquery/jquery.min.js?amp;ver=3.7.1" id="jquery-core-js"></script> <script defer type="text/javascript" src="https://[domain.com]/wp-includes/js/jquery/jquery.min.js?amp;ver=3.7.1" id="jquery-core-js"></script> <script defer type="text/javascript" src="https://[domain.com]/wp-includes/js/jquery/jquery-migrate.min.js?amp;ver=3.4.1" id="jquery-migrate-js"></script>
I see that they have the defer attribute, but that might not guarantee that the scripts load in time for other scripts.
<script defer type="text/javascript" src="https://stats.wp.com/w.js?amp;ver=202349" id="woo-tracks-js"></script>
The above script appears just before the aforementioned jquery scripts, while all other WooCommerce scripts appear after the jquery scripts.
I went through all my plugins again disabling them one at a time as before and found that the following plugin was the issue:
Speed Optimizer 7.4.4 by SiteGround
Do not use this plugin if you are also using WooCommerce.
When this plugin is disabled, a group of script tags (including the 3 jquery script tags) are now located in the head tag instead of the body tag and they no longer have the defer attribute.
Thank you for your help. Your insights pushed me to better understand what was going on, investigate and understand why the issue was occurring.
I’d also like to add that when viewing the site while logged into the WordPress admin panel and previewing the site, the “Uncaught TypeError” and “Uncaught ReferenceError” do not occur.
When activating the Storefront?theme and testing again, I receive the same error.
I should mention I get two other types of errors that occur on page load:
- Uncaught ReferenceError: jQuery is not defined wp-util.min.js?ver=6.4.2:2
- There are also a bunch of errors related to Kaspersky, but those all seem related to CSS.
Oddly enough the first error which occurs 3 times (one from the aforementioned file and twice inline) is followed by:
JQMIGRATE: Migrate is installed, version 3.4.1 jquery-migrate.min.js?amp;ver=3.4.1:2
This error occurs regardless of the selected theme. It seems like it may be related to the original error, but I’m unsure.
Forum: Plugins
In reply to: [Yoast SEO] Yoast Plugin Disables User Accounts After Cloning WebsiteSteps to duplicate site
1. Setup cPanel requirements (if required)
2. Create offline backup of files, database and theme
3. Create online recovery backup of files and database
4. Copy files, update wp-config.php and .htaccess, copy/update database and theme
5. Disable Yoast plugin if unable to log in to WordPress
6. Finish step 4
7. Enable Yoast pluginThis happens on the same server environment using the same domain.
It may have also happened on the same server environment but from a different domain as well, but I cannot confirm this with 100% certainty.