Hi Brokie,
I fixed this error on your site. In the file : administrator/modules/mod_jagoogle_analytics/helper.php, I added the code :
- public function refresh($client, $refresh_token) {
- try {
- $client->refreshToken($refresh_token);
- } catch (Exception $e) {
- return $e->getMessage();
- }
- }
at the end. And in the file : administrator/modules/mod_jagoogle_analytics/tmpl/default.php, I added the code:
- // If the Access Token is expired.
- if ($client->isAccessTokenExpired()) {
- $helper->refresh($client, json_decode($token)->refresh_token);
- }
below the code :
- // Extract token from session and configure client.
- if ($helper::getToken()) {
- $token = $helper::getToken();
- $client->setAccessToken($token);
- }
The module is working fine now. Please test again and don’t forget confirm the result to me. Note: whenever you change the domain, please click on Authorize to get new Access code.
Regards.