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

Update to support changes in Fizzie issue #72 for WordPress 6.0 & Gutenberg 13.5.2 #10

Open
bobbingwide opened this issue Jan 24, 2022 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

We need to cater for changes to Fizzie in the child theme Wizzie.
Also make similar changes to Wizzie for width related problems.

See bobbingwide/fizzie#72

@bobbingwide
Copy link
Owner Author

On woocommerce.wp.a2z/shop the "Shop" is not displayed.
In the editor the Template panel is not displayed.

On woocommerce.wp-a2z.org/shop the Shop is displayed.
In the editor the Template panel is not displayed.

For checkout the template panel is displayed.

@bobbingwide bobbingwide changed the title Update to support changes in Fizzie issue #72 for WordPress 5.9 Gutenberg 12.4.0 Update to support changes in Fizzie issue #72 for WordPress 6.0 & Gutenberg 13.5.2 Jul 6, 2022
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 6, 2022

On woocommerce.wp-a2z.org/shop the Shop is displayed.
In the editor the Template panel is not displayed.

  • On the Live site the request for shop is matched by a rule that treats the request as access to the product archive rather than an individual page.
  • This would explain why Edit page is not available.
  • The template that's being looked up is archive-product.
  • This doesn't exist in Wizzie nor Fizzie, so the next template is archive followed by index.
  • I don't know which template is actually being loaded.
  • The rendered template parts don't seem to match the index.html template.

In Live the WP_Rewrite rules contain

 [shop/?$] => (string) "index.php?post_type=product"
 [shop/feed/(feed|rdf|rss|rss2|atom)/?$] => (string) "index.php?post_type=product&feed=$matches[1]"
 [shop/(feed|rdf|rss|rss2|atom)/?$] => (string) "index.php?post_type=product&feed=$matches[1]"
 [shop/page/([0-9]{1,})/?$] => (string) "index.php?post_type=product&paged=$matches[1]"

These are not in the local WP_Rewrite rules.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 7, 2022

These are not in the local WP_Rewrite rules.

The shop rewrite rules are present in other local environments ( eg s.b/hm )

  • In s.b/hm, the shop page is displayed similarly to woocommerce.wp-a2z.org.
  • The theme is Written.
  • WooCommerce support is Not declared.
  • The shop page appears to display the header, then the WooCommerce shop ( woocommerce/legacy-template) and the footer.

I don't know which template is actually being loaded.

I do now. The archive-product template is provided by the woo-gutenberg-products-block and woocommerce plugins, in the templates\templates folder.

That explains what we see in the Live site and s.b/hm.
It doesn't explain why there aren't any rewrite rules for shop in woocommerce.wp-a2z.org.

@bobbingwide
Copy link
Owner Author

In s.b/hm I deactivated WooCommerce.
This didn't flush the rewrite rules. I needed to visit Settings > Permalinks to update them so that shop was no longer included.

@bobbingwide
Copy link
Owner Author

bobbingwide commented Jul 7, 2022

Having looked at how rewrite rules are created, I used oik-types to override the definition of the product CPT in s.b/hm to enable Clone content.

  • After flushing the rewrite rules the Shop page no longer worked.
  • The shop rewrite rules were missing.
  • It would appear that oik-types is to blame.
  • It doesn't cater for the has_archive parameter being a bool or a string.

I made the same change in woocommerce.wp.a2z and viewed Settings > Permalinks to flush the rewrite rules.
The Shop page was now being processed as the product archive - consistent with the Live site.

I need to raise an issue against oik-types to ensure that it uses the has_archive string setting, if defined.

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

No branches or pull requests

1 participant