We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It's not possible to create entry with console command because of dependancy on getUser() function which does not exist for console app
Write console controller with this code
$entry = new Entry(['authorId' => 1]); $entry->title = 'test'; $entry->sectionId = 1; Craft::$app->getElements()->saveElement($entry);
Run controller function from CLI
Get this error:
Exception 'yii\base\UnknownMethodException' with message 'Calling unknown method: craft\console\Application::getUser()'
The text was updated successfully, but these errors were encountered:
c220b2d
brandonkelly
No branches or pull requests
Description
It's not possible to create entry with console command because of dependancy on getUser() function which does not exist for console app
Steps to reproduce
Write console controller with this code
Run controller function from CLI
Get this error:
Additional info
The text was updated successfully, but these errors were encountered: