News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Undefined array key "charset_detected" - upgrading from 1.1.21 to 2.1.4

Started by retroturk, January 02, 2024, 02:16:00 AM

Previous topic - Next topic

retroturk

I finally decided to upgrade the forum, which was live in SMF 1.1.21, to 2.1.4. For now, I'm doing the conversion locally and actually there was no problem until the 6th step, which is the conversion to UTF-8. But at this point I encountered a problem but I couldn't find the solution...

QuoteWarning
: Undefined array key "charset_detected" in
D:\xampp\htdocs\forum\upgrade.php
on line
3143

When I look at the database, I see that the tables are latin5_turkish_ci. Is latin5_turkish_ci causing problems during conversion? I don't know how to solve it...

Does anyone have any ideas to help with this? thanks.
ps.Actually when i tested the upgraded forum, there is not any problem..

Error line in Upgrade.php  (line 3143)
// Default to ISO-8859-1 unless we detected another supported charset
$upcontext['charset_detected'] = (isset($lang_charsets[$language]) && isset($charsets[strtr(strtolower($upcontext['charset_detected']), array('utf' => 'UTF', 'iso' => 'ISO'))])) ? $lang_charsets[$language] : 'ISO-8859-1';

$upcontext['charset_list'] = array_keys($charsets);
[/quote]

Doug Heffernan

Can you start over but set the default language to english this time and see how it will?

Kindred

oof......    @Doug Heffernan -- the forum language is not the problem....

The collation of the database being in Turkish --  I think that may be a problem.  Honestly, I am surprised that SMF 1.x worked with that collation.

@Sesquipedalian maybe you can make a suggestion on how the user can convert to utf8mb3_general_ci, since I am reasonably sure that the automated process won't work in this case.

Сл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

Latin5 is ISO-8859-5, as in "if you install Turkish not in UTF-8 mode this is what it will install as".

Kindred

@Arantor  OH!   Ok...   well, that's interesting (and I didn't know that)

IN that case -- @retroturk try what Doug suggested...   set the forum default language to English before upgrading.

Сл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."

retroturk

thanks a lot @Kindred and @Doug Heffernan .

I set the  forum default language to English and upgrade.php completed upgrade tasks...

but, some of the Turkish letters (characters) look wrong.


Tanışma - Tanýþma
Diğer   - Diðer
etc.

Steve

You have the latest Turkish language pack and switched the forum back to Turkish, correct?
DO NOT pm me for support!

Doug Heffernan

Additionally have a look at th ebelow wiki and make sure that your forum has been converted and configured properly to UTF-8. (It says that's is for Smf 2.0.x but it is valid for Smf 2.1.x as well)

https://wiki.simplemachines.org/smf/UTF-8_Readme


Advertisement: