Hi,
We are trying to configure the Feedback Company plugin on one of our webshops, however we seem to be stuck in an infinite loop when authorising the plugin with the Feedback Company API. Below is a snapshot of the request that is being looped thousands of times every couple of seconds. What I can see from the code is that the plugin tries to create an access token when the current acces token gives a 401 Unauthorized error. There is some fallback code in the plugin that checks timings, but that doesn’t seem to be working.
We performed the following steps to reproduce this:
1. Install and activate the plugin in WordPress
2. Add the client’s ClientID and Client Secret and press save.
After that, the infinite loop starts and pulls the whole site down with it. Is this perhaps something you’ve seen before or can help us with?
Some more technical specs:
PHP version: 8.2.23
WordPress version: 6.6.2
Woocommerce version: 9.2.3
Thanks in advance!
2024-09-18 11:58:16
https://www.feedbackcompany.com/api/v2/oauth2/token?client_id=<clientID>&client_secret=<clientSecret>&grant_type=authorization_code
Call: GET []
Response: {"error":false,"access_token":"<accessToken>","expires_on":"November, 18 2024 09:58:16 +0000"}
2024-09-18 11:58:16
https://www.feedbackcompany.com/api/v2/shop
Call: GET {"Authorization":"Bearer <accessToken>"}
Response: {"data":[],"message":"401 Unauthorized","success":false}
2024-09-18 11:58:16
https://www.feedbackcompany.com/api/v2/oauth2/token?client_id=<clientID>&client_secret=<clientSecret>&grant_type=authorization_code
Call: GET []
Response: {"error":false,"access_token":"<accessToken>","expires_on":"November, 18 2024 09:58:16 +0000"}
2024-09-18 11:58:16
https://www.feedbackcompany.com/api/v2/shop
Call: GET {"Authorization":"Bearer <accessToken>"}
Response: {"data":[],"message":"401 Unauthorized","success":false}
]]>
Because of the timeouts of the feedback company api yesterday, all JS on my site was delayed. The implementation of the script for the api doesn’t seem optimal.
To make my site work, I changed 1 line of code in your plugin yesterday.
I can’t do a PR on the plugin, since I can’t seem to find the repo.
Is it an to add the async tag to line 314? Like so:
$out .= '<script type="text/javascript" src="https://www.feedbackcompany.com/widgets/feedback-company-widget.min.js" async></script>';
]]>
The widget cannot be rendered on the homepage. When checking https://www.feedbackcompany.com/widgets/feedback-company-widget.min.js, it results in 502 server error:
]]>Error: Server ErrorThe server encountered a temporary error and could not complete your request.
Please try again in 30 seconds.
Hello,
We recently updated to the latest feedback company plugin version. And in our error logs we are receiving a lot of logs with the following:
“Feedback Company migrated multilanguage config to 3.0′”.
Almost at any page somebody opens this is getting printed.
After looking into the code it seems that this is somewhat related to the multilanguage legacy things. Specifically you guys are looking into WPML and Polylang.
We never had these plugins enabled.
We do have an option in our wp_options table with:
Option name:
feedbackcompany_wordpressmultilanguage
option value:
all
autoload:
yes
And that is why this function
// backwards compatibility - migrate previous WPML settings to 3.0 multilanguage settings
if ($this->get_option('wordpressmultilanguage') ||(feedbackcompany_wp::multilanguage_plugin() && $this->get_option('oauth_client_id'))) {
Keeps getting triggered.
But the real problem is that the second if:
if (feedbackcompany_wp::multilanguage_plugin())
Is never true.
Therefore
$this->delete_option('wordpressmultilanguage');
Is never called.
And that is how the error log is getting filled currently.
I will remove this legacy option by hand but can this be addressed in the next release?
Thank you in advance.
]]>I would like to add a The Feedback Company widget per language.
My client has different OAuth keys for English, Dutch and French.
Is that possible?
]]>