News:

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

Main Menu

I apologize for the absurd question, but...

Started by NinaSay, August 05, 2012, 09:52:36 PM

Previous topic - Next topic

NinaSay

What is the difference between SMF 2.0 RC5 and SMF 2.0.2?

I am running SMF 2.0 RC5, and was wondering if there is any reason to upgrade and if there are any tutorials for it?

Thanks so much!

Arantor

2.0 RC5 is a beta version, released prior to 2.0 (and since 2.0.2). There are some bugs in 2.0 RC5 that were fixed in later versions as well as multiple security vulnerabilities that have also been fixed.

NinaSay

Would running the large upgrade to 2.0.2 work? Would you know by any chance if mods/theme I'm using will still work?

Thank you for such a quick response.

Arantor

Running the large upgrade would likely remove your mods. Your theme will require some changes, there's no way around that.

Kindred

However, most mods and themes for RC5 will work just fine on 2.0.2
(you might want to check if the mods themselves have actually been upgraded in the mean time as well - if you are so far behind on keeping to forum up-to-date, you probably missed mod updates as well. :)
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Yes, most mods will work. Except they need to be removed first before doing the upgrade because with hooks, it's possible things will be left behind that shouldn't be and so on.

It's a complicated, and slightly messy, situation.

Kindred

hmmmmmm... I thought that the upgrade.php removed installed mods and hooks during the process....   I don't recall removing any mods during my site upgrade.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

upgrade.php nukes the installed list but AFAIK it does not clear hooks.

Kindred

ah...


  echo 'Remove any hooks for the removed mods<br /><br />';
  $integrate_columns = array('integrate_actions', 'integrate_admin_areas', 'integrate_bbc_buttons', 'integrate_bbc_codes', 'integrate_core_features', 'integrate_load_permissions', 'integrate_menu_buttons', 'integrate_pre_include', 'integrate_profile_areas');
  foreach ($integrate_columns as $column)
    $request = $smcFunc['db_query']('', 'DELETE FROM {db_prefix}settings WHERE variable LIKE {string:variable}', array('variable' => $column));



add this as a php file in your forum directory and run it...   that should take care of the hooks
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

Also send a call to cache_put_data('modsettings', null) while you're at it (or use updateSettings to do it properly)

Kindred

hmmm.... I don't know that one. I threw this together as part of a "reset my forum" script.

but, in this case, do we really want to reset the modsettings? Wouldn't we want to preserve them for when the mod gets reinstalled?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Arantor

>_>

That instruction clears the cache, not the actual items.

emanuele

Also the list of hooks in that code is rather short and will not remove all the hooks present in 2.0.

That one is probably a bit drastic but it should remove all the hooks (along with any kind of setting that starts with "integrate_", but it should be unlikely that a mod introduced a setting whose name starts with "integrate_"...I hope)

  echo 'Remove any hooks for the removed mods<br /><br />';
  $smcFunc['db_query']('', 'DELETE FROM {db_prefix}settings WHERE variable LIKE {string:variable}%', array('variable' => 'integrate_'));


Take a peek at what I'm doing! ;D




Hai bisogno di supporto in Italiano?

Aiutateci ad aiutarvi: spiegate bene il vostro problema: no, "non funziona" non è una spiegazione!!
1) Cosa fai,
2) cosa ti aspetti,
3) cosa ottieni.

Arantor


Kindred

lol... sorry Nina, We seem to have gone off on a tangent.

To re-state, unless you run the script provided by me or emanuele, you should probably uninstall your mods before upgrading.
Then download the large upgrade package, upload and unzip it and run upgrade.php

you can then re-install mods. The themes (other than the default) will likely be unaffected.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Sorck

You know what, I have a feeling Arantor knows that the cache needs emptying for that to work properly. :P

<?php
require_once('SSI.php');
echo 
'Remove any hooks for the removed mods<br /><br />';
$smcFunc['db_query']('''DELETE FROM {db_prefix}settings WHERE variable LIKE {string:variable}%', array('variable' => 'integrate_'));
echo 
'Now fixing the cache...<br /><br />';
cache_put_data('modsettings'null0);
?>



Quote from: Kindred on August 06, 2012, 09:41:58 AM
you can then re-install mods. The themes (other than the default) will likely be unaffected.
Just remember that version emulation might be needed. :)

You can find information about that via Package Manager.

Arantor

Either that or just uninstall mods before using the upgrade...

Also, SimpleDesk won't play nicely with that approach because it declares its own hooks that don't have the integrate_ prefix, which is why uninstalling mods is simply the cleanest way to do it.

Sorck

smCore has a much nicer setup with a separate hooks table.

Clearing things out will be much nicer in the future. :P

But yes, clearing the mods is safer for most purposes. And unless you have a lot of mods it won't take very long.

Arantor

The separate hooks table does add a performance penalty ;) Though I have an architecture around hooks that I particularly like, like automatically disabling all the hooks a plugin uses if I just rename or remove the folder a plugin is in ;)

Sorck

Quote from: Arantor on August 06, 2012, 10:09:23 AM
The separate hooks table does add a performance penalty ;) Though I have an architecture around hooks that I particularly like, like automatically disabling all the hooks a plugin uses if I just rename or remove the folder a plugin is in ;)
Yes, there is an extra database query per page load/an extra cache hit.

This hooks thing seems interesting... I've never really looked through them in any detail in SMF 2.x or smCore. Am I right in assuming that the hook deletion things is related to smCore?

EDIT: on a side note this is getting more off-topic. :P There should be a place for discussing smCore beyond git and the smCore website as both of them are fairly quiet...

Advertisement: