Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2339

[3.3.x] Support Forum • Registration page language selection is empty on a single-language board

$
0
0
I have only one language pack installed (British English), and the default language is also set to en in the ACP.
However, on the registration page, the language selection dropdown is empty.
I believe the issue is caused by the following code in ucp_register.php:

Code:

// Checking amount of available languages$sql = 'SELECT lang_iso, lang_local_nameFROM ' . LANG_TABLE . 'ORDER BY lang_english_name';$result = $db->sql_query($sql);$lang_row = (array) $db->sql_fetchrowset($result);$db->sql_freeresult($result);
Since I have only one language installed, count($lang_row) returns 1.
Later in the template variables:

Code:

$template_vars = array(...'S_LANG_OPTIONS'=> (count($lang_row) > 1) ? language_select($data['lang'], $lang_row) : '', // Here is the issue I suppose
Because count($lang_row) is 1, the S_LANG_OPTIONS variable is set to an empty string, which likely removes the dropdown from the registration page.

Is this the intended behavior? If not, what would be the best way to ensure the default language is selected properly even when there's only one language installed?

Thanks!

Statistics: Posted by smanst3r — Thu Mar 06, 2025 3:25 pm



Viewing all articles
Browse latest Browse all 2339

Trending Articles