You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to call Craft::$app->getView()::renderPageTemplate or Craft::$app->getView()::renderTemplate from within a console request and an exception gets thrown:
Session does not exist in a console request
Is this expected? Craft::$app->getView()::renderTemplatedoes seem to work, but this is a full html doc, so renderPageTemplate seemed right.
Description
I'm trying to call
Craft::$app->getView()::renderPageTemplate
orCraft::$app->getView()::renderTemplate
from within a console request and an exception gets thrown:Is this expected?
Craft::$app->getView()::renderTemplate
does seem to work, but this is a full html doc, sorenderPageTemplate
seemed right.Here's the stack trace:
Original post on SE: https://craftcms.stackexchange.com/questions/26910/how-can-i-render-a-page-template-from-a-queue-job-console-controller
The text was updated successfully, but these errors were encountered: