Magento Forum

   
Page 1 of 2
Diff File question
 
ogweewee
Member
 
Total Posts:  47
Joined:  2008-10-20
 

I have a noob question on Diff Files http://www.magentocommerce.com/download/diff.
I tried upgrading 1.2.0.1 to 1.2.0.2. via Magento Connect but it stayed on 1.2.0.1 so I wanted to try the diff file approach.

I was wondering if all I have to do is copy the file names over as per http://www.magentocommerce.com/downloads/assets/1.2.0.2/1.2.0.1-1.2.0.2.diff via FTP?

Thanks

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

To apply a diff file, you use the ‘patch’ Linux tool. Upload the diff file to your Magento root directory, then execute the following command from a shell prompt (while you are in the Magento root dir.):

patch -p0 < name_of_diff_file.diff

 
Magento Community Magento Community
Magento Community
Magento Community
 
ixoster
Member
 
Total Posts:  51
Joined:  2008-08-06
 

hi, i try update with 1.2.0.3-1.2.1.diff file like you say “patch -p0 < name_of_diff_file.diff” but get error:
# patch -p0 < 1.2.0.3-1.2.1.diff
patching file app/Mage.php
Hunk #1 FAILED at 82.
1 out of 3 hunks FAILED—saving rejects to file app/Mage.php.rej
patching file app/locale/en_US/Mage_Customer.csv
patching file app/locale/en_US/Mage_GoogleCheckout.csv
patching file app/locale/en_US/Mage_Tag.csv
patching file app/locale/en_US/Mage_Page.csv
patching file app/locale/en_US/Mage_CatalogInventory.csv
patching file app/locale/en_US/Mage_Core.csv
patching file app/locale/en_US/Mage_Usa.csv
patching file app/locale/en_US/Mage_Strikeiron.csv
patching file app/locale/en_US/Mage_Downloadable.csv
patching file app/locale/en_US/Mage_Newsletter.csv
patching file app/locale/en_US/Mage_Tax.csv
patching file app/locale/en_US/Mage_CatalogSearch.csv
patching file app/locale/en_US/Mage_Checkout.csv
patching file app/locale/en_US/Mage_Wishlist.csv
patching file app/locale/en_US/Mage_GoogleBase.csv
patching file app/locale/en_US/Mage_Rss.csv
patching file app/locale/en_US/Mage_Catalog.csv
patching file app/locale/en_US/Mage_Adminhtml.csv
patching file app/locale/en_US/Mage_PaypalUk.csv
can’t find file to patch at input line 447
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|Index: app/design/frontend/default/iphone/template/shipping/tracking/popup.phtml
|===================================================================
|--- app/design/frontend/default/iphone/template/shipping/tracking/popup.phtml (revision 33162)
|+++ app/design/frontend/default/iphone/template/shipping/tracking/popup.phtml (revision 33200)

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

The error only concerns the iPhone template files. Unless you have this theme install, you can safely ignore this error.

Were your store upgraded? Does the new version number show in the footer in frontend/backend? Also remember to clear your cache.

rm -rf var/cache/*

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

When you apply the patch function, does it do exactly the same thing as the Magento Connect do ?
Is there a difference between the 2 methods ?
Thanks
Max

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

The result will (should) be the same, but the two methods are entirely different. The Magento Connect Manager uses PEAR, while when applying the patch, the changed files are updated directly according to the diff file.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

With the Magento Connect when I update I have a lot of changes in the files. It is like the files are new. It cancels my changes.
Is the patch method a better solution when we have changes in the design code ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

The template files will still need to be updated to avoid bugs and incompatibility issues with the new release, however you can inspect the diff files to get an understanding of what changes has been made to the templates.

If you are using a custom directory structure for your template, it should not overwrite your existing files. Only the default templates will be updated.

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

That’s why I use a Core Team Magento template ! But the Magento connect seems to replace the files instead of updating the lines.
I will test the 2 solutions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

Yes, that is true. Magento Connect will replace the files, while the patch will only apply the changes to the existing files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ixoster
Member
 
Total Posts:  51
Joined:  2008-08-06
 

I write to my hoster ignore error, his start again diff and finish. I check in frontend/backend ver and see old one Magento ver. 1.2.0.2.  I try to update with magento connect write “magento-core/Mage_All_Latest” and get error:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

i all ready all files set chmos to 644 and all directories to 755, only directories - app/etc, var, media set 777

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

If your host has suEXEC/suPHP enabled, group/other write permissions are not allowed. No directories should have 777 permissions.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ixoster
Member
 
Total Posts:  51
Joined:  2008-08-06
 

do you mean set app/etc, var, media to 755 chmos? but how this help to update magento?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Lol
Member
 
Avatar
Total Posts:  68
Joined:  2008-06-26
Plymouth, UK
 

When Magento Connect fails to apply an upgrade correctly (even though no errors occur during the upgrade) is this likely due to a permissions issue on the host server? I get this happen a lot, even on my own staging server. I’ve ended up replacing groups of files manually until things work. Not very satisfactory.

As an aside, Magento Connect seems to work fine on completely untouched Magento installations. This implies that customisations to some of the core files are what trip it up. Would using the app>code>local directory for customised core files be a way to prevent Magento Connect update problems?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Sindre|ProperHost
Mentor
 
Avatar
Total Posts:  1155
Joined:  2008-04-24
 

You should never modify the core files. Always store customizations in the app/code/local directory. I agree with your view on the upgrade issues. They are usually caused by incorrect file permissions or too low memory limit or max execution time on the server.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ixoster
Member
 
Total Posts:  51
Joined:  2008-08-06
 

i need change app/etc, var, media to 755 chmos or leave 777?

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
    Back to top
Page 1 of 2