joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[6.0] [CLI] enable or disable extension command

Open alikon opened this issue 1 year ago • 8 comments

Pull Request for Issue #43949 .

Summary of Changes

new command to enable or disable an extension

Testing Instructions

run php cli\joomla.php extension:enable 226

run php cli\joomla.php extension:disable 226 to disable

Actual result BEFORE applying this Pull Request

N/A

Expected result AFTER applying this Pull Request

enable or disable an extension from cli

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [ ] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [ ] No documentation changes for manual.joomla.org needed

alikon avatar Aug 25 '24 07:08 alikon

This pull request has been automatically rebased to 5.3-dev.

HLeithner avatar Sep 02 '24 08:09 HLeithner

I think it would be better to have two separate commands for enabling and disabling extensions: extension:enable and extension:disable. In my opinion, it is a bit confusing that the command "publish" also disables extensions.

Joomla has separate commands for installing and uninstalling extensions, as well as for getting and setting configuration values an so on. There is no commands such:

php cli/joomla extension:install --uninstall 123

php cli/joomla user:add --delete bob

php cli/joomla site:up --down

php cli/joomla database:export --import

voronkovich avatar Sep 15 '24 23:09 voronkovich

2 separate command now

alikon avatar Oct 18 '24 07:10 alikon

Shouldnt all usage of publish/unpublish (including the file names) be changed to enable/disable?

brianteeman avatar Oct 18 '24 08:10 brianteeman

I think we should use enable/disable instead of publish/unpublish. Even a field in database has name enabled:

$table->enabled = 1;

voronkovich avatar Oct 18 '24 15:10 voronkovich

I have tested this item :white_check_mark: successfully on 43ef5584f381663aba3122f118526bddfab031ad


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43977.

Quy avatar Nov 07 '24 00:11 Quy

This pull request has been automatically rebased to 6.0-dev.

HLeithner avatar Mar 04 '25 17:03 HLeithner

I have tested this item :white_check_mark: successfully on caf8574f4f62bc21b4219368bfa796cd5d085b08

I have tested this very successfully and satisfyingly ;) Thanks @alikon!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43977.

exlemor avatar Aug 23 '25 11:08 exlemor

I have not tested this item.

tested that you can not disable a protected extension tested that you can disable a non-protected extension tested that you can not enable an already enabled extension tested that you can not disable an already disabled extension


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43977.

brianteeman avatar Aug 23 '25 11:08 brianteeman

I have not tested this item.

@brianteeman Really not tested? Or just not selected the test result in the issue tracker before submitting?

richard67 avatar Aug 23 '25 11:08 richard67

Looks like github did not record the changed test

image

brianteeman avatar Aug 23 '25 11:08 brianteeman

@brianteeman GitHub recorded it in the counter, so it shows all checks have passed. But the alter test result does not trigger an extra comment in the thread like a test result submission does, that's what confused me.

richard67 avatar Aug 23 '25 11:08 richard67

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43977.

richard67 avatar Aug 23 '25 11:08 richard67

This pull request has been automatically rebased to 6.1-dev.

HLeithner avatar Aug 31 '25 11:08 HLeithner