The query monitor plugin shows several queries all related to the layered nav widget that are slowing things down.
Our shop sidebar has 16 layered nav widgets (some are category-specific so not all show on every category) so this is all adding up.
I’ve recounted the terms in System tools. At a loss how to fix.
I’m going remove most of the layered nav widgets to get the site back stable. But we may need to roll back WooCommerce to 2.5.5.
Below is an example of the queries for each widget that are slowing things down.
SELECT COUNT( DISTINCT wp_posts.ID ) as term_count, terms.term_id as term_count_id
FROM wp_posts
INNER JOIN wp_term_relationships AS term_relationships
ON wp_posts.ID = term_relationships.object_id
INNER JOIN wp_term_taxonomy AS term_taxonomy USING( term_taxonomy_id )
INNER JOIN wp_terms AS terms USING( term_id )
INNER JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_postmeta
ON ( wp_posts.ID = wp_postmeta.post_id )
INNER JOIN wp_postmeta AS mt1
ON ( wp_posts.ID = mt1.post_id )
WHERE wp_posts.post_type IN ( 'product' )
AND wp_posts.post_status = 'publish'
AND ( wp_term_relationships.term_taxonomy_id IN (126) )
AND ( ( wp_postmeta.meta_key = '_visibility'
AND CAST(wp_postmeta.meta_value AS CHAR) IN ('visible','catalog') )
AND ( mt1.meta_key = '_stock_status'
AND CAST(mt1.meta_value AS CHAR) = 'instock' ) )
AND terms.term_id IN (91,115,188,147,92,183,18,191,223,119,451,257,187,221,219,220,41,51,190,30,186,170)
GROUP BY terms.term_id
System Status Report Below
### WordPress Environment ###
Home URL: https://www.butterflysilver.com.au
Site URL: https://www.butterflysilver.com.au
WC Version: 2.6.2
Log Directory Writable: ✔
WP Version: 4.5.3
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: –
Language: en_AU
### Server Environment ###
Server Info: LiteSpeed
PHP Version: 5.6.23
PHP Post Max Size: 64 MB
PHP Time Limit: 300
PHP Max Input Vars: 1000
cURL Version: 7.36.0
OpenSSL/1.0.1e
SUHOSIN Installed: –
Max Upload Size: 64 MB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔
### Database ###
WC Database Version: 2.6.2
:
woocommerce_sessions: ✔
woocommerce_api_keys: ✔
woocommerce_attribute_taxonomies: ✔
woocommerce_downloadable_product_permissions: ✔
woocommerce_order_items: ✔
woocommerce_order_itemmeta: ✔
woocommerce_tax_rates: ✔
woocommerce_tax_rate_locations: ✔
woocommerce_shipping_zones: ✔
woocommerce_shipping_zone_locations: ✔
woocommerce_shipping_zone_methods: ✔
woocommerce_payment_tokens: ✔
woocommerce_payment_tokenmeta: ✔
### Active Plugins (38) ###
Query Monitor: by John Blackbourn – 2.11.1
Affiliate Tracking Pixel: by Prideglobe – 1.0.0
CloudFlare: by Ian Pye
Jerome Chen
James Greene
Simon Moore
David Fritsch
John Wineman (CloudFlare Team) – 1.3.24
Envato WordPress Toolkit: by Envato – 1.7.3
Gravity Forms: by rocketgenius – 2.0.2
Heartbeat Control: by Jeff Matson – 1.0.3
IgniteWoo Updater: by Ignition – 2.1.3
Instant Search + for WooCommerce Search: by Fast Simon Inc – 1.5.5
MailChimp for WordPress: by ibericode – 3.1.11
Nextend Facebook Connect: by Roland Soos – 1.5.9
Query Strings Remover: by Atul Kumar Pandey – 1.0
Regenerate Thumbnails: by Alex Mills (Viper007Bond) – 2.2.6
Search By SKU - for Woocommerce: by Matthew Lawson – 0.6.1
SEO Redirection: by Fakhri Alsadi – 3.6
WooCommerce Checkout Field Editor: by WooThemes – 1.4.10
WooCommerce Dynamic Pricing: by Lucas Stark – 2.11.1
WooCommerce eWAY Payment Gateway: by WooThemes – 3.1.9
WooCommerce PayPal Express Checkout Gateway: by Automattic/WooCommerce – 1.0.4
WooCommerce Google Analytics Integration: by WooThemes – 1.4.0
WooCommerce Order Status Manager: by – 2.6
WooCommerce Product Add-ons: by WooThemes – 2.7.19 – 2.7.20 is available
WooCommerce Product CSV Import Suite: by WooThemes – 1.10.10
WooCommerce Smart Coupons: by WooThemes – 3.1.1
WooCommerce - Store Exporter Deluxe: by Visser Labs – 2.1.4
WooCommerce Tab Manager: by WooThemes / SkyVerge – 1.6.1
WooCommerce: by WooThemes – 2.6.2
WooSidebars: by WooThemes – 1.4.3
WooThemes Helper: by WooThemes – 1.6.2
Wordfence Security: by Wordfence – 6.1.10
Yoast SEO: by Team Yoast – 3.3.4
WP All Import Pro: by Soflyy – 4.3.1
WP Maintenance Mode: by Designmodo – 2.0.7
WP-Optimize: by Ruhani Rabin – 1.9.1
WP All Import - WooCommerce Add-On Pro: by Soflyy – 2.3.0
YITH WooCommerce Wishlist: by YITHEMES – 2.0.16
### Settings ###
Force SSL: ✔
Currency: AUD ($)
Currency Position: left
Thousand Separator: ,
Decimal Separator: .
Number of Decimals: 2
### API ###
API Enabled: ✔
### WC Pages ###
Shop Base: #347591 - /shop/
Basket: #347592 - /cart/
Checkout: #347593 - /checkout/
My Account: #347594 - /my-account/
### Taxonomies ###
Product Types: bundle (bundle)
external (external)
grouped (grouped)
simple (simple)
variable (variable)
### Theme ###
Name: Flatsome Child Theme
Version: 2.5
Author URL: http:%20//www.uxthemes.com/
Child Theme: ✔
Parent Theme Name: Flatsome
Parent Theme Version: 2.9.5.1
Parent Theme Author URL: https://www.uxthemes.com/
WooCommerce Support: ✔
### Templates ###
Overrides: flatsome/woocommerce/archive-product.php
flatsome/woocommerce/cart/cart.php
flatsome/woocommerce/cart/proceed-to-checkout-button.php
flatsome/woocommerce/checkout/form-checkout.php
flatsome/woocommerce/content-product.php
flatsome/woocommerce/content-product_cat.php
flatsome/woocommerce/content-single-product.php
flatsome-child/woocommerce/emails/email-styles.php
flatsome/woocommerce/global/breadcrumb.php
flatsome/woocommerce/global/wrapper-end.php
flatsome/woocommerce/global/wrapper-start.php
flatsome/woocommerce/loop/loop-end.php
flatsome/woocommerce/loop/loop-start.php
flatsome/woocommerce/loop/orderby.php
flatsome/woocommerce/loop/pagination.php
flatsome/woocommerce/loop/sale-flash.php
flatsome/woocommerce/myaccount/form-login.php
flatsome/woocommerce/myaccount/navigation.php
flatsome/woocommerce/notices/error.php
flatsome/woocommerce/notices/success.php
flatsome/product-searchform.php
flatsome/woocommerce/single-product/add-to-cart/grouped.php
flatsome/woocommerce/single-product/add-to-cart/simple.php
flatsome/woocommerce/single-product/add-to-cart/variable.php
flatsome/woocommerce/single-product/add-to-cart/variation-add-to-cart-button.php
flatsome/woocommerce/single-product/price.php
flatsome/woocommerce/single-product/product-image.php
flatsome/woocommerce/single-product/product-thumbnails.php
flatsome/woocommerce/single-product/related.php
flatsome/woocommerce/single-product/review.php
flatsome/woocommerce/single-product/sale-flash.php
flatsome/woocommerce/single-product/share.php
flatsome/woocommerce/single-product/short-description.php
flatsome/woocommerce/single-product/tabs/additional-information.php
flatsome/woocommerce/single-product/tabs/description.php
flatsome/woocommerce/single-product/tabs/tabs.php
flatsome/woocommerce/single-product/title.php
flatsome/woocommerce/single-product/up-sells.php
flatsome/woocommerce/single-product-reviews.php
flatsome/woocommerce/single-product.php
https://www.ads-software.com/plugins/woocommerce/
]]>Is it the intention that the customer should be fooled and searching for sizes and get results that do not match because size is ‘out of stock’? Or have I missed something?
WordPress version 3.9.1, WooCommerce version 2.1.7
https://www.foten.se/
https://www.ads-software.com/plugins/woocommerce/
]]>https://www.ads-software.com/plugins/woocommerce/
]]>I would like to know how to set up the Layered Nav Widget. When I place it on my side bar there are no options available and I am just not sure about what is required to set this up.
Any help would be appreciated. Thanks!
https://www.ads-software.com/plugins/woocommerce/
]]>Indie
-Darjeeling
–Zahrada Godalphara
–Zahrada Phaskowa
?ína
-Anhui
-Fujian
…
You can see I want to have more ?levels“ visible on the frontend widget, not just sorted as it is now. I thought the attributes hierarchy would solve such a structure, where e.g. China is the parent attribute and counties are it’s children.
Has anyone couped with such issue?
Thanks for any advice
V.
https://www.ads-software.com/plugins/woocommerce/
]]>I added the Woocommerce Layered Nav widget manually to my shop page so that it appears as a dropdown on the top of the shop page. I did this through functions.php:
add_action( 'woocommerce_before_shop_loop', 'widgetized_shop_filter', 50 );
function widgetized_shop_filter() {
global $woocommerce;
echo '<form class="woocommerce-ordering" method="get">';
the_widget('WC_Widget_Layered_Nav', 'title=&attribute=irauthor&query_type=AND&display_type=dropdown');
echo '</form>';
}
It works fine on my test site: emaginetestbed.com/indireads/books, but on the live site, I get this error:
Warning: array_merge() [function.array-merge]: Argument #1 is not an array in /home/xxxx/indireads.com/wp-content/plugins/woocommerce/classes/widgets/class-wc-widget-layered-nav.php on line 56
Any idea why this would happen? I have a few extra extensions on the live site than on the test site (payment gateways). But I don’t see how this affects the widget. If I call the widget into a sidebar, I have no errors. It’s just where it’s called manually.
Am on a tight schedule, so any help would be appreciated.
https://www.ads-software.com/extend/plugins/woocommerce/
]]>