? Success

User tests: Successful: Unsuccessful:

avatar phproberto
phproberto
25 Oct 2016

1. Issue description

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:

  • pkg_sample-v1.0.0.zip - First version that includes:
    • A dummy library (lib_sample)
    • A dummy module (mod_sample)
    • A dummy content plugin (plg_content_sample)
  • pkg_sample-v1.0.1.zip - New package version that includes previous extensions plus:
    • 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)

  1. Use a clean joomla based on latest staging.
  2. Install pkg_sample-v1.0.0.zip. See that no errors happen.
  3. Install pkg_sample-v1.0.1.zip.
  4. Confirm that you get a warning like:

upgrade-error

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)

  1. Use a clean joomla based on latest staging.
  2. Install pkg_sample-v1.0.0.zip. Ensure that no errors happen.
  3. Install pkg_sample-v1.0.1.zip. Ensure that no errors are shown.
  4. 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
  5. Confirm that database table exists #__sample_test and doesn't have a column new_column.
  6. Install pkg_sample-v1.0.2.zip. Ensure that no errors happen.
  7. Confirm that the table #__sample_test now has a column new_column.
  8. Uninstall an extension called Sample - All. Ensure that no errors are shown.
  9. 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.

  1. Install pkg_sample-v1.0.1.zip. Ensure that no errors are shown.
  2. Uninstall an extension called Sample - All. Ensure that no errors are shown.
  3. Ensure that #__sample_test database table has been removed.

Install v1.0.1 and upgrade to v1.0.2:

  1. Install pkg_sample-v1.0.1.zip. Ensure that no errors are shown.
  2. Install pkg_sample-v1.0.2.zip. Ensure that no errors happen.
  3. Confirm that the table #__sample_test has a column new_column.
  4. Uninstall an extension called Sample - All. Ensure that no errors are shown.
  5. Ensure that #__sample_test database table has been removed.

Install v1.0.2:

  1. Install pkg_sample-v1.0.2.zip. Ensure that no errors happen.
  2. Confirm that the table #__sample_test has a column new_column.
  3. Uninstall an extension called Sample - All. Ensure that no errors are shown.
  4. Ensure that #__sample_test database table has been removed.

4.Documentation Changes Required

No changes required because this is fixing a bug.

avatar phproberto phproberto - open - 25 Oct 2016
avatar phproberto phproberto - change - 25 Oct 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 25 Oct 2016
Category Libraries
avatar phproberto phproberto - change - 25 Oct 2016
Title
New extensions not installed on already existing packages
Errors for new extensions of already existing packages
avatar phproberto phproberto - edited - 25 Oct 2016
avatar phproberto phproberto - change - 25 Oct 2016
Title
New extensions not installed on already existing packages
Errors for new extensions of already existing packages
avatar phproberto phproberto - change - 25 Oct 2016
Title
Errors for new extensions of already existing packages
Errors for new extensions on already existing packages
avatar phproberto phproberto - edited - 25 Oct 2016
avatar phproberto phproberto - change - 25 Oct 2016
Title
Errors for new extensions of already existing packages
Errors for new extensions on already existing packages
avatar phproberto phproberto - change - 25 Oct 2016
Title
Errors for new extensions on already existing packages
Errors installing new extensions on already existing packages
avatar phproberto phproberto - edited - 25 Oct 2016
avatar phproberto phproberto - edited - 25 Oct 2016
avatar phproberto phproberto - change - 25 Oct 2016
Title
Errors for new extensions on already existing packages
Errors installing new extensions on already existing packages
avatar ot2sen ot2sen - test_item - 25 Oct 2016 - Tested successfully
avatar ot2sen
ot2sen - comment - 25 Oct 2016

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.

avatar Twincarb Twincarb - test_item - 26 Oct 2016 - Tested successfully
avatar Twincarb
Twincarb - comment - 26 Oct 2016

I have tested this item successfully on df3fd31

All tests worked as expected, nice to not see the warning error gone and for installs to work as expected.


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

avatar brianteeman brianteeman - change - 26 Oct 2016
Status Pending Ready to Commit
avatar brianteeman
brianteeman - comment - 26 Oct 2016

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 26 Oct 2016
Labels Added: ?
avatar brianteeman brianteeman - change - 26 Oct 2016
Milestone Added:
avatar phproberto phproberto - edited - 26 Oct 2016
avatar phproberto phproberto - change - 28 Oct 2016
The description was changed
avatar phproberto phproberto - edited - 28 Oct 2016
avatar phproberto phproberto - change - 28 Oct 2016
The description was changed
avatar phproberto phproberto - edited - 28 Oct 2016
avatar rdeutz rdeutz - change - 29 Oct 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-10-29 09:34:09
Closed_By rdeutz
avatar rdeutz rdeutz - close - 29 Oct 2016
avatar rdeutz rdeutz - merge - 29 Oct 2016
avatar zero-24 zero-24 - close - 29 Oct 2016
avatar zero-24 zero-24 - change - 29 Oct 2016
Labels Removed: ?

Add a Comment

Login with GitHub to post a comment