QUICK NEWS

{NEW} - A new css video is up.

{OLD} - New video courtesy of Skhilled, Thanks for posting it up.

Video of the moment:


Internal Links

SMF Sites

Quick Info

2..0.18 upgrade errors - help?

Started by LandyVlad, Feb 01, 2021, 06:50 PM

Previous topic - Next topic

0 Members and 4 Guests are viewing this topic.

shawnb61

#15
Note: You can do the above only to go from 2.0.x => current 2.0.18.  This is because there have been no DB changes within 2.0.x. 

You cannot upgrade a 1.0 or 1.1 DB to 2.0.18 in this fashion.  You MUST run the upgrader from 1.0.x or 1.1.x. I thought it would be important to note the difference here.

This is why the team says "no DB changes" - there haven't been any.  So getting current on a 2.0.x forum is actually a pretty simple matter of overwriting the source code with 2.0.18...  Then dealing with your mods...

shawnb61

#16
On the subject of uninstalls, two other things to be aware of...
1) Uninstall mods in the opposite order of mod installation. If you installed A, then B, then if you experience issues during an uninstall of A, you should try deinstalling B first, then A.
2) Sometimes mod conflicts are only detected on an uninstall after an SMF patch.  This is why it is helpful to stay current on all mods.

Scenario 1:
Consider two mods that insert lines before specified SMF code:

Existing SMF code:
SMF line 1
SMF line 2

Mod A inserts lines before line 2:
SMF line 1
MOD A CODE
SMF line 2

Then Mod B does the same:
SMF line 1
MOD A CODE
MOD B CODE
SMF line 2

Deinstalling Mod A will now fail, because it will be looking to replace:
MOD A CODE
SMF line 2

With:
SMF line 2

But it won't be found.  Deinstalling Mod B, then Mod A, & reinstalling Mod B works with no issues. The opposite order problem arises a lot with $txt fields, but can happen anywhere, actually.


Scenario 2:
A mod wants to install code between SMF lines 2 & 3, so it substitutes:
SMF line 1
SMF line 2
SMF line 3

With:
SMF line 1
SMF line 2
MOD CODE LINE 1
MOD CODE LINE 2
SMF line 3

Now, SMF 2.0.18 modifies line 2:
SMF line 1
SMF line 2 with new cool features added
MOD CODE LINE 1
MOD CODE LINE 2
SMF line 3

Although the mod and patch installed just fine, the mod will not uninstall, because it is looking for
SMF line 1
SMF line 2
MOD CODE LINE 1
MOD CODE LINE 2
SMF line 3

...and will not find it.

This second scenario exists in all 2.0.16 mod conflicts that I have seen.  What is heartbreaking about this one is that there is no code conflict at all.  It's just that the mod install package was too "grabby"...

The solution for the mod author requires tweaking the install package to replace:
SMF line 3

With:
MOD CODE LINE 1
MOD CODE LINE 2
SMF line 3

Then it won't care about changes on SMF line 2.  Mod authors simply need to be more narrow with their search/replace pairs.  In this example, you were tricked into thinking there was no conflict because the SMF patch installed clean, but the conflict revealed itself on uninstall.

LandyVlad

#17
Thanks for your help mate, esp that first post after my question.

The way the mods install etc is very clumsy and I presume that increased use of hooks will get around this? Perhaps?
As for what order I've installed mods in. what with updates and all - I haven't a clue !

Also given that I am currently running 2.0.17 can I delete the previous upgrade packages, and if so should I uninstall them first or just leave alone and simply delete from package manager without uninstalling?

I'm using only the responsive curve mod/theme no other theme.  Never had any dramas with that.

Lastly - what's the easiest way of duplicating a forum including databases etc but with new database names so there's no confusion between old and new forums.

And what's the best normal backup process?
Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

lurkalot

Quote from: LandyVlad on Feb 08, 2021, 10:31 PMThe way the mods install etc is very clumsy and I presume that increased use of hooks will get around this? Perhaps?
As for what order I've installed mods in. what with updates and all - I haven't a clue !

This is why I asked Arantor to reinstate this mod, it will show you when and what order it was installed.  https://custom.simplemachines.org/mods/index.php?mod=2323

LandyVlad

I have that mod but didn't think it was always accurate. (check out 25 and 26 for some weirdness as an example)

I tried to sort by the date column and it craps out of SMF entirely.

Unsorted the info is thus:

