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

Publishing WooCommerce products fail when plugin is active. #36

Open
LBDenny opened this issue Feb 19, 2022 · 6 comments
Open

Publishing WooCommerce products fail when plugin is active. #36

LBDenny opened this issue Feb 19, 2022 · 6 comments

Comments

@LBDenny
Copy link

LBDenny commented Feb 19, 2022

When publishing a product within WooCommerce, an error is returned and the process is halted.

When the plugin is deactivated and the product is published without the activated plugin, the process is successful.

This is the error information...

Error Details

An error of type E_ERROR was caused in line 113 of the file /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/two-factor-provider-webauthn/vendor/guzzlehttp/guzzle/src/Utils.php. Error message: Uncaught Error: Undefined class constant 'MAJOR_VERSION' in /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/two-factor-provider-webauthn/vendor/guzzlehttp/guzzle/src/Utils.php:113
Stack trace:
#0 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/two-factor-provider-webauthn/vendor/guzzlehttp/guzzle/src/functions.php(71): GuzzleHttp\Utils::defaultUserAgent()
#1 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/google-indexing-api-by-rank-math/vendor/guzzlehttp/guzzle/src/Client.php(194): GuzzleHttp\default_user_agent()
#2 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/google-indexing-api-by-rank-math/vendor/guzzlehttp/guzzle/src/Client.php(75): GuzzleHttp\Client->configureDefaults()
#3 /home/467030.cloudwaysapps.com/ydutxvzwvn/public_html/wp-content/plugins/google-indexing-api-by-rank-math/vendor/google/apiclient/src/Google/Client.php(1068): GuzzleHttp\Client->__construct()
#4 /home/467030.cloudwaysapps.com/ydutxvz
@sjinks
Copy link
Owner

sjinks commented Feb 21, 2022

I think there is a conflict with the google-indexing-api-by-rank-math plugin; it requires guzzlehttp/guzzle 6.5.5, WebAuthn library uses Guzzle 7.4.1.

Unfortunately, it is nearly impossible to have multiple versions of the same package in the PHP world :-(

I can only suggest to build the plugin manually to see if it works:

  1. Clone the repository
  2. Find the file bin/build-archive.sh
  3. Replace this line:
(cd /var/tmp/two-factor-provider-webauthn && composer install --no-dev --no-interaction && composer remove --update-no-dev --no-interaction composer/installers && rm -f composer.lock) && \

with this one:

(cd /var/tmp/two-factor-provider-webauthn && composer install --no-dev --no-interaction && composer remove --update-no-dev --no-interaction composer/installers && composer update --no-dev --prefer-lowest && rm -f composer.lock) && \
  1. Run the updated build-archive.sh. It will generate two-factor-provider-webauthn.zip in the repository root.
  2. Uninstall the already plugin and install it from the built zip archive.

Hope that helps.

@Nikschavan
Copy link

@sjinks I wonder if using something like imposter will fix this?

@sjinks
Copy link
Owner

sjinks commented Sep 18, 2022

Last time I tried that, it didn't work ☹️

Will try again.

@sjinks
Copy link
Owner

sjinks commented Oct 14, 2022

There is a test version with the bug fix: https://downloads.wordpress.org/plugin/two-factor-provider-webauthn.2.0.0.zip

@LBDenny
Copy link
Author

LBDenny commented Oct 14, 2022 via email

@sjinks
Copy link
Owner

sjinks commented Oct 14, 2022

Do you happen to have the error message and/or stacktrace, please?

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

3 participants