[3.0] Miscellaneous fixes for the installer and upgrader#9162
Conversation
|
So... Test here next??? |
|
On this PR... Results are actually very good. Only a couple minor nits & questions. 2.1 => 3.0:
Install: Ran fine. Only minor nits...
General observations... These are both maybe just me & my system, not sure... Any thoughts would be welcome.
I think the performance is actually a 3.0 thing. I don't see that elsewhere. I think the self-signed cert is a me thing... I see that elsewhere. No matter what I've tried, if I try to force https, I get sslRedirect within the app. And the installer never detects the cert, e.g., the ssl box is grayed out. I hate putzing with certs... |
|
I'd be OK with this going in as-is. Only nits. |
|
I could dive deeper & try 2.0 upgrades if needed. Sound like a plan? |
Hm. That's not good.
Should be an easy fix.
I haven't noticed that in my tests, but I wasn't particularly looking for it either.
Yeah, that's probably just a you thing. Rather than a self-signed certificate, why not just use one from Let's Encrypt? |
Sounds like a great plan! Thanks, @sbulen. 😊 |
Most of my testing is on localhost. Once things progress, I do final testing on a hosted test environment. For a long time, no issues whatsoever, but browsers have been getting more picky over time. For years, a self-signed cert worked perfectly. Until it didn't... For a while there, I had to create my own CA for local use. Now, that is either unsupported, or, I'm doing it wrong... |
1e36b28 to
727233c
Compare
2ab8fe3 to
e9dbf3c
Compare
Yes, the table exists, & the prefix is specified in Settings.php. It's a simple 2.1 install. I suspect the problem here, though, is that somehow the prefix was lost... It's not "admin_info_files", it's "smf_admin_info_files". |
|
Ah, yes. That would likely explain it. I'll take a look when I have time later. |
Should be fixed in latest commits.
Should be fixed in latest commits. If not, things might get a lot harder. Ready for another round of testing, @sbulen. 🙂 |
|
Thanks, @sbulen. It's been a while since I have been able to look at this PR again. I appreciate both your help and your patience.
Should be fixed in latest commit.
For diagnostic purposes, please run it again using this modified version of ./Sources/Maintenance/Migration/v2_1/CreateAlerts/php:
For diagnostic purposes, please run it again using this modified version of ./Sources/Maintenance/Migration/v2_1/PostgreSqlSequences.php:
For diagnostic purposes, please run it again using this modified version of ./Sources/Maintenance/Migration/v2_1/CustomFieldsPart1.php: |
|
A clue, not sure how much it helps.... The generic 'Critical Error' errors appear to be on the calls to handleTimeout() within a step. More likely to happen when attempting a restart. Sometimes, it just seems to fall thru to exit... Trace follows... This logic is new to me, but it seems to be checking for json in $_GET, that isn't there? |
|
OK, did some more sleuthing, & have a couple of things to share...
I'm not quite sure what the fix is unless the upgrader can force a hard refresh to ensure new .js files are loaded. I think this is causing all of the CRITICAL errors w/o messages.
...is being rejected in MariaDB. I'm not sure why exactly yet... Maybe a default or a SQL_MODE issue set for the session. Works OK without the quotes, but I see the same behavior in MySQL. Something appears to be making them behave differently at runtime. |
|
That is all very helpful, @sbulen. Thanks! I'll see what I can do about them. |
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
a0301c7 to
7c2887e
Compare
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
7c2887e to
bae2aec
Compare
|
That was helpful, @sbulen, thanks. I think the latest commits have solved that issue. When a timeout occurred, we were sending an empty response, which the JavaScript interpreted as an error. Now we send an appropriate JSON response. |
BEFORE (Restored from a fresh 2.0 install without the utf8 box checked, matches install definition):
AFTER (After upgrade attempt - note it didn't get as far as utf8 conversion):
That default value looks sketchy - note it would be "0x30".... Which looks like we were aiming for "0x0"... Also note the InnoDB conversion was completed? I thought that came later.... |
Yup, I agree. Latest commit explicitly sets the default to null for all inet columns (except for smf_log_flood_control.ip, which cannot be null). I think that will resolve this problem. |
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
0f516cc to
d0e3ab1
Compare
|
Observation on the IP size issue: We can't just put the target 3.0 definition out there for the IPs... There's a whole conversion from ipv4 to ipv6 that needs to take place, that took place between 2.0 & 2.1. Until that takes place, the ipv4 definition needs to stand. (Which goes back to my old concern that some of these need to go stepwise thru SMF versions, like the old model...) Note the old 2.0 default is '0', which is where I suspect the 0x30 is ultimately coming from. The tables that look OK (log_errors) are empty. BUT... The definition looks good. Other random observation: log_online has this step, which the other records don't:
|
Signed-off-by: Jon Stovell <jonstovell@gmail.com>
That led me to go back and look again at the old upgrade_2-1_mysql.sql file. As it turns out, the approach taken there was to drop the column and then add it back again with an updated definition. I'm going to guess that this was done in order to avoid the same issue we've been facing here. Latest commit follows the same drop-and-add strategy. |
This was no longer used for anything in SMF 2.1, but the column was retained in the members table. Signed-off-by: Jon Stovell <jonstovell@gmail.com>
|
@sbulen, do you think you will have time to test this again in the next little while? I'd really like to put this one to bed. |
That makes absolutely no sense to me. That line hasn't changed since 2023, and it looks like this: $this->secure = $secure ?? !empty(Config::$modSettings['secureCookies']);It's wrapped in a call to At any rate, I find it hard to believe this has anything to do with the upgrader directly. EDIT: I think you must have had some mixed code in there. Line 208 in ./Sources/Cookie.php did change in 81b9abf, but that commit isn't part of this branch. It will need to be fixed, but it's not part of this PR.
Yes, please keep going. |
|
Update: I was trying to drill down on the composer error reported earlier, & I discovered that that error, plus the null error, were both from BEFORE the upgrade... What I think happened was that I had 2.1.7 forum up in the background while copying the 3.0 files over on top of the 2.1.7 code (mimicking an upgrade); I hadn't yet copied upgrade.php to root. Index.php was invoked in that mixed state. (I suspect either the ajax alert popup, or a brain fart on my part pulling up the tab too soon...) TL;DR, I reran both MariaDB & Postgresql this am, without 2.1.7 running in the background, and there were no null or composer errors. I updated the report above accordingly. |
|
Lovely! Thank you, @sbulen. I agree that it makes sense to merge now and deal with remaining problems separately. Please do report those remaining problems as their own issues. I really appreciate your faithful testing of all these changes, my friend! |






















Fixes a bunch of stuff that has come up while testing the installer and upgrader.
@sbulen, we can use this PR to do all our testing to get 2.1 → 3.0 and 2.0 -> 3.0 upgrades fully working, as well as deal with any issues in the installer. Then we'll go back to #9120 afterward.
Fixes #9160