Open-Web-Analytics / owa-wordpress-plugin

The official integration plugin for adding Open Web Analytics tracking to WordPress websites and applications.
GNU General Public License v2.0
12 stars 9 forks source link

Unable to configure Website ID - "There has been a critical error on this website..." #4

Open jrbranaa opened 2 years ago

jrbranaa commented 2 years ago

When first attempting to configure the WP plugin, I am not able to select the Website ID from the dropdown. I've provide all the other configuration information (API Key, Secret Auth, Endpoint URL). Hoping that I can then select the Website ID, I press Save and then the following error message is displayed in place of the dropdown:

"There has been a critical error on this website. Please check your site admin email inbox for instructions."

Once this happens, I am no longer able to save any changes due to lack of Save button. Deactivating and reinstalling the plug-in doesn't help.

OWA Plug-in Version: 2.1.1 OWA Server Version: 1.7.6 WordPress Version: 5.9.1

Both WordPress and OWA servers are running on Ubuntu (18.04 and 20.04 respectively).

If you'd like the values saved in WP for the owa_wp, please DM me and I will share.

The following email is sent to me by the site:

Error Details ============= An error of type E_ERROR was caused in line 270 of the file /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php. Error message: Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, null given in /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php:270 Stack trace:

0 /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php(270): array_key_exists()

1 /var/www/html/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Sites/SitesClient.php(39): OwaSdk\OwaClient->makeRequest()

2 /var/www/html/wp-content/plugins/open-web-analytics/owa-plugin.php(1192): OwaSdk\Sites\SitesClient->listSites()

3 /var/www/html/wp-includes/class-wp-hook.php(307): owaWp_plugin->getSitesFromOwa()

4 /var/www/html/wp-includes/plugin.php(189): WP_Hook->apply_filters()

5 /var/www/html/wp-content/plugins/open-web-analytics/src/settings/fields/select.php(19): apply_filters()

6 /var/www/html/wp-admin/includes/template.php(1743): owaWp\settings\fields\select->render()

7 /var/www/html/wp-content/plugins/open-web-analytics/src/settings/page.php(428): do_settings_fields()

8 /var/www/html/wp-content/plugins/open-web-analytics/src/settings/page.php(289): owaWp\settings\page->doTabbedSettingsSections()

9 /var/www/html/wp-includes/class-wp-hook.php(307): owaWp\settings\page->renderPage()

10 /var/www/html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()

11 /var/www/html/wp-includes/plugin.php(474): WP_Hook->do_action()

12 /var/www/html/wp-admin/admin.php(259): do_action()

13 {main}

thrown

JezzerPreston commented 2 years ago

I am seeing exactly the same problem.

padams commented 1 year ago

Update to 2.1.4 and see if you have the same issue?

erwinpalma commented 1 year ago

I am having the same issue,

Se ha producido un error del tipo E_ERROR en la línea 61 del archivo /{offuscated}/wp-content/plugins/open-web-analytics/vendor/guzzlehttp/guzzle/src/functions.php. Mensaje de error: Uncaught Error: Call to undefined method GuzzleHttp\Utils::chooseHandler() in /{offuscated}/wp-content/plugins/open-web-analytics/vendor/guzzlehttp/guzzle/src/functions.php:61
Stack trace:
#0 /{offuscated}/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/HandlerStack.php(42): GuzzleHttp\choose_handler()
#1 /{offuscated}/wp-content/plugins/backwpup/vendor/guzzlehttp/guzzle/src/Client.php(65): GuzzleHttp\HandlerStack::create()
#2 /{offuscated}/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php(126): GuzzleHttp\Client->__construct(Array)
#3 /{offuscated}/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/OwaClient.php(167): OwaSdk\OwaClient->getHttpClient(Array)
#4 /{offuscated}/wp-content/plugins/open-web-analytics/vendor/open-web-analytics/owa-php-sdk/src/Sites/SitesClient.php(39): OwaSdk\OwaClient->makeRequest(Array)
#5 /{offuscated}/

image

bmn001 commented 1 year ago

Brand new user here. I'm seeing this too.

WordPress 6.1.1 (PHP 7.4.25) OWA 1.7.8 (PHP 7.4.25) OWA WP Plugin 2.1.5

I installed OWA. I installed the WP plugin. Got the keys in there, endpoint, and the dropdown was there and populated correctly. No error messages!

However...

My OWA dashboard was showing no traffic at all. Everything was stuck at zero.

So I'm like "huh". Then, thinking I could just restart the plugin or whatever, I toggled the "Enable OWA" radio button in the plugin to "Off".

NOW I see the error message "There has been a critical error on this website. Please check your site admin email inbox for instructions." and the radio button won't let me toggle it back on. I mean, I can click it. But there's no submit button to save it.