Modification Packages
Mod Name    Version   Date   
1.   @mention members   1.1.2    Friday, 17 February 2017, 10:20 pm
2.   Automatic Attachment Rotation (and Resize)   5.5    Thursday, 06 September 2018, 11:44 pm
3.   Birthday Posts   0.13 Beta    Friday, 14 June 2019, 07:27 pm
4.   Bot Buster   1.1    Wednesday, 19 December 2018, 10:02 am
5.   Copyright and Footer Links   3.2    Thursday, 01 June 2017, 10:50 pm 
6.   Country Flags   3.0    Saturday, 08 April 2017, 03:07 pm
7.   Downloads System   3.0.2    Saturday, 20 January 2018, 05:07 pm
8.   Google Member Map   3.0.4    Saturday, 20 January 2018, 04:57 pm
9.   Hall Of Fame   1.2    Thursday, 04 April 2019, 10:05 am
10.   httpBL   2.5.1    Wednesday, 22 March 2017, 08:26 am
11.   Image Processing Memory Limit   0.1.2    Friday, 10 February 2017, 08:51 am
12.   Like Posts   2.0.5    Thursday, 26 January 2017, 10:51 pm
13.   Responsive Curve   1.0.0    Wednesday, 22 March 2017, 08:28 am
14.   Show JDALLAUI in Post and PM   1.4    Tuesday, 23 January 2018, 09:12 am
15.   SMF 2.0.16 Update   1.0    Sunday, 05 January 2020, 01:58 am
16.   SMF 2.0.17 Update   1.0    Sunday, 05 January 2020, 04:22 pm
17.   SMF 2.0.18 Update   0.1.0   N/A  (I haven't installed this yet)
18.   SMF Gallery Pro   8.0    Sunday, 18 February 2018, 10:43 pm
19.   SMF Gallery Pro SSI   3.0    Wednesday, 29 March 2017, 07:42 a
20.   SMF Links   3.0.6    Saturday, 20 January 2018, 05:02 pm
21.   SMF Post Prefix   2.0.3    Wednesday, 01 February 2017, 09:28 pm
22.   Sortable Packages (and Installed Time)   1.3.5    Thursday, 26 January 2017, 09:47 pm
23.   Stop Spammer   2.3.9    Wednesday, 24 January 2018, 09:40 pm
24.   TinyPortal   1.5.1    Thursday, 06 September 2018, 11:52 pm
25.   Topics Created And Participated In   2.11    Monday, 21 December 2020, 11:30 am
26.   Topics Created And Participated In   2.9    Monday, 21 December 2020, 11:30 am
27.   Yet Another YouTube BBCode Tag   4.12    Thursday, 06 September 2018, 11:57 pm

Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

lurkalot

Quote from: LandyVlad on Feb 10, 2021, 01:10 AMI have that mod but didn't think it was always accurate. (check out 25 and 26 for some weirdness as an example)

I've never had a issue with it.  Regarding 25 and 26, you can see they are different versions of the mod (2.9)-( 2.11), so maybe you upgraded over the top without uninstalling the old one.

What I do when using this mod for this purpose, is look at the list, grab a screenshot of it and keep that on my desktop for reference while I'm uninstalling stuff. 

LandyVlad

Makes sense. :)

I wonder if it only tracks from the date it is installed or if it can figure out the dates of mods installed before itself?
Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.

lurkalot

Yes, it can figure out the dates of mods installed prior.

shawnb61

#23
Quote from: LandyVlad on Feb 08, 2021, 10:31 PMThe way the mods install etc is very clumsy and I presume that increased use of hooks will get around this? Perhaps?
Powerful & flexible & definitely turns into a problem if you install a lot of mods.  They eventually start to step on each other.

Yes, hooks prevent the need for search/replaces.

Quote from: LandyVlad on Feb 08, 2021, 10:31 PMAs for what order I've installed mods in. what with updates and all - I haven't a clue !
Your admin log can tell you that.  Sometimes you find clues in the changes.

Quote from: LandyVlad on Feb 08, 2021, 10:31 PMAlso given that I am currently running 2.0.17 can I delete the previous upgrade packages, and if so should I uninstall them first or just leave alone and simply delete from package manager without uninstalling?
For mods: If you're confident the mods are current, just leave them there. After refreshing the code & removing hooks, they'll still be there & the 'install' links will be active so you can install them again.  You can do any package deletes or new version uploads needed in the package manager.

For SMF packages: Delete what you don't need.  Since you are refreshing the code to 2.0.18, you don't need them.  No uninstalls needed - you short circuited that process by overwriting the code.

Quote from: LandyVlad on Feb 08, 2021, 10:31 PMLastly - what's the easiest way of duplicating a forum including databases etc but with new database names so there's no confusion between old and new forums.
That's a pretty big topic...  At its core, it's pretty simple: Copy the files to a new location, restore the DB in a new, separate DB, then run repair_settings.php in the new location & change to the new DB credentials, and then change to the new file locations. 

The wiki topic for moving forums applies - it is pretty much the same steps:
https://wiki.simplemachines.org/smf/Hosting_-_How_do_I_move_my_SMF_forum_to_a_different_host

Quote from: LandyVlad on Feb 08, 2021, 10:31 PMAnd what's the best normal backup process?
I have a shell script that I run regularly as a cron.  It does separate file & DB backups, then FTPs them to a separate site.

It looks something like this:
#!/bin/sh
#
# User configuration
HOMEDIR=/blah/blah/public_html/blah
CRONDIR=/blah/blah/cronjobs
FSBU=blah_fsbu.tar
DBBU=blah_dbbu.sql
LOGFILE=$CRONDIR/blah-backup.log
FTPHOST=ftp.yadayada.com
FTPUSER=yada@yadayada.com
FTPPW=guessme
FTPDIR=/backups
DB=blahblah
DBUSER=yadayada
DBPW=yada1
#
# Clear old log
rm $LOGFILE
#
# all output to logfile
exec &> $LOGFILE
#
# head over to target dir to capture all output in one place
cd $CRONDIR
#
# db backup
mysqldump -u$DBUSER -p$DBPW --hex-blob $DB > $DBBU
#
# file system backup
tar -cvf $FSBU $HOMEDIR
#
# ftp to other site for storage
ftp -n $FTPHOST <<END_SCRIPT
quote USER $FTPUSER
quote PASS $FTPPW
binary
cd $FTPDIR
put $FSBU
put $DBBU
quit
END_SCRIPT
#
# delete the files
rm $FSBU
rm $DBBU
#

LandyVlad

Please do not PM me with questions on astrophysics or theology.  You will get better and faster responses by asking homeless people in the street. Thank you.