When a new extension is added to an existing package the package installer runs the update method to install it. That causes issues like:
Database changes are not added if a new extension requires it.
Cannot find manifiests warnings when installing the version with new extensions.
2. Summary of Changes
This forces the install method to be install because adapters are already smart enough to detect when they should install or update the extensions in the package.
3. Testing Instructions
To perform the next tests I'm providing a sample package with three versions:
A dummy component that creates a db table (com_sample)
A dummy system plugin (plg_system_sample)
pkg_sample-v1.0.2.zip - New version that includes SQL updates for the DB table to test that extensions are able to detect install / udpate.
3.1. Reproduce the issue (before applying the patch)
Use a clean joomla based on latest staging.
Install pkg_sample-v1.0.0.zip. See that no errors happen.
Install pkg_sample-v1.0.1.zip.
Confirm that you get a warning like:
That warning is caused because it tries to run update method on a plugin that is not installed (plg_system_sample).
4. Confirm that database table #__sample_test hasn't been created. This is caused because the component has been installed through update() instead of install()
3.2. Confirm that the patch works (after applying the patch)
Use a clean joomla based on latest staging.
Install pkg_sample-v1.0.0.zip. Ensure that no errors happen.
Install pkg_sample-v1.0.1.zip. Ensure that no errors are shown.
Confirm that these extensions are installed:
lib_sample - Name in extensions manager: Sample - Library - Tipo: Library
mod_sample - Name in extensions manager: Sample - Module - Type: Module
com_sample - Name in extensions manager: Sample - Type: Component
plg_content_sample - Name in extensions manager: Sample - Type: Content Plugin
plg_system_sample - Name in extensions manager: Sample - Type: System Plugin
pkg_sample - Name in extensions manager: Sample - All - Type: Package
Confirm that database table exists #__sample_test and doesn't have a column new_column.
Install pkg_sample-v1.0.2.zip. Ensure that no errors happen.
Confirm that the table #__sample_test now has a column new_column.
Uninstall an extension called Sample - All. Ensure that no errors are shown.
Ensure that #__sample_test database table has been removed.
3.3. Confirm that direct installations work (after applying the patch)
Install v1.0.1:
0. Use a clean joomla based on latest staging.
Install pkg_sample-v1.0.1.zip. Ensure that no errors are shown.
Uninstall an extension called Sample - All. Ensure that no errors are shown.
Ensure that #__sample_test database table has been removed.
Install v1.0.1 and upgrade to v1.0.2:
Install pkg_sample-v1.0.1.zip. Ensure that no errors are shown.
Install pkg_sample-v1.0.2.zip. Ensure that no errors happen.
Confirm that the table #__sample_test has a column new_column.
Uninstall an extension called Sample - All. Ensure that no errors are shown.
Ensure that #__sample_test database table has been removed.
Install v1.0.2:
Install pkg_sample-v1.0.2.zip. Ensure that no errors happen.
Confirm that the table #__sample_test has a column new_column.
Uninstall an extension called Sample - All. Ensure that no errors are shown.
Ensure that #__sample_test database table has been removed.
All steps verified, patch works as intended in description of PR. Well done, thanks!
*seen this issue several times today while preparing some sites for 3.6.3/3.6.4 and having to update extensions jumping several version numbers. That Can´t find XML setup file message was irritating and concerning. This seems to fix that.
I have tested this item✅ successfully on df3fd31
?
Excellent testing instructions Roberto, hat tip
All steps verified, patch works as intended in description of PR. Well done, thanks!
*seen this issue several times today while preparing some sites for 3.6.3/3.6.4 and having to update extensions jumping several version numbers. That Can´t find XML setup file message was irritating and concerning. This seems to fix that.
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/12545.