woocommerce / pinterest-for-woocommerce

A native Pinterest integration for WooCommerce. Development is managed by Ventures.
https://woo.com/products/pinterest-for-woocommerce/
GNU General Public License v3.0
22 stars 9 forks source link

Pinterest landing page displays "Not allowed" with WordPress 6.6 #1031

Open ecgan opened 3 days ago

ecgan commented 3 days ago

Describe the bug:

I'm doing WordPress 6.6 compatibility testing in issue https://github.com/woocommerce/pinterest-for-woocommerce/issues/1030.

I found that when we are using WordPress 6.6-RC2, the Pinterest plugin admin landing page (/wp-admin/admin.php?page=wc-admin&path=%2Fpinterest%2Flanding) shows "Sorry, you are not allowed to access this page."

image

There is also a console error:

image

setup-guide.js?ver=32b64018a91d8be20cc4e58862df4f99:1 Uncaught TypeError: Cannot read properties of undefined (reading 'mark')
    at Module.<anonymous> (setup-guide.js?ver=32b64018a91d8be20cc4e58862df4f99:1:285178)
    at a (setup-guide.js?ver=32b64018a91d8be20cc4e58862df4f99:1:774)
    at r (setup-guide.js?ver=32b64018a91d8be20cc4e58862df4f99:1:643)
    at setup-guide.js?ver=32b64018a91d8be20cc4e58862df4f99:1:1713
    at setup-guide.js?ver=32b64018a91d8be20cc4e58862df4f99:1:1717

I have a feeling that this is related to conflict with WordPress packages (e.g. @wordpress/data package, dependency extraction).

This issue does not happen when I downgrade to WordPress version 6.5.

Steps to reproduce:

  1. Use WordPress 6.6-RC2.
  2. Go to Pinterest plugin.

Expected behavior:

Pinterest plugin should show landing page.

Actual behavior:

Pinterest plugin will show error message as per screenshot above.

message-dimke commented 3 days ago

This is what I had recently. Looks like a problem with some folder permissions when installing. JS calls the script which is not accessible.

ecgan commented 2 days ago

Looks like a problem with some folder permissions when installing.

@message-dimke , this is not the case for this issue here. This issue does not happen when we use WordPress 6.5; it happens when we use WordPress 6.6.

ecgan commented 2 days ago

The cause of the issue is due to some breaking changes in WordPress 6.6.

References:

This can be fixed by adding regenerator-runtime as a dependency explicitly. I'll come up with a PR shortly.