test
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • tfosnom Friend
    #176945

    Following 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
    Shannon

    HeR0 Friend
    #452706

    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

    tfosnom Friend
    #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 here

    In 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
    Shannon

    HeR0 Friend
    #452756

    Hi 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 Friend
    #452762

    If 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 Friend
    #452890

    Any further action on this one?

    HeR0 Friend
    #452896

    Hi
    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,

    tfosnom Friend
    #452975

    Many thanks for all your help, Hung
    Shannon

Viewing 8 posts - 1 through 8 (of 8 total)

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