User tests: Successful: Unsuccessful:
Create a console plugin that boot the com_content component and run it from terminal
ie. something like
$content = Factory::getApplication()->bootComponent('com_content')->getMVCFactory();
$model = $content->createModel('Article', 'Administrator',['ignore_request' => true]);
$result = $model->save($article);
getUserState()
method to the ConsoleApplication.phpphp cli/joomla.php lorem:ipsum
no error in console and article created
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries Front End Plugins |
the main point is we want the console app like 1st citizen ?
we want the console application able to re-use existing CMS code or not ?
i've shared the plugin console code already maybe i've made something wrong there ??
https://github.com/alikon/testcom/blob/main/plugins/console/lorem/src/Extension/LoremIpsumCommand.php
If you have 'ignore_request' => true
then the populateState function should not be called. On other places the userstate should not be called.
as you can see i already have set ['ignore_request' => true]
$content = Factory::getApplication()->bootComponent('com_content')->getMVCFactory();
$model = $content->createModel('Article', 'Administrator',['ignore_request' => true]);
$result = $model->save($article);
And where is the user state requested?
even then the setUserState()
is not a method of ConsoleApplication what i'm missing ?
Labels |
Added:
?
|
Labels |
Added:
?
Removed: ? |
Category | Libraries Front End Plugins | ⇒ | Front End Plugins |
Category | Front End Plugins | ⇒ | Administration com_content Front End Plugins |
closed by mistake i suppose
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-05-25 11:49:10 |
Closed_By | ⇒ | alikon |
Ok so webauthn looks fine. But where else is the user state being used - i don't particularly like having to implement that in the consoleapplication class