User tests: Successful: Unsuccessful:
allow extension update from cli
User state is session-based storage that only works in web context (administrator)
In CLI context setting user state fail
install this console plugin
plg_console_updatefromcli.zip
it will add a new cli command extension:update
have an extensions for which there is an update and the run
php cli/joomla.php extension:update --eid=the_extension_id
error
can update extensions from cli
Please select:
Documentation link for guide.joomla.org:
No documentation changes for guide.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
| Status | New | ⇒ | Pending |
| Category | ⇒ | Administration com_installer |
it can be fixed on the plugin adding the missed $language->load('lib_joomla', JPATH_ADMINISTRATOR);
$language->load('lib_joomla', JPATH_ADMINISTRATOR);
I needed to move this block of code to line 70 in UpdatefromcliCommand.php to get it to report which updates were triggering warnings.
// Load com_installer's language
$language = $this->getApplication()->getLanguage();
$language->load('lib_joomla', JPATH_ADMINISTRATOR);
$language->load('com_installer', JPATH_ADMINISTRATOR, 'en-GB', false, true);
$language->load('com_installer', JPATH_ADMINISTRATOR, null, true);
yes i'll fix it in the plugin repo https://github.com/alikon/testcom/blob/main/src/plugins/console/updatefromcli/src/CliCommand/UpdatefromcliCommand.php when back from work
Finding an extension for which there is an update available is a bit of a problem. I installed one of my own and then used phpMyAdmin to change its version number in the manifest cache of the #__extensions table. I could then use that method to update from either the backend or cli as often as needed.
The patch appears to work as required. However, I have two other extensions installed that are not set up properly. In the backend I get explicit warning messages telling me which extensions are causing the problem. In the cli I get a text key string. Does this need fixing or is that a separate issue?