0

Our WP system uses the following plugins:

  • WooCommerce v3.4.4
  • WooCommerce Stock Manager v1.2.6
  • Display Productfor WooCommerce v2.0.19
  • Sorting WooCommerce Pro v4.0
  • Salient Theme v7.0.8
  • Salient Visual Composer v4.11.2

Following a migration, the product category web pages no longer work correctly. They show all products instead of those from the selected category. Also, the filter/sorter has appeared below the header. However, the products show the correct categories in admin.

How would I best debug this issue?

I can output the SQL that selects the category name using print $wp_query->request; in the page.php template, but how can I debug the product selection that references the category, please?

2
  • I think the product data looks ok, I've checked it with the following Sql: SELECT p.ID as product_id, p.post_title as product_name, p.post_status, t.term_id as cat_id, t.name as category_name FROM wp_posts as p LEFT JOIN wp_term_relationships rs ON (rs.object_id = p.ID) LEFT JOIN wp_term_taxonomy tt ON (rs.term_taxonomy_id = tt.term_taxonomy_id) LEFT JOIN wp_terms t ON (tt.term_id = t.term_id) WHERE (p.post_type = "product" or p.post_type = "product_variation") AND tt.taxonomy = "product_cat" AND p.post_status <> "closed"
    – Nick W
    Aug 17, 2018 at 16:07
  • I've compared the difference between the options table for the site that works and the one that doesn't. I notice some differences for the option values for option_name 'salient_redux', but they only look like difference in id values eg s:86: compared to s:87: for image urls in the uploads directory.
    – Nick W
    Aug 17, 2018 at 17:29

1 Answer 1

0

I found there were 195 dp_* settings missing the correct settings in the ‘wp_postmeta’ table, once they were replaced it worked. I assume they were lost during the migration.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.