2..0.18 upgrade errors - help?

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

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

LandyVlad

Trying to upgrade from 2.0.17 to 2.0.18.

The download files and install thing was available but when I went to do the actual install itself I got a number of errors:

I haven't had errors doing a forum upgrade previously, and I haven;t added any mods since the .16 to .17 upgrade.

The errors I am getting are:


Installations actions for "SMF 2.0.18 Update"
Installing this package will perform the following actions:
Type   Action   Description
*   13.   Execute Modification   ./Sources/ManageAttachments.php   Test failed
*   33.   Execute Modification   ./Sources/Profile-Modify.php   Test failed
*   43.   Execute Modification   ./Sources/Subs-Graphics.php   Test failed

I'm wondering if anyone can give me some advice as to where to start in getting this resolved?

Thanks
I reject your reality, and substitute my own.

Skhilled

Feb 02, 2021, 02:18 PM #1 Last Edit: Feb 02, 2021, 02:20 PM by Skhilled
You didn't post exactly what the code was that is involved with those errors. But, off-hand I'd say it's due to mods. May be best to uninstall them first, upload the new smf 2.0.18 upgrade files, run upgrade.php and then reinstall the mods ONLY if they are compatible with it.

LandyVlad

As in uninstall all mods and then upgrade and then reinstall?

An issue I'd experience there is that I get errors when attempting to remove quite a few of the mods. :(
I reject your reality, and substitute my own.

Skhilled

Yes and no worries. 8)

When you upload all of the files from the smf upgrade pack it will give you all new smf files...as if you don't have any mods installed. The good thing is that it will not uninstall the hooks from the previous mods. So, when you reinstall them you will not lose any of your previous mod's settings or info. ;)

Ronald

Shortly after the release of 2.0.18 there were numerous support postings about errors when attempting to update using the patch.

I also have about 8 errors, mine are different, mine are in register.php and subs-editor.php

Skhilled

When you say using the patch, do you mean using the upgrade in the admin? Or do you mean using the large upgrade patch found here?

https://download.simplemachines.org/

If using the admin patch there has always been issues with that for MANY years but the team refuses to acknowledge them. It is always best to use the large upgrade package...unless there's a problem with that.

Ronald

Quote from: Skhilled on Feb 04, 2021, 03:31 PMWhen you say using the patch, do you mean using the upgrade in the admin? Or do you mean using the large upgrade patch found here?

https://download.simplemachines.org/

If using the admin patch there has always been issues with that for MANY years but the team refuses to acknowledge them. It is always best to use the large upgrade package...unless there's a problem with that.

Yes after we finished doing the Beta Testing, they decided to release 2.0.18. Yes the patch is what I am referring to. Yes there also is a large upgrade available also.. This patch is a huge piece of updating.

I had a beta test board, the patch worked great, I also did my smf arcade site, used the patch and no problems at all, went right in.

Then I decided to use the patch on the senior forum, ooooopsss lots of errors, so I went to smf support reported it and we tried to figure it out, then all others started to post there errors when updating with the patch..

Haven't done anything as yet, probably remove all the mod.'s first then try. But again a lot of the mod.'s are outdated, and probably will not go back in..

Skhilled

Yes, that's the problem. They either refuse to fix the problem or don't know how...or, they need to tell mod dev's how to make it work with it. The problem is with the mods and the coding, I believe. Forums that don't have mods or have mods that behave nicely work just fine. But those that interact with the database and, particularly the version of SMf and the db, have problems.

SMF has always said, "There's no db changes so there's no need to fix anything." But if there's a problem, then fix the damn thing (if possible) and cut back on support if anything else...

I've always believed the problem is with the db version numbers. The mods specifically look for a version and if they don't find it you'll see a error. Please keep in mind I'm no real coder but that's what I've found to be the problem over the MANY years this has been happening. I've helped countless people fix this problem but telling them to never use the admin patch unless you have no mods. If you have mods then you must uninstall the mods first (doesn't matter if there are errors) then upload the large upgrade SMF package and run upgrade.php. Then install your mods, IF they are compatible with the new version.

Ronald

Quote from: Ronald on Feb 04, 2021, 04:09 PMYes after we finished doing the Beta Testing, they decided to release 2.0.18. Yes the patch is what I am referring to. Yes there also is a large upgrade available also.. This patch is a huge piece of updating.

I had a beta test board, the patch worked great, I also did my smf arcade site, used the patch and no problems at all, went right in.

Then I decided to use the patch on the senior forum, ooooopsss lots of errors, so I went to smf support reported it and we tried to figure it out, then all others started to post there errors when updating with the patch..

Haven't done anything as yet, probably remove all the mod.'s first then try. But again a lot of the mod.'s are outdated, and probably will not go back in..

I agree, but again I know nothing about coding, but I do say the guy's doing that work, do, do a excellent job..

Now a question for you: Have to made an attempt to update your forum yet? Try the patch first see what you get..

shawnb61

Yes, all the conflicts are with out of date mods.

I have two live forums, one with 19 mods, one with about 12.  The patch installed without errors on both.

Your odds are much better if you keep your mods current.  About once or twice a year, I check mod versions and upgrade mods where needed.  I usually have to do a few.

