Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Extensions] Uninstalling a non-existing module does not work anymore #1278

Closed
cmfcmf opened this issue Oct 1, 2013 · 12 comments
Closed

[Extensions] Uninstalling a non-existing module does not work anymore #1278

cmfcmf opened this issue Oct 1, 2013 · 12 comments
Labels
Milestone

Comments

@cmfcmf
Copy link
Contributor

cmfcmf commented Oct 1, 2013

When a module is deleted from filesystem, it can't be uninstalled anymore.
(Class ZikulaErrorsModule_Installer does not exist)

@ghost
Copy link

ghost commented Oct 1, 2013

This has always been the case. Since the module is responsible to delete it's tables and so on, the module is necessary to be present. The only way to do this would be to have a huge registry (which modules would have to comply with in the first place) so Zikula has the means to clean up the module's database entries. If you remove the files from an installed module the correct response is for Zikula to show "FILES MISSING" in the Extensions module.

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Oct 1, 2013

No, IIRC it was possible to "uninstall" a missing module so it disappeard out of the modules table.

@phaidon
Copy link
Contributor

phaidon commented Oct 1, 2013

@cmfcmf is right. I can also remember, that it was possible.

@ghost
Copy link

ghost commented Oct 1, 2013

@cmfcmf yes, but that behaviour isnt right. You cannot expect to just clear it from the list and expect things to work ok. All manner of things can go wrong.

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Oct 1, 2013

Then we shouldn't show an uninstall button for missing modules.

@ghost
Copy link

ghost commented Oct 1, 2013

@cmfcmf I agree.

@rojblake
Copy link
Contributor

rojblake commented Oct 1, 2013

What the uninstall used to do was to simply cleanup the modules table but leave anything else. It would be best if we simply flagged these modules with a "files missing" label so that the site administrator can see the issue and take some suitable action.

-Mark

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Oct 1, 2013

They are flagged already.

@rojblake
Copy link
Contributor

rojblake commented Oct 1, 2013

A related issue is that removing a new style 1.3.6 module blows up the site with the following stack dump. In this example I simply removed the acme-example module files and refreshed the page.

ContextErrorException: Warning: array_keys() expects parameter 1 to be array, null given in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\View\Theme.php line 753
in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\View\Theme.php line 753
at ErrorHandler->handle('2', 'array_keys() expects parameter 1 to be array, null given', 'C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\View\Theme.php', '753', array('pageconfigurations' => null, 'customargs' => 'ZikulaExtensionsModule/admin/view/startnum=0/state=0', 'match' => '', 'matchlength' => '0', 'this' => object(Zikula_View_Theme)))
at array_keys(null) in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\View\Theme.php line 753
at Zikula_View_Theme->load_config() in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\View\Theme.php line 237
at Zikula_View_Theme->__construct(object(appDevDebugProjectContainer), 'ZikulaAndreas08Theme') in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\View\Theme.php line 286
at Zikula_View_Theme::getInstance() in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\lib\legacy\Zikula\Core.php line 516
at Zikula_Core->init('4095', object(Zikula_Request_Http)) in C:\Users\ku04935\Downloads\xampp-portable-lite-win32-1.8.1-VC9\xampp\htdocs\Zikula\core\src\index.php line 19

-Mark

@craigh
Copy link
Member

craigh commented Dec 20, 2013

This issue may be resolved. I just tested removing the acme-example module both before and after it was installed. in both cases, the behavior seemed appropriate with no exceptions or stack traces.

@craigh
Copy link
Member

craigh commented Jan 8, 2014

shall we close this? Anyone else want to test anything? @cmfcmf - I see your original post was with the errors module - /system modules probably should send up exceptions when absent - since they are all required and they shouldn't be uninstallable anyway. right?

@cmfcmf
Copy link
Contributor Author

cmfcmf commented Jan 10, 2014

No, this can't be closed. There shouldn't be an uninstall / remove icon if files are missing.

@cmfcmf cmfcmf closed this as completed in 85d6478 Jan 26, 2014
ghost pushed a commit that referenced this issue Jan 26, 2014
This PR was merged into zikula:1.3 branch.

Discussion
----------

Do not show uninstall icon if files are missing, closes #1278.

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | ---
| Fixed tickets | #1278
| Refs tickets  | ---
| License       | MIT
| Doc PR        | ---

Commits
-------

85d6478 Do not show uninstall icon if files are missing, closes #1278. cmfcmf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants