0

None of the craft core console commands to work. For example: ./yiic querygen all My_MyRecord produces an error which includes mention of session?

How do I get craft console commands working again?

1

You probably have a plugin which is listening to the userSession.onLogin event and trying to access the current user from the session.

The solution is for the plugin developer to wrap the event listener to ignore console sessions like this:

    if(!craft()->isConsole())
    {
        craft()->on('userSession.onLogin',
            [
                craft()->market_customer,
                'loginHandler'
            ]
        );
    }
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.