About 5 of the mods we use won't install clean as of 2.0.16.  These were all discussed on the mod boards. They are still outstanding issues.

Not much we can do other than post in the mod boards when there are mod conflicts...

Loading fresh source and reinstalling mods works if you get tangled up. I had to do that once. 

I never edit source code directly for my forums anymore.  Ever.  I build little patches for every tweak.  Much easier to maintain.  Before installing 2.0.18, I deinstalled several little 2.0.16 bug patches (eg, for the utf8 fix)...  And 2.0.18 then went right in. 

Same is true for those mods with 2.0.16 conflicts.  I fixed the packages.  I shouldn't have to do that, though - the mod authors need to do that.

Ronald

Quote from: shawnb61 on Feb 04, 2021, 07:44 PMSame is true for those mods with 2.0.16 conflicts.  I fixed the packages.  I shouldn't have to do that, though - the mod authors need to do that.

Yea good luck with this happening. Some modder's do there work, then abandon the mod, or leave smf..some are taking to long to update them..It's a darn shame the way this is..Why make a mod if you do not intend to keep it in date.

Ronald

Sorry LandyVlad for "hi jacking" your posting.  :chrs

shawnb61

Quote from: LandyVlad on Feb 02, 2021, 11:27 PMAs in uninstall all mods and then upgrade and then reinstall?

An issue I'd experience there is that I get errors when attempting to remove quite a few of the mods. :(

Note you don't have to actually uninstall all & run the upgrader.  The steps would be:
 - Refresh the source via the upgrade package.  Now your source is all vanilla.  If you have the upgrade*.* files in your forum root, just delete them (your forum didn't need an upgrade, just fresh source).
 - Remove any hooks via repair_settings.php. Now you have no trace of old mods anywhere.
 - Re-install your mods.

If any mods don't install clean then post on the mod forum. Folks are helping there, and the mod authors really need to know the extent of the problem.

If the mod author appears to be uninterested, I'd consider abandoning it.  Otherwise, you will be stuck doing some coding on your own every time a patch comes out...

LandyVlad

Ta Shawn

Will taking that action as described delete all the settings for the mods? As I really want to keep those (for example, threads which have a thread prefix using that mod, I want to keep the prefixes there, etc)

Also when you say install mods do you mean that I'd also have to install the previous interim upgrade packages?

At the moment I have the installed interim packages showing in my package manager from 2.0.12 onwards.
I reject your reality, and substitute my own.

shawnb61

Feb 05, 2021, 06:21 AM #14 Last Edit: Feb 05, 2021, 06:25 AM by shawnb61
Quote from: LandyVlad on Feb 05, 2021, 05:52 AMWill taking that action as described delete all the settings for the mods? As I really want to keep those (for example, threads which have a thread prefix using that mod, I want to keep the prefixes there, etc)
Nope.  You are overwriting the source code only, not the DB where settings are stored.

If you are jumping several versions on a mod, & there are mod-related DB changes, you will need to adapt accordingly... 

Quote from: LandyVlad on Feb 05, 2021, 05:52 AMAlso when you say install mods do you mean that I'd also have to install the previous interim upgrade packages?

At the moment I have the installed interim packages showing in my package manager from 2.0.12 onwards.
No, you lose all that & don't need it, because you're starting from the version in the upgrade package.  I.e., if starting from 2.0.18, you don't need to apply packages from 2.0.14->2.0.15, 2.0.15->2.0.16, etc., etc.  You start all over at 2.0.18.

If your theme installs didn't mess with core source code, you may not have to touch them at all.  I actually severely broke my personal forum experimenting with early 2.0.18 packages and had to do this today bringing it up to 2.0.18 from the upgrade package...  I didn't have to touch my theme at all, which I find surprising.  (It's 99% hidden, mainly for sharing jams with friends - but feel free to download the covid data I update periodically: https://shawnbulen.com).

There's a writeup on the SMF wiki:
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files

I strongly recommend BACKUPS, BACKUPS, BACKUPS first...

If you can test drive it on a test forum do so a few times until you're comfortable.

shawnb61

Feb 05, 2021, 07:25 AM #15 Last Edit: Feb 05, 2021, 07:26 AM by shawnb61
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

Feb 05, 2021, 09:24 PM #16 Last Edit: Feb 05, 2021, 09:55 PM by shawnb61
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

Feb 09, 2021, 03:31 AM #17 Last Edit: Feb 09, 2021, 03:36 AM by LandyVlad
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?
I reject your reality, and substitute my own.

lurkalot

Quote from: LandyVlad on Feb 09, 2021, 03:31 AMThe 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

I reject your reality, and substitute my own.

lurkalot

Quote from: LandyVlad on Feb 10, 2021, 06: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?
I reject your reality, and substitute my own.

lurkalot

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

shawnb61

Feb 10, 2021, 05:57 PM #23 Last Edit: Feb 10, 2021, 06:03 PM by shawnb61
Quote from: LandyVlad on Feb 09, 2021, 03:31 AMThe 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 09, 2021, 03:31 AMAs 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 09, 2021, 03:31 AMAlso 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 09, 2021, 03:31 AMLastly - 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 09, 2021, 03:31 AMAnd 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

I reject your reality, and substitute my own.