Question

Does Magento have any built in way to validate that a Magento Connect package is correctly installed? If not, is there any existing code snippet that will extract a file list from an extension and check if the extension is actually installed?

Context: Often, when installing files via the Magento Connect GUI, the web-server won't have the proper permissions to write files out to the system. This should result in a failed installation. However, the way the Magento Connect GUI is coded, Magento Connect will report that the extension installed successfully, and mark in its data store that the extension is installed regardless of whether it could actually install the extension files.

This leads to an extension being listed as installed in Magento Connect, but not actually being on the file system.

Short of coding something up myself, is there any way to validate an extension is installed correctly? Using the GUI, the ./mage CLI, or even a short shell script that calls some existing Magento method.

Lacking that, has anyone written a stand alone script to do this?

Was it helpful?

Solution

There is definitely no generic function to validate it. Also I never bumped into a tool that does it. However I think it would be quite easy to write one which will read the content of package.xml and verify existence of each file of the extension.

This is another time when modman and magento-composer are doing it better. Both will fire error in case of insufficient permissions. And if for modman you will need to download extension from MagentoConnect manually and probably also add a modman file, magento-composer will do it all automatically. All you have to do is to add an extension key into composer.json.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top