Advertisement:

Author Topic: I apologize for the absurd question, but...  (Read 17797 times)

Offline NinaSay

  • Newbie
  • *
  • Posts: 3
I apologize for the absurd question, but...
« on: August 05, 2012, 09:52:36 PM »
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!

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #1 on: August 05, 2012, 09:58:27 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline NinaSay

  • Newbie
  • *
  • Posts: 3
Re: I apologize for the absurd question, but...
« Reply #2 on: August 05, 2012, 10:00:10 PM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #3 on: August 05, 2012, 10:03:01 PM »
Running the large upgrade would likely remove your mods. Your theme will require some changes, there's no way around that.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: I apologize for the absurd question, but...
« Reply #4 on: August 05, 2012, 11:05:34 PM »
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. :)
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #5 on: August 05, 2012, 11:13:22 PM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: I apologize for the absurd question, but...
« Reply #6 on: August 06, 2012, 06:41:08 AM »
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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #7 on: August 06, 2012, 07:21:25 AM »
upgrade.php nukes the installed list but AFAIK it does not clear hooks.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: I apologize for the absurd question, but...
« Reply #8 on: August 06, 2012, 07:48:51 AM »
ah...

Code: [Select]
  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
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #9 on: August 06, 2012, 07:52:49 AM »
Also send a call to cache_put_data('modsettings', null) while you're at it (or use updateSettings to do it properly)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: I apologize for the absurd question, but...
« Reply #10 on: August 06, 2012, 08:07:11 AM »
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?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #11 on: August 06, 2012, 08:12:25 AM »
>_>

That instruction clears the cache, not the actual items.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline emanuele

  • SMF Super Hero
  • *******
  • Posts: 14,156
  • Gender: Male
  • THERE'S JUST ME
Re: I apologize for the absurd question, but...
« Reply #12 on: August 06, 2012, 09:33:27 AM »
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)
Code: [Select]
  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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #13 on: August 06, 2012, 09:35:13 AM »
And that still doesn't clear the cache ;)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,575
  • Gender: Male
    • Kindred-999 on GitHub
Re: I apologize for the absurd question, but...
« Reply #14 on: August 06, 2012, 09:41:58 AM »
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.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Sorck

  • Jr. Member
  • **
  • Posts: 268
  • Gender: Male
  • Is it a bird? Is it a plane? Of course it's not.
    • Sorck on GitHub
    • Second Sphere
Re: I apologize for the absurd question, but...
« Reply #15 on: August 06, 2012, 09:48:12 AM »
You know what, I have a feeling Arantor knows that the cache needs emptying for that to work properly. :P

Code: [Select]
<?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);
?>


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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #16 on: August 06, 2012, 09:53:22 AM »
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.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sorck

  • Jr. Member
  • **
  • Posts: 268
  • Gender: Male
  • Is it a bird? Is it a plane? Of course it's not.
    • Sorck on GitHub
    • Second Sphere
Re: I apologize for the absurd question, but...
« Reply #17 on: August 06, 2012, 10:06:39 AM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: I apologize for the absurd question, but...
« Reply #18 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 ;)
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Sorck

  • Jr. Member
  • **
  • Posts: 268
  • Gender: Male
  • Is it a bird? Is it a plane? Of course it's not.
    • Sorck on GitHub
    • Second Sphere
Re: I apologize for the absurd question, but...
« Reply #19 on: August 06, 2012, 10:33:44 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...