Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/misc/cron/archive.php crontab is regressed Class 'Piwik\Common' not found #7900

Closed
mattab opened this issue May 13, 2015 · 6 comments
Closed
Assignees
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@mattab
Copy link
Member

mattab commented May 13, 2015

Demo2 has regressed, running the cron via misc/cron/archive.php is erroring:

$ php /home/piwik-demo2/www/misc/cron/archive.php --url=http://demo2.piwik.org

-------------------------------------------------------
Using this 'archive.php' script is no longer recommended.
Please use '/path/to/php /home/piwik-demo2/www/console core:archive --url=http://demo2.piwik.org' instead.
To get help use '/path/to/php /home/piwik-demo2/www/console core:archive --help'
See also: http://piwik.org/docs/setup-auto-archiving/

If you cannot use the console because it requires CLI
try 'php archive.php --url=http://your.piwik/path'
-------------------------------------------------------

Fatal error: Class 'Piwik\Common' not found in /home/piwik-demo2/www/misc/cron/archive.php on line 44

we added tests earlier to prevent the regression, we need to check why those tests didn't work to catch this regression

cc @diosmosis

@mattab mattab added the Bug For errors / faults / flaws / inconsistencies etc. label May 13, 2015
@mattab mattab added this to the 2.14.0 milestone May 13, 2015
@mattab mattab added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label May 13, 2015
@diosmosis
Copy link
Member

This bug wasn't caught because ArchiveWebTest uses the proxy archive.php script, which includes the autoloader before the actual archive.php script. I might be able to fix this in my DI branch.

diosmosis pushed a commit that referenced this issue May 14, 2015
…Common class is available before requiring bootstrap.php.
@mattab
Copy link
Member Author

mattab commented May 14, 2015

it makes sense, feel free to close the issue as it looks fixed

@diosmosis
Copy link
Member

The issue is fixed, but tests won't catch it yet, I'll close after they detect it. Which will be after my other DI branch is done.

@mattab
Copy link
Member Author

mattab commented Jun 16, 2015

The issue is fixed, but tests won't catch it yet, I'll close after they detect it. Which will be after my other DI branch is done.

@diosmosis what is status, now that DI branch was merged, maybe this could be closed?

@diosmosis
Copy link
Member

Actually found an easier way to test for this, will close this soon.

@mattab
Copy link
Member Author

mattab commented Jun 16, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
Development

No branches or pull requests

2 participants