1
votes

I have an sf1.2 based project that works in the local deployment. I deployed it into another environment yesterday and when I tried to do ./symfony cc, I got this error :

"default" Context doesn't exist

What can possibly cause this error?

my sf version is 1.2.8

2

2 Answers

4
votes

This question is possibly a duplicate of: sfErrorNotifierPlugin: The “default” context does not exist

As explained there, it is caused if you call sfContext::getInstance() from one of your classes. Because the instance does only exist if you browse your page, and not if it is called by a symfony-task, an error is thrown.

How to avoid sfContext with dependancy injection is explained elsewhere.

I hope this solves your problem.

1
votes

I'd try to upgrade symfony to its newest 1.2 release in the first place.

Try removing cache contents manually (rm -rf cache/*). Maybe it's an incidental situation. Check if it happens again.

Did you implement any hooks for clear cache task? It's unlikely that the task itself throws such an exception.

Also, check what are the differences between those two environments.