News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

2.1.4 SQL Upgrade 500 Error

Started by PsuFan, February 23, 2024, 10:21:27 AM

Previous topic - Next topic

PsuFan

Figured while I was here and getting tons of replies I would post my upgrade issue. You should probably be checking mysqli_results for return bools btw. That was the ultimate error. I was upgrading from like 2.0.14ish if thats even a version to 2.1.4. Are you guys changing your charset on your mysqli session? I was able to execute the queries in phpmyadmin but the script was generating charset mismatch on equals compare. Something like utf8 does not match whatever. It was dying on the front end at "Add Attachments index" but I had to comment out all of the #3684 "Fix mods columns" queries. All of my columns appeared to already be nulled so it wasn't doing anything anyway... The exact error must have started coming back in the ajax because I don't see it in the log, just a bunch of useless eval'd (love the todo  8)) Also the gui was waiting 30 seconds even though it had an immediate 500...

$request = upgrade_query("
        SELECT COLUMN_NAME, COLUMN_TYPE
        FROM INFORMATION_SCHEMA.COLUMNS
        WHERE TABLE_SCHEMA = '" . $db_name . "' AND  TABLE_NAME = '" . $db_prefix . "members' AND
            COLUMN_DEFAULT IS NULL AND COLUMN_KEY <> 'PRI' AND IS_NULLABLE = 'NO' AND
            COLUMN_NAME NOT IN ('buddy_list', 'signature', 'ignore_boards')
    ");

Kindred

Smf upgrade to 2.1.x DOES update the collation of the database and columns to utf8
Сл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."

PsuFan

I don't understand why I was able to execute the same thing. Its a compare on information_schema, obviously not something SMF is changing. COLUMN_NAME is set to utf8_tolower_ci if that is not normal. Its shared hosting.

PsuFan

Also why tf was username removed from ssi $context... (and the function that updates where the user is browsing)

Kindred

I think there is something wrong with your copy, because nothing that you just said seems to match what my upgrade or installation did...
Сл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

Quote from: PsuFan on February 23, 2024, 10:35:29 AMAlso why tf was username removed from ssi $context... (and the function that updates where the user is browsing)

$context['user'] is available as normal in SSI 2.1.4, though likely the issue is that your page loading it doesn't get the correct cookies because CORS is applied now it's not 2011.

SSI has never updated the user's browse state because SSI is not inside the forum therefore the "last place they were online" has no logical context nor can the location be reversed engineered by the Who's Online code anyway.

PsuFan

@Kindred I took those lines directly from the large upgrade download. They are definitely in the sql files.

@Arantor I was using $context['user']['username'] which was removed. 'name' is available but its the profile changeable one.

Kindred

... and yet, no one else has had that problem with the 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

It was rejigged for a variety of reasons but you can safely get it from where $context['user']['name'] itself got it from, $user_info['username'].

PsuFan

Oh I wasn't aware of that variable, thanks.

Advertisement: