Open Cangoo opened 1 year ago
Hi @Cangoo. Thanks for this report. It seems the archive.php current does not even try to include a custom bootstrap file.
@tsteur Do you know any reason why we don't include a custom bootstrap file there?
This issue has been mentioned on Matomo forums. There might be relevant details there:
https://forum.matomo.org/t/web-cron-your-browser-was-unable-to-load-the-scripts-of-this-page/49619/3
I use to define my own PIWIK_USER_PATH in /bootstrap.php to alter the path of the config.ini.php-file. But when calling /misc/cron/archive.php PIWIK_USER_PATH is already set BEFORE /bootstrap.php is called.
Expected Behavior
/bootstrap.php should be called before PIWIK_USER_PATH is set in /misc/cron/archive.php
Current Behavior
/bootstrap.php is called AFTER PIWIK_USER_PATH is already set in /misc/cron/archive.php
Possible Solution
/misc/cron/archive.php
Steps to Reproduce (for Bugs)
Create a /bootstrap.php-file with this content:
define('PIWIK_USER_PATH', $_SERVER['DOCUMENT_ROOT'].'/my-new-path-to-matomo-config/');
Move config.ini.php to $_SERVER['DOCUMENT_ROOT'].'/my-new-path-to-matomo-config/'
call /misc/cron/archive.php
=> Warning: Constant PIWIK_USER_PATH already defined in ...\matomo\bootstrap.php on line 1 => cron-job is not working, instead the installation-page is shown
Context
I'm moving the config-file to another location, because I want to use matomo on different servers and don't want to override the config.ini.php on updates.