Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Urgent bug - Categories are being displayed before products on all shop archives #15

Closed
JiveDig opened this issue Jan 30, 2018 · 14 comments

Comments

@JiveDig
Copy link

JiveDig commented Jan 30, 2018

I have 3 products in the Mountain Bike category. When I go to the Mountain Bike category archive I see this:

screen shot 2018-01-30 at 3 26 07 pm

That is the entire category loop. It displays on the shop and on all product cat/tag archives.

In genesiswooc_content_product() there is woocommerce_product_subcategories(). I think there needs to be some checks like:

$display_type = woocommerce_get_loop_display_mode();
If displaying categories, append to the loop.
if ( 'subcategories' === $display_type || 'both' === $display_type ) {
	woocommerce_product_subcategories();
}

It works, but not fully tested. IMO this is a breaking bug and needs to get fixed ASAP.

FWIW, I'm pretty sure something changed in Woo 3.3.0 that caused this. I can't recreate the bug pre-3.3, but I can see it on various G child themes, and G itself, on different servers/installs.

@dreamwhisper
Copy link
Contributor

@nathanrice We have a couple of tickets in desk about this and I've replicated on our test demos.

@SSSV
Copy link

SSSV commented Jan 30, 2018

I am experiencing the same thing. This is with G-Connect activated...

image 2018-01-30 at 12 32 02 pm

With G-Connect deactivated, a random image is being pulled in to the Woo product archive. This image is not the image associated with that product category so I'm not sure where this is coming from. With G-Connect deactivated...

image 2018-01-30 at 12 27 21 pm

@nathanrice
Copy link
Contributor

Can someone who is having the issue take a look at 376a864 and maybe pull down the changed file and swap it into your plugin to see if that clears things up for you?

@dreamwhisper
Copy link
Contributor

dreamwhisper commented Jan 30, 2018

@nathanrice It's working on the test links I sent you in Slack.

If anyone has any oddities even with the file update, resave wp-admin/admin.php?page=wc-settings&tab=products

Edited to add the other settings also appear to work.

@timothyjensen
Copy link
Member

timothyjensen commented Jan 31, 2018

I tested the WooCommerce PR that addresses this very issue, and it restores the product archive back to normal (no product categories at the top of the archive).

Nathan's latest commit also fixes the product archive, which means I don't need to wait for WooCommerce to release 3.3.1 👍.

@claudiulodro
Copy link

The culprit is a behavior change in woocommerce_product_subcategories. We'll have a backwards-compatibility patch in WooCommerce 3.3.1(woocommerce/woocommerce#18676), but updating the template file to match the WooCommerce archive-product.php template in 3.3 will also fix the issue.

@Frenchomatic
Copy link

@nathanrice Looking good. WP 4.9.2 + Genesis 2.5.3 + Infinity Pro theme. You may need to go into the customzier and reset the number of products in a row again but apart from that your patch seems to work for me.

@nickcernis
Copy link
Contributor

This patch is also working in my tests.

@kardingdeira
Copy link

Hi Is these working for any templates?

@nickcernis
Copy link
Contributor

nickcernis commented Jan 31, 2018

@kardingdeira If you're using a Genesis child theme with Genesis Connect and seeing categories on your shop page, there's a manual template fix for this issue you can use here: https://wordpress.org/support/topic/categories-showing-on-shop-page-after-wc-3-3/#post-9921116

If you need further help with this, you're welcome to start a new topic in the WordPress plugin forum, submit a ticket at https://my.studiopress.com/help/, or email support [at] studiopress [dot] com.

@kardingdeira
Copy link

thank you, sorry I am not using a Genesis theme, but is other Template

@nickcernis
Copy link
Contributor

@kardingdeira No problem! If you're experiencing this with another theme it's best to contact the theme developer. You are welcome to link to this page in case it helps to solve their own theme issue faster.

@kardingdeira
Copy link

kardingdeira commented Jan 31, 2018 via email

@nickcernis
Copy link
Contributor

Confirmed this is fixed in production with the 0.9.10 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants