User tests: Successful: Unsuccessful:
Porting of PR #17219 to J4
All credits to @mbabker. Thank you!
Thanks @richard67 for updating the SQL files.
Text below copied from PR #17219.
This is PR #13037. See the original PR for added context and past conversation.
The long and short is this adds a new field, locked
, to the extensions table, and splits the current definition of the protected
field. This also updates the protected extension list to make the list only include admin components, core libraries, and the files extension that Joomla tracks itself with (this means all modules and plugins are now unprotected and can be enabled/disabled consistently).
Current:
protected
indicates an extension which cannot be disabled or uninstalledNew:
protected
indicates an extension which cannot be disabled
locked
indicates an extension which cannot be uninstalled
Uninstalling core extensions can be problematic, and honestly it's not very effective given our current packaging and upgrading solutions. Even if you do uninstall the extensions, they end up back on your site's filesystem during the update process because we don't make the package extraction step aware of the database and inherently the installed extensions. Also, uninstalling components takes their tables with them, and if an update includes a SQL delta for one of those tables, it causes the update to fail over. So we should take an extra step to protect users from doing things that could be dangerous for their sites. Next, an uninstallable extension should not mean that the extension must be enabled. The only extensions which should be protected are those which if disabled would critically bring down the site, every other aspect of the extension listing should be controllable by the site administrator.
It needs to test the same changes in 2 scenarios:
Then, after the new installation or the update, it needs to test in both cases:
For scenario 1 new installation, apply the patch of this PR to a clean 4.0-dev branch when having a git clone, or use the patched full package download for this PR (see below).
For scenario 2, use the patched update package download for this PR (see below).
You can find a link to the downoads page when expanding the test results at the bottom of this PR on GitHub, if not already expanded:
The link leads to a download page where you can donwnload patched installation and update packages for this PR. By the commit number you can check if they fit to the last commit of this PR, i.e. they are up to date:
There is also a custom update URL given for the update package so you can use the online update with that custom URL.
Btw. this is a standard feature for new or newly modified PR's on the 4.0-dev branch, so it can be used in the same way for testing other PR's, too.
We should probably add a page explaining the various extension states and what these columns exist for if one doesn't already exist.
Status | New | ⇒ | Pending |
Category | ⇒ | SQL Administration com_admin Postgresql com_installer Language & Strings Installation |
plus com_csp
And someone has to check PostgreSQL, system tests for postgres are failing in drone. I don't have time now.
List of core extension here should be up to date, so just use this as master: https://github.com/joomla/joomla-cms/blob/4.0-dev/libraries/src/Extension/ExtensionHelper.php#L46.
(posted wrong link for staging before, now is correct 4.0-dev)
it seems crazy to me that we have one hard coded list already and to add a second one is even more bizarre
Labels |
Added:
?
?
|
What remains to be done is to check and if necessary update the list of core extensions in section "Now protect from disabling essential core extensions" at the bottom of the update sql. These values for protected
and enabled
should be the same as in joomla.sql I think.
Labels |
Added:
?
|
I have tested this item
New installation of patch package.
Update from 3.9.10-dev nightly with custom update server (patch package).
Addition to test: #28462 (comment)
php: Linux dd46134 4.15.0-91-generic #92~16.04.1-Ubuntu SMP Fri Feb 28 14:57:22 UTC 2020 x86_64
dbserver: mysql
dbversion: 5.7.28-nmm1-log
dbcollation: utf8_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.4.2
server: Apache
sapi_name: fpm-fcgi
version: Joomla! 4.0.0-beta1-dev+pr.28462 Development [ Mañana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:74.0) Gecko/20100101 Firefox/74.0
By the way I wonder why there is sometimes a icon that shows to you, that the extension is protected and sometimes this icon is missing. I know that this icon is for protecting publishing and unpublished. But it is a little bit confusing for new Joomlers.
System Information
php: Linux astrid-TravelMate-5760G 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64
dbserver: mysql
dbversion: 5.7.29-0ubuntu0.18.04.1
dbcollation: utf8mb4_unicode_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.2.28-3+ubuntu18.04.1+deb.sury.org+1
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta1-dev+pr.28462 Development [ Mañana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
System Information
php: Linux astrid-TravelMate-5760G 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64
dbserver: postgresql
dbversion: 12.2 (Ubuntu 12.2-2.pgdg18.04+1)
dbcollation: en_GB.UTF-8
dbconnectioncollation: en_GB.UTF-8
dbconnectionencryption: TLSv1.3 (TLS_AES_256_GCM_SHA384)
dbconnencryptsupported: true
phpversion: 7.2.29-1+ubuntu18.04.1+deb.sury.org+1
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta1-dev+pr.28462 Development [ Mañana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
Scenario 2 MySQL and Postgres
By the way: After the update I saw this errors using postgres and using mysql.
System Information
php: Linux astrid-TravelMate-5760G 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64
dbserver: postgresql
dbversion: 12.2 (Ubuntu 12.2-2.pgdg18.04+1)
dbcollation: en_GB.UTF-8
dbconnectioncollation: en_GB.UTF-8
dbconnectionencryption: TLSv1.3 (TLS_AES_256_GCM_SHA384)
dbconnencryptsupported: true
phpversion: 7.2.29-1+ubuntu18.04.1+deb.sury.org+1
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta1-dev+pr.28462 Development [ Mañana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
php: Linux astrid-TravelMate-5760G 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64
dbserver: postgresql
dbversion: 12.2 (Ubuntu 12.2-2.pgdg18.04+1)
dbcollation: en_GB.UTF-8
dbconnectioncollation: en_GB.UTF-8
dbconnectionencryption: TLSv1.3 (TLS_AES_256_GCM_SHA384)
dbconnencryptsupported: true
phpversion: 7.2.29-1+ubuntu18.04.1+deb.sury.org+1
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta1-dev+pr.28462 Development [ Mañana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
System information
php: Linux astrid-TravelMate-5760G 4.15.0-91-generic #92-Ubuntu SMP Fri Feb 28 11:09:48 UTC 2020 x86_64
dbserver: mysql
dbversion: 5.7.29-0ubuntu0.18.04.1
dbcollation: utf8_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.2.29-1+ubuntu18.04.1+deb.sury.org+1
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta1-dev+pr.28462 Development [ Mañana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:74.0) Gecko/20100101 Firefox/74.0
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2020-03-31 13:42:13 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Thanks guys!
Any reason to lock the Language Switcher module and not the Language Filter system plugin?
i guess we need to add com_privacy & com_actionlogs to the list of core component