Error in mod installation: Difference between revisions From Online Manual

Jump to: navigation, search
No edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
You have just tried to install a mod using the package manager and the screen indicates that the mod had several failures.
You have just tried to install a mod using the package manager and the screen indicates that the mod had several failures.


First of all: '''ALWAYS TAKE A BACKUP''' of your forum files, and database before applying any mods, especially if manual intervention is required.
'''Always back up''' your forum files and database before applying any mods, especially if manual intervention is required. SMF has an automatic backup that creates files with the file extension .php~. This can be disabled, so it is always a good idea to make a manual [[backup]].
(Yes, SMF does make a copy of the files that the mod instructions tell it to edit (those are the *.php~ files that you may see in your forum directories) but taking a clean, manual backup is always the best option.


So, you see the following after attempting to install a new mod.
An example of a failed attempt to install a mod correctly is shown below:
     1. Execute Modification    ./index.php    Test successful
     1. Execute Modification    ./index.php    Test successful
     2. Execute Modification    ./Themes/default/BoardIndex.template.php    Test failed
     2. Execute Modification    ./Themes/default/BoardIndex.template.php    Test failed
Line 12: Line 11:
This means that the code which the mod is attempting to find, in order to perform the modification instruction (''add before'', ''add after'', or ''replace'') has been changed, either by another mod, by the admin manually making changes to the code, or because the mod you are attempting to install is for a different version of the file(s).
This means that the code which the mod is attempting to find, in order to perform the modification instruction (''add before'', ''add after'', or ''replace'') has been changed, either by another mod, by the admin manually making changes to the code, or because the mod you are attempting to install is for a different version of the file(s).


You can still try to install the mod, but you will have to MANUALLY make changes to the "failed" files.
You can still try to install the mod, but you will have to make changes '''manually''' to the "failed" files.


Only if you use smf 2.*, 1.* does not have this feature, you can click on the ''EDIT'' icon to the left of the instruction which failed, a pop-up will be generated indicating the specific instruction (the code being looked for and the code to be added or replace). Otherwise you can use the parser on the page where you downloaded the mod.
If your forum is version 2.0.x, you can click on the ''edit'' icon to the left of the instruction which failed. A pop-up will be generated indicating the specific instruction (the code being looked for and the code to be added or replace). Otherwise, you can use the parser on the page where you downloaded the mod.


Take note of these instructions (if there is more than one failure, copy each instruction to a text editor for later use.) and click the ''Install Now'' button.
Take note of these instructions (if there is more than one failure, copy each instruction to a text editor for later use.) and click the ''Install Now'' button. You will receive a warning that the mod will not fully install, click ''ok''.
You will receive a warning that the mod will not fully install, click ''OK''.


At this point, your mod is mostly installed (depending on the number of failures).
At this point, your mod is mostly installed (depending on the number of failures).


Now, using an FTP program or your site's file manager, open and edit the files in which the system had noted failures. You should use a proper text editor to edit the files, it is NOT recommended to use Word or Notepad as they can add extra things to the files, using something like [http://notepad-plus-plus.org/ Notepad++] is recommended.
Using an FTP program or your site's file manager, open and edit the files in which the system had noted failures. You should use a proper text editor to edit the files, it is not recommended to use Word or Notepad as they can add unwanted extras to the files, using a program like [http://notepad-plus-plus.org/ Notepad++] is recommended.


'''Be Aware''': The code which is listed in the mod instructions is not present in the exact form listed. If it was, the system would have been able to do the automatic instruction. This means that you will have to use some human intuition to find the code which you are looking for. It may be as simple as a difference in leading spaces... or another mod may have already significantly altered the searched for lines.
'''Be Aware''': The code which is listed in the mod instructions is not present in the exact form listed. If it were, the system would have been able to carry out the automatic instruction. This means that you will have to use some intuition to find the code which you are looking for. It may be as simple as a difference in leading spaces, or another mod may have already significantly altered the searched for lines.


Once you have found the correct section of code, perform the instruction. ''Add before'', ''Add after'' or ''Replace''.
Once you have found the correct section of code, perform the instruction ''Add before'', ''Add after'', or ''Replace''. If the instruction is ''Replace'', you will have to be careful because if another mod has already altered this section of code, simply replacing the code may cause errors in your previously installed mod(s).
If the instruction is Replace, you will have to again, '''be careful'''. If another mod has already altered this section of code, simply replacing the code may cause errors in your previously installed mod(s).
 
Once you have edited the file with the appropriate code, save it, and, if using ftp, upload the altered file to your system.


Once you have edited the file with the appropriate code, save it and, if using ftp, upload the altered file to your system.
==See Also==
==See Also==
*[[Manual installation of mods]]
*[[Manual installation of mods]]


[[Category:FAQ]]
[[Category:FAQ]]

Latest revision as of 11:39, 2 May 2015

You have just tried to install a mod using the package manager and the screen indicates that the mod had several failures.

Always back up your forum files and database before applying any mods, especially if manual intervention is required. SMF has an automatic backup that creates files with the file extension .php~. This can be disabled, so it is always a good idea to make a manual backup.

An example of a failed attempt to install a mod correctly is shown below:

   1. Execute Modification    ./index.php    Test successful
   2. Execute Modification    ./Themes/default/BoardIndex.template.php    Test failed
       1. Add After    ./Themes/default/BoardIndex.template.php    Test successful
       2. Replace    ./Themes/default/BoardIndex.template.php    Test failed

This means that the code which the mod is attempting to find, in order to perform the modification instruction (add before, add after, or replace) has been changed, either by another mod, by the admin manually making changes to the code, or because the mod you are attempting to install is for a different version of the file(s).

You can still try to install the mod, but you will have to make changes manually to the "failed" files.

If your forum is version 2.0.x, you can click on the edit icon to the left of the instruction which failed. A pop-up will be generated indicating the specific instruction (the code being looked for and the code to be added or replace). Otherwise, you can use the parser on the page where you downloaded the mod.

Take note of these instructions (if there is more than one failure, copy each instruction to a text editor for later use.) and click the Install Now button. You will receive a warning that the mod will not fully install, click ok.

At this point, your mod is mostly installed (depending on the number of failures).

Using an FTP program or your site's file manager, open and edit the files in which the system had noted failures. You should use a proper text editor to edit the files, it is not recommended to use Word or Notepad as they can add unwanted extras to the files, using a program like Notepad++ is recommended.

Be Aware: The code which is listed in the mod instructions is not present in the exact form listed. If it were, the system would have been able to carry out the automatic instruction. This means that you will have to use some intuition to find the code which you are looking for. It may be as simple as a difference in leading spaces, or another mod may have already significantly altered the searched for lines.

Once you have found the correct section of code, perform the instruction Add before, Add after, or Replace. If the instruction is Replace, you will have to be careful because if another mod has already altered this section of code, simply replacing the code may cause errors in your previously installed mod(s).

Once you have edited the file with the appropriate code, save it, and, if using ftp, upload the altered file to your system.

See Also



Advertisement: