|
Maintaining Your Store > Applying Patches > Applying File Patches |
Top Previous Next |
|
The 'Patch/Upgrade center' section of X-Cart allows you to apply file patches supplied by X-Cart developers using the administrator interface of your store. A patch can be applied from a patch file or from a URL. Applying the patch can be done in several ways: via X-Cart administration interface, by issuing the command 'patch' or manually. To apply a patch via X-Cart admin interface:
If you are going to apply a new patch, 'Reverse' selectbox should be set to 'No'. Selecting 'Yes' will lead to the removal of the specified patch that has already been applied. To start the application of the patch click on Apply. The procedure of patch application includes two basic steps: 1) testing patch applicability; 2) applying the patch.
If your Patch/Upgrade center detects any problems (errors - marked in red), you will not be able to proceed with applying your patch until these problems are resolved. You will have to go back, make the necessary corrections and run the patch applicability test once again.
The process of upgrade patch application is shown on the screen:
Patch results show what files the patch was successfully applied to, and what files failed to be patched. You can see patch log for details. The following problems may arise: checksum error - patch contents is corrupted; non-writable - writable permission has not been given to the file, please give it writable permission; not a file - the target is not a file; not exists - the necessary file is missing; could not patch - the patch cannot be applied to this file automatically, because it has been significantly modified, the patch should be applied to this file manually When the patch has been successfully applied, click on Finish to get back to the 'Patch/Upgrade center' page. Note: Do not forget to change permissions for the patched files. To apply a patch by issuing the command 'patch':
You can read more about 'patch' command in the manual (man patch, info patch). To apply a patch manually: If a patch application failed in the first two ways (this may be caused by redundant spaces or conversion problems) you can try to apply the patch manually.
Diff files are divided into parts ("hunks"). Each "hunk" starts with a line like this:
If you cannot apply the patch in these ways it means the file that needs to be patched has been modified or this file is from another version of X-Cart and cannot be patched by this patch. Ask technical support to help you. |