Skip to main content

Troubleshooting

Common issues and how to diagnose and fix them on the Scottsdale Mint retail site.


Product Grid / Slider Shows the Wrong Productsโ€‹

Symptomโ€‹

A Product Grid or Product Slider widget displays products that do not belong to the configured category or attribute filters. Typically all products (or a large random-looking set) appear instead of the expected filtered subset.

Root Causeโ€‹

This is caused by a deleted WooCommerce product attribute that is still referenced in the widget's Elementor settings.

What happens technically:

  1. A WooCommerce product attribute (e.g. Special Status / pa_special-status) is deleted from WooCommerce โ†’ Attributes.
  2. One or more Product Grid / Slider widgets still have an attr_* value saved in _elementor_data (e.g. "attr_special-status": ["alpha-strike"]).
  3. WordPress generates a tax_query that ANDs on a taxonomy (pa_special-status) that no longer exists, returning zero posts from WP_Query.
  4. The zero-result set triggers wc_get_products(['include' => []]) โ€” calling WooCommerce with an empty include array. WooCommerce/WordPress treats an empty post__in as no restriction, which returns all published products.

Fixโ€‹

Immediate: Re-save the page in Elementorโ€‹

Both the Product Slider and Product Grid widgets hook into elementor/document/save/data. When a page is saved, the hook automatically strips any attr_* setting whose WooCommerce attribute taxonomy no longer exists.

  1. Open the affected page in the Elementor editor.
  2. Click Update (no other changes needed).
  3. The stale attr_special-status (or whichever deleted attribute) is removed from _elementor_data on save.

Bulk fix: WP-CLI scriptโ€‹

If many pages are affected, run a WP-CLI script to clean all pages at once rather than opening each one in Elementor:

wp eval '
$registered = array_map( fn($t) => $t->attribute_name, wc_get_attribute_taxonomies() );
$posts = get_posts(["post_type" => ["page","post"], "posts_per_page" => -1, "meta_key" => "_elementor_data"]);
foreach ( $posts as $post ) {
$raw = get_post_meta( $post->ID, "_elementor_data", true );
$data = json_decode( $raw, true );
if ( ! $data ) continue;
$changed = false;
array_walk_recursive( $data, function( &$el ) use ( $registered, &$changed ) {
if ( ! is_array($el) || ! isset($el["widgetType"]) ) return;
if ( ! in_array($el["widgetType"], ["product-slider","product-grid"], true) ) return;
foreach ( array_keys($el["settings"] ?? []) as $key ) {
if ( str_starts_with($key,"attr_") && ! in_array(substr($key,5),$registered,true) ) {
unset($el["settings"][$key]);
$changed = true;
}
}
});
if ( $changed ) {
update_post_meta( $post->ID, "_elementor_data", wp_slash( json_encode($data) ) );
WP_CLI::success( "Cleaned post {$post->ID}: {$post->post_title}" );
}
}
'

How to Confirm the Causeโ€‹

Enable the Laravel Herd dump helper and add temporary debug output to the widget's render() method:

dump( $args );                   // See the full WP_Query args
dump( $query->request ); // See the generated SQL
dump( 'Posts: ' . count($posts) );

Check the SQL for a tax_query clause referencing a term_taxonomy_id that resolves to a deleted taxonomy. Confirm with:

SELECT term_taxonomy_id, taxonomy, t.name, t.slug
FROM wp_term_taxonomy tt
JOIN wp_terms t ON t.term_id = tt.term_id
WHERE term_taxonomy_id IN (/* IDs from the SQL */);

Product Grid / Slider Shows Zero Productsโ€‹

Symptomโ€‹

A Product Grid or Product Slider widget shows nothing (the widget is invisible on the front end).

Common Causesโ€‹

CauseHow to check
All matching products are out of stock and "Show Out of Stock" is noCheck the widget's Show Out of Stock setting. For collectible/limited-release product lines that are sold out but should still display, set this to Yes.
Both product_category AND attr_* are set and the intersection is emptyThe widget ANDs all tax_query clauses. If a product is in the category but doesn't have the attribute (or vice versa), it won't appear. Use one or the other unless products genuinely have both assigned.
Products are in the _exclude_from_search meta listProducts with _exclude_from_search = yes are excluded via post__not_in. Check the product's meta.
Deleted attribute still in widget settingsSee Wrong Products above. After fixing, re-save the page.

Empty Result Behaviourโ€‹

When zero products match, the widget does not fall back to all products (this was a bug that has been fixed). Instead:

  • If Empty Behavior is set to "" (default) โ†’ the .product-slider / .product-grid DOM element is silently removed.
  • If Empty Behavior is hide_parent and a Parent Selector is configured โ†’ the matched parent element is removed from the DOM.

The widget is intentionally invisible rather than showing incorrect data.


Pricing Not Updating on Product Pagesโ€‹

See the Pricing Architecture docs for how the 1-minute NFusion โ†’ Laravel โ†’ WordPress price update pipeline works and how to diagnose stalls.


Kount Fraud Decisions Not Arrivingโ€‹

See the Fraud Prevention docs and the Kount ENS endpoint documentation.


Algolia Search Returns Stale Resultsโ€‹

If product changes aren't reflected in search:

  1. Check the Algolia sync log in WooCommerce โ†’ Algolia (or via Wonolog).
  2. Manually trigger a re-index: wp algolia re-index --all.
  3. Verify the correct index prefix is set for the environment (scottsdale_prod_ in production, scottsdale_local_v2_ locally) โ€” see Environment Configuration.