-
AuthorPosts
-
tfosnom Friend
tfosnom
- Join date:
- October 2010
- Posts:
- 742
- Downloads:
- 0
- Uploads:
- 31
- Thanks:
- 145
- Thanked:
- 200 times in 94 posts
May 11, 2012 at 12:42 pm #176945Following the events of this thread
http://www.joomlart.com/forums/topic/also-trying-ja-social-login-with-nex-using-supplied-mod-ja-login-need-help/I’m finding the revised ja login module just failed to work properly causing a 404 error on login and the registration module wouldn’t work either. Replacing this with BT login from bow themes which uses the default login to work, I get the login ok but when exiting no matter what I set the redirect to (default, Home) it fails with a 505 error.
It seems it and all other login modules add ?itemid1 to the root site url on exit as this id doesn’t exist in my NEX ( qs installation with front page as Articles ยป Featured Articles ID = 435
You can see my problem, I cannot change the Home menu ID to 1
Help
ShannonHeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 12, 2012 at 4:09 am #452706Hi,
I checked your site and logged in using the details provided but i did not see any problem. Can you send me screenshots indicating the error, will be able to help then.
Regards
tfosnom Friendtfosnom
- Join date:
- October 2010
- Posts:
- 742
- Downloads:
- 0
- Uploads:
- 31
- Thanks:
- 145
- Thanked:
- 200 times in 94 posts
May 12, 2012 at 9:44 am #452752<em>@Hung Phung 319264 wrote:</em><blockquote>Hi,
I checked your site and logged in using the details provided but i did not see any problem. Can you send me screenshots indicating the error, will be able to help then.
Regards</blockquote>
Hi Hung
I really appreciate your patience with this one. The problem Hung is NOT with being able to login, that works fine as you have experienced, the problem lies with the LOGOUT process. When you log out it fails to return you to the home page. instead it adds
?itemid1 to the home url which generates a error 500 message as that itemid=1 does not exist.To demonstrate what happens I have recorded the login/logout process in an effort to ensure we are clear on the problem
please view online hereIn the module backend I have selected the default option for redirect on logout and have also tested using the menu Home selection, neither of which work as expected.
Thank you in advance
ShannonHeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 12, 2012 at 10:41 am #452756Hi Tfosnom
Please edit file modules/mod_bt_login/helpe.php, change function getReturnURL to[PHP]static function getReturnURL($params, $type)
{
$app = JFactory::getApplication();
$router = $app->getRouter();
$url = null;
if ($itemid = $params->get($type))
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);$query->select($db->quoteName(‘link’));
$query->from($db->quoteName(‘#__menu’));
$query->where($db->quoteName(‘published’) . ‘=1’);
$query->where($db->quoteName(‘id’) . ‘=’ . $db->quote($itemid));$db->setQuery($query);
if ($link = $db->loadResult()) {
if ($router->getMode() == JROUTER_MODE_SEF) {
$url = ‘index.php?Itemid=’.$itemid;
}
else {
$url = $link.’&Itemid=’.$itemid;
}
}
}
if (!$url)
{
// stay on the same page
$uri = clone JFactory::getURI();
$vars = $router->parse($uri);
unset($vars[‘lang’]);
if ($router->getMode() == JROUTER_MODE_SEF)
{
if (isset($vars[‘Itemid’]))
{
$itemid = $vars[‘Itemid’];
$menu = $app->getMenu();
$item = $menu->getItem($itemid);
unset($vars[‘Itemid’]);
if (isset($item) && $vars == $item->query) {
$url = ‘index.php?Itemid=’.$itemid;
}
else {
$url = ‘index.php?’.JURI::buildQuery($vars).’&Itemid=’.$itemid;
}
}
else
{
$url = ‘index.php?’.JURI::buildQuery($vars);
}
}
else
{
$url = ‘index.php?’.JURI::buildQuery($vars);
}
}return base64_encode($url);
}[/PHP]Hope this will help you.
Regards,
tfosnom Friendtfosnom
- Join date:
- October 2010
- Posts:
- 742
- Downloads:
- 0
- Uploads:
- 31
- Thanks:
- 145
- Thanked:
- 200 times in 94 posts
May 12, 2012 at 12:28 pm #452762If I make the change as requested the site will not load if I restore the original helper file it loads the site O.K.
That is: I’m replacing the existing code from red highlighted code down with your code leaving all existing code after that alone?
<blockquote>
class modbt_loginHelper
{
function getReturnURL($params, $type)
{
if($itemid = $params->get($type))
{
$menu =& JSite::getMenu();
$item = $menu->getItem($itemid); //var_dump($menu);die;
if ($item)
{
$url = JRoute::_($item->link.’&Itemid=’.$itemid, false);
}
else
{
// stay on the same page
$uri = JFactory::getURI();
$url = $uri->toString(array(‘path’, ‘query’, ‘fragment’));
}
}
else
{
// stay on the same page
$uri = JFactory::getURI();
$url = $uri->toString(array(‘path’, ‘query’, ‘fragment’));
}
return base64_encode($url);
}
</blockquote>Any hints ๐
Shannon
tfosnom Friendtfosnom
- Join date:
- October 2010
- Posts:
- 742
- Downloads:
- 0
- Uploads:
- 31
- Thanks:
- 145
- Thanked:
- 200 times in 94 posts
May 14, 2012 at 4:05 am #452890Any further action on this one?
HeR0 FriendHeR0
- Join date:
- August 2011
- Posts:
- 3626
- Downloads:
- 0
- Uploads:
- 61
- Thanks:
- 33
- Thanked:
- 588 times in 549 posts
May 14, 2012 at 4:54 am #452896Hi
Please change as i have replied earlier. Your system have issues when log out because you use jomsocialredirect plugin that has conflict with Joomla user.
I just disabled it and all works well. Could you like disable it?Regards,
1 user says Thank You to HeR0 for this useful post
-
AuthorPosts
This topic contains 8 replies, has 2 voices, and was last updated by tfosnom 12 years, 7 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum