I have created a module, exported the extension and afterwords I have installed it (on a fresh store) using direct package file upload. The extension works as expected.
Now, I have made some updates, exported the extension with another Release Version number, but when I try to upload the archive (in the same mode) I get an error ("CONNECT ERROR: Package file is invalid [..] './app/code/local/Smart2Pay/Globalpay/Block/Form/Pay.php' already exists")
I read that I could alter some downloader\lib\Mage\Connect\Validator.php file (here) in order to permit file overwriting, but I want to know if there is any other best practice related solution. I need this extension update to work for all magento users.
Like Tim says, the correct way to install a newer version of a Magento extension package is by first running the uninstall option in MagentoConnect Manager to remove the old extension, and then running the install option to install from the newer package file.
Unfortunately this is the (poor) design of the MagentoConnect package manager feature.
Its also worth explaining what happens with any database modifications that the extension / package makes. Magento modules have no way to specify uninstall scripts or instructions. This means that after the original module / package is uninstalled, any database changes are still present and have NOT been removed. When the newer version of the module is reinstalled, this should trigger the module's DB upgrade scripts to run instead of it' install scripts.
So the detailed breakdown of what happens is the following:
When the module is originally installed from a package, the module's newest install script corresponding to the module version in config.xml is run, making any necessary database changes.
When the module is unistalled from MagentoConnect manager, the database is left as-is, so all changes the module made are still present in the DB.
When the newer version of the module is installed, the Magento database core_resource table tells the installer which version of the module was previously installed. The previous version and new version numbers are used to find an applicable database upgrade script in the module code. If the appropriate upgrade script is located, it is then run.
Related
I am trying to install the following extension via Magento Connect 2.0
Creativestyle_CheckoutByAmazon
My issue is that I need to uninstall this extension first as it already exists (seems to be partially broken so I want to reinstall it) - what is the best method for uninstalling extensions in Magento, is there a simple option for this in Magento Admin?
For some reason I have logged into my Magento Connect but cannot see any of my installed modules - see link below..
http://postimg.org/image/5n9vbyipf/
Whatever module you have installed, will be having its module file in app/etc/modules folder.
You can set false in <active>false</active> tags in the repective xml file. Also, you can extract the module's zip and replaced all the old ones with the new default files.
I want to update a Magento 1.4.2.0 to 1.6.x.y. instead of the latest version 1.7.x.y
There are many articles on how to update a Magento installation to the latest version, but that´s not what I want. There are some forum threads where people are asking how to update to a specific version, but those all don´t sport a solution.
It seems like it is only possible to unpack the tar.gz of the specific version, but it is not possible to use the command line tool, i.e.
./mage config-set preferred_state stable
./mage upgrade-all --force
Is there a way to use the command line tool to update to a specific version?
Two different ways of handling this, 1) Manually...
From my experience, what you end up doing is scrapping Magento Connect (which often is the source of all evil, when you've had it do partial upgrades two or three times in a row), downloading the whole package from the download archive (you have all the versions available from there on the Release Archives tab), unzipping them to a directory and then either on the server, copying them into your Magento root directory or from a remote workstation, ftp/scp uploading them to the server Magento root directory.
If you're serious about running Magento, you will have a development server that you do this to several times to find out where all the upgrade breakages are so you can weed out busted templates, detect forgotten core modifications, curse third party modules that don't survive, etc. It's really important to do this if you're depending on that e-commerce site for your income as intense suckage occurs when you aren't ready and sink the live site.
If you've modularized all your module overrides, created your own skin folders and custom template or used a well written template from a developer, it truly is just simply dumping the new version files on top of the old version files and overwriting everything (only after disabling all Magento caching and the compiler if you were using it and manually deleting all var/cache--? folders).
If, however, you've modified any of the files you are overwriting, you are in a world of hurt because you didn't do things properly.
Also, you have to deal with upgrading third party modules to work with the new version.
Then before committing the live site, backup all Magento application files and do a database dump.
2) Or use the command line tool as follows...
Since the original question was, "can you use the command line tool?" yes you can. Once you have the file saved from the download archive, use the following:
./mage install-file /home/login-name/path-to-download-file/magento-1.5.x.x.tgz
I've also used this on various module packages to inspect the contents. The mage command has a download only, download the package file, inspect the contents. If you like what it does, install it.
I have an installer implemented with "Packages" which contains the payload and after running some plugins and a post install script it successfully installs the product.
The same package bundle is used for making updates too, as we run it in background with root privileges and it overwrites the current/old installation files.
We now have the requirement to make a lightweight installer having the components (different Packages inside the product) in a web location to be downloaded and installed.
As I know that this is possible in other systems as Windows/InstallShield with "Releases of Web Type", I would like to know if this is possible in OS X. Otherwise, I will have implement it all from scratch (packages management, download, packages versions compare to make selective updates, privileges escalation, etc).
Well, it was long ago and I almost started doing a web installer from scratch but then I found out that the option is in Packages itself. Hope this helps.
It is the "Package Reference" option.
According to the Packages documentation
A Package Reference lets you use a package that is hosted on a web
server or a removable media and to which you may not have a direct
access. This package will not be built during the built phase.
I think that any referenced package will have its own pre-post-scripts so there would be no problem because of the limited options in the Package Reference. But I need to test it.
I am maintaining a Joomla module that gets installed on a site to which I have no file transfer privileges. Of course I do development in a test instance of Joomla where I do have file transfer privileges, and there I can edit module code and reload pages and everything works well.
However, when it comes time to move the updated module to the "live" site, the only option seems to be to uninstall the existing version of the module and then upload the new version of the module. If I just try to re-upload the module using the Joomla "Extension Manager" install option, I get an "Another module is already using directory" error.
Uninstalling, however, also wipes out all the "positions" that have been set up to use this module with some extensive parameter tweaking.
Is there a way to get Joomla to let me overwrite the old version of the module with the new version? Is there something I can put in the module's XML description to facilitate this?
The sites I am writing for are running Joomla 1.5.23.
Yes, that's possible by changing the install line in your xml to the following before zipping it up:
<install version="1.5" type="module" client="site" method="upgrade">
Just tested it on a 1.5.23 and it kept my previous module settings but also copied over any changed code.
A new version of our product (a software package) has been released recently. To expand functionality, we developed a plugin afterwards. Now we would like to deploy these files (two new files and an updated version of an existing file) as hotfix (or update) with MSI patch (msp). I downloaded a blank PCP file from MSDN website and made some changes in it. The changes involve the following tables:
ImageFamilies
PatchMetadata
PatchSequence
Properties
TargetImages
UpgradedImages
All the other tables remain blank.
Then, I managed to create an msp file with this PCP file based on two versions of the admin image of the software package, both of which were built from Visual Studio setup project (VS 2010). The difference between these two msi packages are that I replaced a file and added two new files in, but nothing else. I didn't change the product code (GUID), the upgrade code (GUID), nor the version number.
Then I was trying to install this msp file on top of the released version.
The first screen appearing is asking to Repair or Remove the product. This is not what we want. We want the installer is like a fresh installation, including showing the licence agreement. How do I define the UI for MSI patch?
During the installation of the patch, I got an error message as below, then the installation failed:
Error 1001. Exception occurred while initializing the installation: System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\WINDOWS\system32\Files\BPS\TestApp' or one of its dependencies. This system cannot find the file specified.
BPS is the folder where we install our product in [ProgramFilesFolder]. I wondered why MSI was trying to search in "C:\Windows\system32" for files installed in [ProgramFilesFolder]. In addition, the changed files in the hotfix are located in somewhere else ([CommonAppDataFolder]) instead of in this "BPS" folder.
Can anyone help me with these problems? If any more information is needed to identify the issues, please let me know. Any thoughts, advices, suggestions would be very much appreciated.
Dan
The first screen appearing is asking
to Repair or Remove the product. This
is not what we want.
In the upgrade package increase the Product Version. This way you will use a minor upgrade instead of a small update.
You can also try using the MSIEXEC command line to apply the patch:
http://msdn.microsoft.com/en-us/library/aa367574(VS.85).aspx
http://msdn.microsoft.com/en-us/library/aa367575(VS.85).aspx
During the installation of the patch,
I got an error message as below, then
the installation failed
Is there something in your installer using that file? Perhaps a custom action? Try looking in the log to see what action tries to access that file.