Plone: Reinstall Product Button

While creating Plone Products, I noticed that Plone will delete any created Portal objects, once a product associated with it has been uninstalled. Since I created a ZCatalog, which had data in it, I don't want that feature. After marching through the QuickInstaller code, I decided to add a "Reinstall Button" to all the respective products, to prevent uninstallation.

In your egg or product code root, simple add:
version.txt

Directory Structure Example (Python Pkg):
myproduct.stuff/myproduct/stuff/version.txt

The contents should be:
1.0-alpha build 1

When ever the version.txt is changed it will display the reinstall button.

Note: If you add the version.txt file to an existing product, you will have to manually uninstall the Product, then install it again. Otherwise, pressing "reinstall product" will anger the QuickInstaller (very bad).

The Fix for angry QuickInstaller:
If you manage to click "reinstall product" before you uninstall and install again, shame on you. To resolve, simply delete the QuickInstaller from the ZMI, then go to portal_setup, click the "Import" tab, select "QuickInstaller" from the list of profiles, then at the bottom, click "Import All Steps". This will cause all the installed products to go back to the "Products available for install" section, simply tick all the ones previously installed, and install them again.

Comments

Popular posts from this blog

Python SUDS with Windows Authentication (SOAP)

Text Sherlock the OpenGrok alternative (Source Code Search Engine)

How to remove, update, or replace the WKWebView inputAccessoryView