Closed (fixed)
Project:
Matomo Reports
Version:
8.x-1.0-beta3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Jan 2020 at 03:19 UTC
Updated:
3 Mar 2020 at 20:25 UTC
Jump to comment: Most recent
Comments
Comment #2
arefen commentedI have a same problem
Comment #3
shelaneI tested with Piwik 2.16.2 and Matomo 3.13.1 and have not been able to replicate this issue. All functions in the MatomoReportsController class have return statements. Please let me know what version of Piwik/Matomo you are using, that you have verified from other methods that the URL and token are accurate, and that the URL to your site is properly formatted (such as https://analytics.example.com/matomo/ in the description).
Comment #4
shadowwolf218 commentedConfirming the same issue.
Environment:
Drupal 8.8.2
Matomo 3.13.3
MySQL (from Matomo) 5.7.28
PHP 7.2.24
Steps:
> Install Matomo 3.13.3 to web server, configure
> Install Matomo Analytics module to Drupal, enable and configure
> Install Matomo Reports module to Drupal, enable and configure
> Navigate to Matomo Web Analytics Reports tab
> "The website has encountered an unexpected error. Please try again later."
> Navigate to Recent Log Messages
> Find most recent error, as follows:
I checked the formatting for both the server URL and the Token Auth string. The former (URL) includes the trailing slash and points to the correct directory. The latter (token_auth) matches the string given in the Matomo Settings under Platform>API. I tried it both with and without the leading "&token_auth=", just for kicks...still nothing. Between each check, I made sure to clear the Drupal cache. I also listed "Allowed sites" as "1,2,3,4" although I'd rather leave that blank.
Interestingly, as I am writing this summary, I'm seeing a handful of "Warning: Illegal string offset ____ in Drupal\matomo_reports\Form\MatomoReportsSettings" where ____ = 'idsite' and 'name' - no idea if that's useful or not.
Hope this helps.
- Chris
Comment #6
shelaneI made a couple of changes that I believe fixes the issue. If you are able to test the dev version and give feedback if you are still seeing the issue, that would be appreciated.
Comment #7
kimberlydb commentedThe dev branch fixed this particular issue for me, but now that I added a token I am getting the following error:
Error: Call to undefined function Drupal\matomo_reports\Form\array_key_first() in Drupal\matomo_reports\Form\ReportsForm->buildForm()
Comment #8
shelaneI just learned that array_key_first is php 7.3 or later. @kimberlydb are you on 7.2? I’ll rewrite it to be compatible. Check for that later today.
Comment #9
kimberlydb commentedYes, running 7.2.
Comment #11
shelaneI did a test with 7.2 and saw the error. I released a new beta version and called this issue fixed.
Comment #12
kimberlydb commentedI can confirm it's working now - thank you!
Comment #13
kimberlydb commented