?
avatar alebak
alebak
30 Jan 2021

Steps to reproduce the issue

When I use a menu for logout:

  • Menu Title: Logout
  • Alias: logout
  • Menu Item Type: Logout
  • Link: index.php?option=com_users&view=login&layout=logout&task=user.menulogout

Joomla! does not logout

Expected result

Logout and redirect to Default page

Actual result

I have this output: 0 - Call to a member function get() on null

You may not be able to visit this page because of:

  1. an out-of-date bookmark/favourite
  2. a search engine that has an out-of-date listing for this site
  3. a mistyped address
  4. you have no access to this page
  5. The requested resource was not found.
  6. An error has occurred while processing your request.

Please try one of the following pages:
Home Page

If difficulties persist, please contact the System Administrator of this site and report the error below.

I get this notice from php-errors log:

PHP Notice: Trying to get property 'params' of non-object components/com_users/controllers/user.php on line 235

$itemid = $app->getMenu()->getActive()->params->get('logout');

System information (as much as possible)

PHP Built On: Windows NT SIRIUS 10.0 build 19042 (Windows 10) AMD64
Database Type: mysql
Database Version: 5.7.24
Database Collation: utf8_general_ci
Database Connection Collation: utf8mb4_general_ci
PHP Version: 7.4.4
Web Server: Apache/2.4.35 (Win64) OpenSSL/1.1.1d PHP/7.4.4
WebServer to PHP Interface: apache2handler
Joomla! Version: Joomla! 3.9.24 Stable [ Amani ] 12-January-2021 15:00 GMT
Joomla! Platform Version: Joomla Platform 13.1.0 Stable [ Curiosity ] 24-Apr-2013 00:00 GMT
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36

Additional comments

When I type in the address bar of the browser:

https://joomla.test/index.php/logout

It works! But clicking on the logout menu does not.

avatar alebak alebak - open - 30 Jan 2021
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2021
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 30 Jan 2021
avatar HLeithner
HLeithner - comment - 30 Jan 2021

Can you Plesse activate debugging in the global configuration and post the stacktrace. Thx

avatar alebak alebak - change - 30 Jan 2021
The description was changed
avatar alebak alebak - edited - 30 Jan 2021
avatar alebak
alebak - comment - 30 Jan 2021

Hello @HLeithner,

Thanks for answer!

Here is the stacktrace:

Call stack
--
# | Function | Location
1 | () | JROOT\components\com_users\controllers\user.php:235
2 | UsersControllerUser->menulogout() | JROOT\libraries\src\MVC\Controller\BaseController.php:710
3 | Joomla\CMS\MVC\Controller\BaseController->execute() | JROOT\components\com_users\users.php:15
4 | require_once() | JROOT\libraries\src\Component\ComponentHelper.php:402
5 | Joomla\CMS\Component\ComponentHelper::executeComponent() | JROOT\libraries\src\Component\ComponentHelper.php:377
6 | Joomla\CMS\Component\ComponentHelper::renderComponent() | JROOT\libraries\src\Application\SiteApplication.php:194
7 | Joomla\CMS\Application\SiteApplication->dispatch() | JROOT\libraries\src\Application\SiteApplication.php:233
8 | Joomla\CMS\Application\SiteApplication->doExecute() | JROOT\libraries\src\Application\CMSApplication.php:196
9 | Joomla\CMS\Application\CMSApplication->execute() | JROOT\index.php:49
avatar joomdonation
joomdonation - comment - 31 Jan 2021

See PR #32215

avatar alikon alikon - change - 31 Jan 2021
Status New Closed
Closed_Date 0000-00-00 00:00:00 2021-01-31 08:49:42
Closed_By alikon
avatar alikon alikon - close - 31 Jan 2021
avatar alikon
alikon - comment - 31 Jan 2021

please test #32215

avatar alebak
alebak - comment - 31 Jan 2021

It works! ??

avatar gostn
gostn - comment - 1 Feb 2021

@alebak please mark your successfully test at https://issues.joomla.org/tracker/joomla-cms/32215.

Add a Comment

Login with GitHub to post a comment