Logout redirect to server root - no change possible

18.12.2015 16:02
#1
daswirdwas
Joomshopping forum user no avatar
Name: Brix
16.11.2012
Posts: 15
Quote
Logout redirect to server root - no change possible

Hello,
I have some trouble with the joomshopping Login module. After fixing the problem with redirection to home after login regarding the forum topic I already have a LOGOUT problem - after logout the system redirect to server root directory but my page is located within a subdirectory (Error: Forbidden You don't have permission to access / on this server.). No effect if i change the redirect path within the login module. No such behavior if i use the Joomla login module.

Any idea what's going wrong there

thx
Andreas


Joomla: 3.4.6
JoomShopping: 4.11.5
PHP: 5.6.16
MySQL: 5.6.25-73.0
Website Url: http://l3s4272.zeus04.de/CoS-TEST
 
19.12.2015 09:16
#2
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16513
Quote
Aw: Logout redirect to server root - no change possible

https://www.webdesigner-profi.de/joomla-webdesign/joomla-shop/forum/posts/1/10367.html?lang=en#3

 
22.12.2015 08:45
#3
daswirdwas
Joomshopping forum user no avatar
Name: Brix
16.11.2012
Posts: 15
Quote
Aw: Logout redirect to server root - no change possible

That was the post mentioned in my question - already done - login works correct now!

BUT

LogOUT will still wrongly redirect to server root - no change take effect at the joomshopping login Module settings!

Code (part regarding login/logout!?) of "userlogin.php" is now:

...

public function getRequestReturnUrl(){
if ($return = JRequest::getVar('return', '', 'method', 'base64')){
$return = base64_decode($return);

}
return $return;
}

public function setReturnUrl($url){
$this->return_url = $url;
}

public function getReturnUrl(){
return $this->return_url;
}

public function getUrlBackToLogin(){
$jshopConfig = JSFactory::getConfig();
$return = $this->getReturnUrl();
$back = SEFLink('index.php?option=com_jshopping&controller=user&task=login&return='.base64_encode($return), 0, 1, $jshopConfig->use_ssl);
return $back;
}

...

Is there an other file which controls the logout I had overseen?

thx


Letzte Ă„nderung: 22.12.2015 08:53
 
22.12.2015 11:31
#4
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16513
Quote
Aw: Logout redirect to server root - no change possible

components\com_users\controllers\user.php

public function logout()


if (!JUri::isInternal($return))
{
$return = '';
}

 
22.12.2015 11:45
#5
daswirdwas
Joomshopping forum user no avatar
Name: Brix
16.11.2012
Posts: 15
Quote
Aw: Logout redirect to server root - no change possible

The code within the mentioned joomla core file is already like you suggested...

public function logout()
{
JSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));

$app = JFactory::getApplication();

// Perform the log out.
$error = $app->logout();
$input = $app->input;
$method = $input->getMethod();

// Check if the log out succeeded.
if (!($error instanceof Exception))
{
// Get the return url from the request and validate that it is internal.
$return = $input->$method->get('return', '', 'BASE64');
$return = base64_decode($return);

if (!JUri::isInternal($return))
{
$return = '';
}


// Redirect the user.
$app->redirect(JRoute::_($return, false));
}
else
{
$app->redirect(JRoute::_('index.php?option=com_users&view=login', false));
}
}


or should the hole function replaced by only the suggested part?

 
22.12.2015 11:50
#6
webdesigner
(Support Team)
User webdesigner
Name: Admin
05.08.2010
Posts: 16513
Quote
Aw: Logout redirect to server root - no change possible

Try delete

if (!JUri::isInternal($return))
{
$return = '';
}

 
22.12.2015 15:13
#7
daswirdwas
Joomshopping forum user no avatar
Name: Brix
16.11.2012
Posts: 15
Quote
Aw: Logout redirect to server root - no change possible

Thank you

That was the hint that I had missed.

It works correct now!

 
Copyrights MAXXmarketing GmbH. All Rights Reserved