• Welcome to Simple Machines Community Forum. Please login or sign up.
January 27, 2022, 08:11:00 PM

News:

Want to get involved in developing SMF, then why not lend a hand on our github!


Questions about uninstalling mods.

Started by ApplianceJunk, January 22, 2013, 09:33:59 AM

Previous topic - Next topic

ApplianceJunk

This happens to be the CountryFlags mod I'm trying to uninstall so I can install the latest version.

I'm not posting this in the support thread for the mod because I feel it's some general questions that probably applies to all mods when trying to uninstall them.

In the attachment is what I see when I go to uninstall the mod. What happens if I go ahead and click proceed at this point with the failed test showing?

Why does ./Sources/Load.php first show Test successful then Test failed?

What's going to happen if I click the icon I have shown circled in the attachment?

What's the best why to proceed with removing a mod that comes up this way when I go to uninstall it?

Thanks,

Arantor

QuoteIn the attachment is what I see when I go to uninstall the mod. What happens if I go ahead and click proceed at this point with the failed test showing?

All the other changes as described will be carried out, but ones attached to 'test failed' will not. You can click the little paper icon on the left to see what code it is trying to find/replace.

QuoteWhy does ./Sources/Load.php first show Test successful then Test failed?

Because 3 changes are made to the file, the first can be completed automatically, the other two cannot.

QuoteWhat's going to happen if I click the icon I have shown circled in the attachment?

A pop-up will appear explaining what change is supposed to be carried out.

QuoteWhat's the best why to proceed with removing a mod that comes up this way when I go to uninstall it?

Make a note of the test failed changes, then go back and manually remove them. The code will not be *exactly* as there, so some detective work may be required.
No good deed goes unpunished
All helpful urges should be circumvented

ApplianceJunk

QuoteMake a note of the test failed changes, then go back and manually remove them. The code will not be *exactly* as there, so some detective work may be required.

Do I manually remove then before or after proceeding with uninstalling the mod through the package manager?

If I manually remove the code before proceeding with uninstalling the mod through the package manager will them files that failed in the past now pass the test?

Also well I'm working on this can I keep the forum running or should I put it in maintenance mod?

Thanks,

Arantor

QuoteDo I manually remove then before or after proceeding with uninstalling the mod through the package manager?

Doesn't really make a lot of difference in most cases.

QuoteIf I manually remove the code before proceeding with uninstalling the mod through the package manager will them files that failed in the past now pass the test?

Nope. The test simply says "I want to find this code and replace it with this other code but I can't find it." If you manually remove it, it still won't find it.

QuoteAlso well I'm working on this can I keep the forum running or should I put it in maintenance mod?

If you're working on manual changes, maintenance mode is probably favourable unless you're hardcore enough to brave it on a real server. Ideally, have a test server you can experiment on first.
No good deed goes unpunished
All helpful urges should be circumvented

Hj Ahmad Rasyid Hj Ismail

I suggest that you put your forum on maintenance. That is the best.

Regarding your problem, check installed package date and time and uninstall in sequence until you get to that mod. Normally you won't be facing any problem uninstalling this way.

Arantor has a mod which I think has been passed to Live which is able sort package according to its date and time. SMF didn't implement this but instead, create another table to list that.

I prefer and had been using Arantor's mod over SMF default as it is easier using that mod that to open the list to simply check package date and time. However, I don't think I can share it here as Live is selling that mod.

ApplianceJunk

ok, I manually removed the code for the mod in the two files.

Then I went back and proceeded with uninstalling the mod through package manager.

Then I installed the new mod. When installing the new mod all the test passed.

Thought everything went ok, but now when I go my modification settings I get this message.

QuoteParse error: syntax error, unexpected ';', expecting ')' in /home/applianc/public_html/forums/Sources/ManageSettings.php on line 2162

Looking at line 2162 is shows this.

call_integration_hook('integrate_general_mod_settings', array(&$config_vars));

Inside this section of code.

// Make it even easier to add new settings.
call_integration_hook('integrate_general_mod_settings', array(&$config_vars));

if ($return_config)
return $config_vars;

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=general';
$context['settings_title'] = $txt['mods_cat_modifications_misc'];

Arantor

Would be interesting to see the lines just before that.
No good deed goes unpunished
All helpful urges should be circumvented

ApplianceJunk

The section of code before that is this.


// Enable / Disable Last Edit by for Admins
array('check', 'enable_disable_last_edit_by'),
'',
// Enable / Disable Last Edit by for Admins
'',



Arantor

There should be a ); after that bit and before the call_integration_hook() bit.

Seems to me there's some bad mod installation going on there.
No good deed goes unpunished
All helpful urges should be circumvented

ApplianceJunk

ok, I added that like this.



// Enable / Disable Last Edit by for Admins
array('check', 'enable_disable_last_edit_by'),
'',
// Enable / Disable Last Edit by for Admins
'',);


// Make it even easier to add new settings.
call_integration_hook('integrate_general_mod_settings', array(&$config_vars));

if ($return_config)
return $config_vars;

$context['post_url'] = $scripturl . '?action=admin;area=modsettings;save;sa=general';
$context['settings_title'] = $txt['mods_cat_modifications_misc'];



The Modification Settings page is now working along with the new version of the flag mod, thanks!

QuoteSeems to me there's some bad mod installation going on there.

I'm interested in what makes you say that.

Is it because of the missing ); or something else you seen?

Thanks,

Arantor

Yeah, basically it means that a previous mod did an install but managed to break the code in that page.

Especially since in 2.0 RC4 and up, there is absolutely no reason to edit the file to extend *that* page. The whole point of call_integration_hook there is so that people can just add to that page without file edits >_<
No good deed goes unpunished
All helpful urges should be circumvented

ApplianceJunk

Thanks for all the info.

I have a just a few mods I have been meaning to update and a few more I have been meaning to remove and have run into the test failed thing before so I just left them.

Now that I'm a little more educated on how to handle it I will recreate my site on a local machine and do some practicing before trying it on my live site again. :)

Thank you,

Hj Ahmad Rasyid Hj Ismail

That is a smart move. Running a copy locally is safer. Only make final changes to your site when you are satisfied with how it works locally. I can see that you are asking good questions lately. So, goodluck and all the best.

Advertisement: