No Code Attached Yet
avatar cappuccinonet
cappuccinonet
17 Aug 2022

after upgrading to Joomla 4.2 in a client's project we do get the following error message while using the frontend login form:

Argument 1 passed to Joomla\Component\Users\Site\Model\LoginModel::getMenuLanguage() must be of the type int, string given, called in <ROOT>/components/com_users/src/Controller/UserController.php on line 54
avatar cappuccinonet cappuccinonet - open - 17 Aug 2022
avatar cappuccinonet cappuccinonet - change - 17 Aug 2022
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 17 Aug 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 17 Aug 2022
avatar nikosdion
nikosdion - comment - 17 Aug 2022

That line should've read

$language = $this->getModel('Login', 'Site')->getMenuLanguage((int) $data['return']);
avatar roland-d
roland-d - comment - 17 Aug 2022

@cappuccinonet If you could test PR #38504 please, this fixes the issue.

Closing as we have PR

avatar roland-d roland-d - change - 17 Aug 2022
Status New Closed
Closed_Date 0000-00-00 00:00:00 2022-08-17 13:04:24
Closed_By roland-d
avatar roland-d roland-d - close - 17 Aug 2022
avatar thorralf
thorralf - comment - 29 Aug 2022

Hello Roland,
Please forgive me if I am a complete beginner. After upsdating to 4.2.1 I cannot login anymore.
I reall tried to change line 54 to the given code:
$language = $this->getModel('Login', 'Site')->getMenuLanguage((int) $data['return']); but this just produces a new error:
" Joomla\Component\Users\Site\Model\LoginModel::getMenuLanguage(): Return value must be of type string, null returned "

What can I do next. Thank you for your help!

avatar roland-d
roland-d - comment - 31 Aug 2022

@thorralf If you update to Joomla 4.2.1, the issue should be resolved.

Add a Comment

Login with GitHub to post a comment