Closed pwenn closed 4 years ago
@pwenn thanks for creating the issue and letting us know.
The system report looks all good except for cron_sync: 2020-06-26 16:27:14 (Matomo is not set up yet. File not readable: $ABSPATH/wp-content/uploads/matomo/config/config.ini.php
where it appears in WP-Cron there was no read permission on the config file but doubt that's actually a/the problem here.
I can see in the system report that no visit has been actually tracked yet despite the tracking being enabled and it should be on the page.
Is there any chance you could send us a link to your website to wordpress@matomo.org ? Then I could check if the tracking code is actually included in your site and whether I see any specific tracking error.
If you are familiar with browser developer tools you could also check yourself in the network
tab if there is any request going to a matomo.php
and if this tracking request succeeds.
I have exactly this same problem, no visit data and the message:
cron_sync: 2020-06-26 16:27:14 (Matomo is not set up yet. File not readable: $ABSPATH/wp-content/uploads/matomo/config/config.ini.php => EnvironmentValidator.php:85; EnvironmentValidator.php:65; Environment.php:191; Environment.php:100; Bootstrap.php:74; Bootstrap.php:104; Sync.php:61; ScheduledTasks.php:176; class-wp-hook.php:285; class-wp-hook.php:311; plugin.php:544; wp-cron.php:138;)
I have spent (wasted) a great deal of time looking for a solution to this, and it seems like this message is not uncommon but no solutions have ever been posted publicly.
My tracking code can be seen on the pages in the "view source" page. I have tried everything in the troubleshooting list. I have looked in the db and there is nothing being stored there.
The code in the footer as copied from view source is:
This was the default in the matomo set-up, I have not tried to decode or alter any tracking. I turned on debugging and got messages like these: [28-Jun-2020 13:14:36 UTC] Matomo: ERROR: Uncaught exception: /var/www/html/wp-content/plugins/matomo/plugins/WordPress/WordPress.php(295): Token is not valid. #1 /var/www/html/wp-content/plugins/matomo/app/core/EventDispatcher.php(141): call_user_func_array(Array, Array) #2 /var/www/html/wp-content/plugins/matomo/app/core/Piwik.php(775): Piwik\EventDispatcher->postEvent('Request.dispatc...', Array, false, Array) #3 /var/www/html/wp-content/plugins/matomo/app/core/FrontController.php(570): Piwik\Piwik::postEvent('Request.dispatc...', Array) #4 /var/www/html/wp-content/plugins/matomo/app/core/FrontController.php(165): Piwik\FrontController->doDispatch('API', false, Array) #5 /var/www/html/wp-content/plugins/matomo/app/core/dispatch.php(34): Piwik\FrontController->dispatch() #6 /var/www/html/wp-content/plugins/matomo/app/index.php(27): require_once('/var/www/html/w...') [28-Jun-2020 13:14:36 UTC] PHP Fatal error: Uncaught Exception: 2 total errors during this script execution, please investigate and try and fix these errors. in /var/www/html/wp-content/plugins/matomo/app/core/CronArchive.php:606 #0 /var/www/html/wp-content/plugins/matomo/app/core/CronArchive.php(599): Piwik\CronArchive->logFatalError('2 total errors ...') #1 /var/www/html/wp-content/plugins/matomo/app/core/CronArchive.php(331): Piwik\CronArchive->end() #2 /var/www/html/wp-content/plugins/matomo/app/core/Access.php(644): Piwik\CronArchive->Piwik\{closure}() #3 /var/www/html/wp-content/plugins/matomo/app/core/CronArchive.php(335): Piwik\Access::doAsSuperUser(Object(Closure)) #4 /var/www/html/wp-content/plugins/matomo/classes/WpMatomo/ScheduledTasks.php(225): Piwik\CronArchive->main() #8 /var/www/ in /var/www/html/wp-content/plugins/matomo/app/core/CronArchive.php on line 606 _paq.push(["setCookieDomain", "*.i-world.net"]);_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['setTrackerUrl', "\/\/i-world.net\/wp-content\/plugins\/matomo\/app\/matomo.php"]);_paq.push(['setSiteId', '1']);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src="\/\/i-world.net\/wp-content\/uploads\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);[28-Jun-2020 13:16:40 UTC] Matomo: Finished noscript code: _paq.push(["setCookieDomain", "*.oma.i-world.net"]);_paq.push(['trackPageView']);_paq.push(['enableLinkTracking']);_paq.push(['setTrackerUrl', "\/\/oma.i-world.net\/wp-content\/plugins\/matomo\/app\/matomo.php"]);_paq.push(['setSiteId', '1']);var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0]; g.type='text/javascript'; g.async=true; g.defer=true; g.src="\/\/oma.i-world.net\/wp-content\/uploads\/sites\/2\/matomo\/matomo.js"; s.parentNode.insertBefore(g,s);
This is an experimental site for me, being new to wordpress. So it has very low traffic, but according to the server logs it does see some. Everything else in wordpress seems to be working ok. The site is on digitalocean on their one-click ubuntu/wordpress setup.
Since this message seems to be part of many questions it might be nice to explain anything relevant somewhere where it will be found via google.
@snowmanjim could you maybe also send us the output of the system report see https://matomo.org/faq/wordpress/how-do-i-find-and-copy-the-system-report-in-matomo-for-wordpress/ Either as a comment (it should be anonymised) or by email to wordpress at matomo.org
It sounds like there might be a different problem here. Like an incompatibility with a different plugin or so. I'd try and reproduce it then.
@snowmanjim @pwenn just in case someone can give me access to their WordPress Admin and ideally access to the files on the server I'd be super grateful and would debug from there in the hope to find the root cause. I'd be really keen on fixing this, but rely on some help.
Hoping the system report might help too for now.
@snowmanjim any chance you are also with WPEngine?
I am not using WPEngine as far as I know, this site is new and a learning experience for me for WP in general. The only plugin is Akismet anti-spam and one that is inactive - "Better Search Replace"
The whole thing is a pretty vanilla installation, I have not added much or made any modifications.
Tonight I upgraded php from 7.2 to 7.4 but that did not matter. Nor did installing imagick. (I did not expect these things to matter, they were just on the WP Health screen so I did them anyway.)
It is late here but I will try to send the system report. I can probably give you access but need to consider how to do it. There is nothing else on this server and this site is not irreplaceable and has nothing private or important. I guess I can just register you in WP as an admin?
Yes simply registering me as an admin should do for now. 👍
I can add a user and make you a super admin, or if you register then I will edit that account. I am not sure about creating an account for wordpress@ because I don't know if you will get that or if somebody else will. It could look like spam if you're not watching out for it. You can register at https://i-world.net/wp-signup.php and I should recognize it if you do, the site is not very active at all. So either register there or confirm that I should add you with the wordpress address or another.
My hours to check in here or look at the site might be a bit odd there, I am in Tbilisi Georgia.
Thanks for this @snowmanjim I just signed up. 👍
ok, you are a super-admin now. It is multi-site with a few subdomain sites, none of which have been developed at all but they exist.
If you need to I can set up an ssh account, there is nothing secure or private. But I don't administrate user accounts much, very rarely. So I'll have to remember how to do it. Hopefully superadmin will let you see whats going on
@snowmanjim I just logged in and it looks all good. I visited your site and it recorded my visit and shows it in the reports.
cron_sync: 2020-06-26 16:27:14 (Matomo is not set up yet. File not readable: $ABSPATH/wp-content/uploads/matomo/config/config.ini.php => EnvironmentValidator.php:85; EnvironmentValidator.php:65; Environment.php:191; Environment.php:100; Bootstrap.php:74; Bootstrap.php:104; Sync.php:61; ScheduledTasks.php:176; class-wp-hook.php:285; class-wp-hook.php:311; plugin.php:544; wp-cron.php:138;)
This message was probably from when installing it and is now outdated. It all works now.
Now sure how I can reproduce the below error?
[28-Jun-2020 13:14:36 UTC] Matomo: ERROR: Uncaught exception: /var/www/html/wp-content/plugins/matomo/plugins/WordPress/WordPress.php(295): Token is not valid.
1 /var/www/html/wp-content/plugins/matomo/app/core/EventDispatcher.php(141): call_user_func_array(Array, Array)
2 /var/www/html/wp-content/plugins/matomo/app/core/Piwik.php(775): Piwik\EventDispatcher-
I noticed it had logged your registration access, I had not changed anything so I am not sure why that was the first. That cron_synch message seems to appear in a lot of search results when I was researching the problem, maybe it should be disappearing after the installation is complete. Other messages do disappear when they are corrected.
The other error was from error logging but I think I turned that off after saving those example messages. I will see if those are still generated tomorrow but I need to turn on the logging and then grep the log file to see if there are any matomo errors.
Thanks, I will check it out some more on the various subdomain sites and check the logging but I am not sure why it just started to log now. Traffic is very low but not non-existent according to the server log, but maybe those accesses were not logged for some specific reason.
That cron_synch message seems to appear in a lot of search results when I was researching the problem, maybe it should be disappearing after the installation is complete. Other messages do disappear when they are corrected.
👍 Definitely, changing this in https://github.com/matomo-org/wp-matomo/pull/315
BTW make sure you don't have a tracking or ad blocker active.
Now sure how I can reproduce the below error?
[28-Jun-2020 13:14:36 UTC] Matomo: ERROR: Uncaught exception: /var/www/html/wp-content/plugins/matomo/plugins/WordPress/WordPress.php(295): Token is not valid.
#1 /var/www/html/wp-content/plugins/matomo/app/core/EventDispatcher.php(141): call_user_func_array(Array, Array)
#2 /var/www/html/wp-content/plugins/matomo/app/core/Piwik.php(775): Piwik\EventDispatcher-
I have had the debugging log on again for a few days and have not seen this again. I don't know what caused it or fixed but it seems to be gone now. On two instances there are a chain of database messages but it's not clear right now if they are affecting anything. They happened twice, not regularly so far.
So it seems to be working ok now. It is still hard for me to conclude much due to this site having no meaningful traffic, but it has logged a couple visits. My own browser usually has Do Not Track turned on, and I wonder how many visits are lost to this in general. I turned that off and still did not see my own visits, and I also tried with 3 computers. So I think it is recognizing me somehow and not tracking me.
If I see any issues in the future I will let you know, thanks for the help with the error message.
I am actually looking forward to trying this for log analysis on another static site when I have time. A WP plugin just seemed easier for a quick test installation of it.
Hi there,
A new Matomo Analytics plugin was installed on this site. The reports show all is connected but no data is loading after 48 hours? I am unable to find what the issue is or how to resolve it? Hosting is with WPEngine which tend to lock things down which may be the issue? Below is the system report.
Endpoints
Crons
Mandatory checks
Optional checks
Matomo Settings
Logs
WordPress
WordPress Plugins
MU Plugins
Plugins
Server
Database
Browser