? ? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
26 Dec 2016

Pull Request for New Issue.

Summary of Changes

Currently when a extension install is aborted and the install sql query already run we get a broken install.
The extension is uninstalled but the database tables will stay in joomla.

This PR proposes to change that by adding a step to rollback the sql (if an uninstall sql exists).

Testing Instructions

  1. Code review
  2. Install this broken com_test.zip extension that install with a db table called #__test. Notice you get the extension install rollback but you stay with the #__test table in the database
  3. Manually delete the #__test table
  4. Apply patch
  5. Repeat step 2 and notice now on failure the #__test table is also removed.

Documentation Changes Required

None.

avatar andrepereiradasilva andrepereiradasilva - open - 26 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2016
Category Libraries
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 26 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 26 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - change - 26 Dec 2016
Category Libraries Libraries Unit Tests
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 26 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - change - 26 Dec 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 26 Dec 2016
avatar frankmayer
frankmayer - comment - 27 Dec 2016

I haven't tested this yet, but one question comes to mind:
What happens if an extension is installed on top of the same? I am thinking of updating an extension by installing it on top of itself.
If that "update" fails, wouldn't it destroy for example the data of the previously working extension?

avatar andrepereiradasilva
andrepereiradasilva - comment - 27 Dec 2016

that's why i putted the if ($route === 'install'
https://github.com/joomla/joomla-cms/pull/13376/files#diff-b88334a2e44587a12ed5fed7beb8bd1eR478

But please test that scenario also

avatar frankmayer
frankmayer - comment - 27 Dec 2016

I have tested this item successfully on f504164

Done code review.

Note: I also tested installing the extension completely (by removing the exception) and then re-installing the broken one (with the addition of an exception in the update method). The existing table stayed intact, as expected.


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

avatar frankmayer frankmayer - test_item - 27 Dec 2016 - Tested successfully
avatar ggppdk
ggppdk - comment - 27 Dec 2016

That's why i putted the if ($route === 'install'
https://github.com/joomla/joomla-cms/pull/13376/files#diff-b88334a2e44587a12ed5fed7beb8bd1eR478
But please test that scenario also

Exactly my fear it would be destructive, i will test too

I mean i ll test to "update" an already installed extension with a broken package

avatar alikon
alikon - comment - 27 Dec 2016

I have tested this item successfully on f504164


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

avatar alikon alikon - test_item - 27 Dec 2016 - Tested successfully
avatar jeckodevelopment jeckodevelopment - change - 28 Dec 2016
Status Pending Ready to Commit
Labels
avatar jeckodevelopment
jeckodevelopment - comment - 28 Dec 2016

RTC


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

avatar jeckodevelopment jeckodevelopment - change - 28 Dec 2016
Milestone Added:
avatar rdeutz rdeutz - change - 29 Dec 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-12-29 10:38:17
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 29 Dec 2016
avatar rdeutz rdeutz - merge - 29 Dec 2016
avatar rdeutz rdeutz - reference | 3f400e6 - 29 Dec 16
avatar rdeutz rdeutz - merge - 29 Dec 2016
avatar rdeutz rdeutz - close - 29 Dec 2016
avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 29 Dec 2016

Add a Comment

Login with GitHub to post a comment