Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: BigAlGeorge on June 08, 2021, 05:44:24 PM

Title: In trouble with mods not installing
Post by: BigAlGeorge on June 08, 2021, 05:44:24 PM
Greetings I had 2 mods installed and it seems the offender is 'menu buttons'
So I tried to uninstall and got errors, and also uninstalled Google Analytics to make sure there were no mods.


Following instructions this forum, I overwrote all changed file to the installation with original distro SMF 2.0.

I still cant even install mod Google Analytics = 'An Error Has Occurred! Function name must be a string'

Every mod comes up with various install error.

Am I in dire straits? I suspect the mods have changed db and that is problem so if needed, I can revert to earlier db but its still not going to be right due to errant mod Menu Buttons.

Advice please?
Title: Re: In trouble with mods not installing
Post by: BigAlGeorge on June 08, 2021, 08:34:53 PM
Ok it appears I may have fixed this issue. I had replaced all files that were changed (from using Meld/Diff viewer).
I did not replace all files and for some reason this made the difference.

Only retaining Settings.php and overwriting all by FTP got it back to working state.

In hindsight, I should have used the original install file smf_2-0-18_install.tar.bz2 and excluded Settings.php that would have been much faster.
Thanks for consideration.
Al.
Title: Re: In trouble with mods not installing
Post by: shadav on June 08, 2021, 09:59:06 PM
since this is smf 2.0.x and not 2.1.x I've moved this into the 2.0.x support board

chances are for some reason the first time all files were not overwritten
another thing you can do also before installing anything else
download the repair_settings tool and use it to remove all hooks
https://wiki.simplemachines.org/smf/Repair_settings.php
Title: Re: In trouble with mods not installing
Post by: BigAlGeorge on June 08, 2021, 10:59:48 PM
Quote from: shadav on June 08, 2021, 09:59:06 PM
another thing you can do also before installing anything else
download the repair_settings tool and use it to remove all hooks
https://wiki.simplemachines.org/smf/Repair_settings.php
Greetings. Yes I did do that prior with the repair_settings.php but was not game enough to try remove all hooks.

I have gotten things working quite well now, but there is one obstinate 'Custom Form' mod that I mentioned before did not install but still left its dregs in /Sources and there is also a menu item under Modification Settings/[Custom Forms] which errors on select.
I guess its OK to delete Sources files with '...customform...' in the name but how do I manually get rid of the hook to clear Mod Settings/Custom Forms??

BTW I set up a new (temporary) SMF pristine install in another directory and the Custom Forms mod still came up with same PHP version error.
Thanks heaps, Al.
Title: Re: In trouble with mods not installing
Post by: Aleksi "Lex" Kilpinen on June 09, 2021, 12:39:20 AM
Any left over individual files should not pose immediate problems, you can basically delete them or leave them be for now.
To see exactly what files are for what mod you would need to check the mod's manual install instructions found on the download page of the mod. For Custom forms, those would appear to be


Move the included file "Subs-CustomForm.php" to "./Sources".
Move the included file "ManageCustomForm.php" to "./Sources".
Move the included file "CustomForm.english.php" to "./Themes/default/languages".
Move the included file "Class-CustomForm.php" to "./Sources".
Move the included file "CustomForm.php" to "./Sources".
Move the included file "CustomForm.template.php" to "./Themes/default".


but if you want to remove a specific hook left over instead of all hooks installed, you can try with Fix_packages.php (https://download.simplemachines.org/index.php?thanks;filename=fix_packages.php), and mark the mod installed - then try to uninstall it. (I'm not sure if this would work really).
Otherwise you will likely have to dig in to the database and remove it manually, or study the uninstall instructions for the mod coded inside the mod package, or install the mod again and properly uninstall it through the package manager (this may or may not work depending, among other things on the version of the mod package.)

https://wiki.simplemachines.org/smf/Manually_setting_a_package_installed_or_uninstalled/en

The absolute easiest way would have been to make sure no hooks were left over at the time when you overwrote the files.
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
Title: Re: In trouble with mods not installing
Post by: BigAlGeorge on June 09, 2021, 01:10:34 AM
A good concise answer thanks.
I wont mark as resolved till Ive sorted the Forms Mod issue; then will advise what the problem was.
Al
Title: Re: In trouble with mods not installing
Post by: Steve on June 09, 2021, 08:02:55 AM
Quote from: BigAlGeorge on June 09, 2021, 01:10:34 AMI wont mark as resolved till Ive sorted the Forms Mod issue ...

(https://i.imgur.com/Wm1mvsd.gif)
Title: Re: In trouble with mods not installing
Post by: BigAlGeorge on June 09, 2021, 08:42:58 PM
Solved; it was as simple as .htaccess removing
#In order to change the version to 7.0 -

<FilesMatch "\.(php4|php5|php7|php3|php2|php|phtml)$">
SetHandler application/x-lsphp80
</FilesMatch>