1

I have set up a menu Item Users-> Login Form. There I set the "Menu Item Login Redirect" to Home. However the site redirects me to "/shop-pages-2/register-2/profile". My homepage does not have a shop (jet).

Where does this "/shop-pages-2/register-2/profile" overwrite my "home" setting. The page with the Login form is the right Menu item. I tested this with adding pre- and post text to the Login form using the same Menu item where I set "Menu Item Login Redirect".

(I am using Joomla 3.7.5 and the Porto Template.)

EDIT: I have updated to Joomla 3.8.1 and I still have the same issue

  • Please try updating to Joomla 3.8 and see if the issue still persists. – Lodder Oct 3 '17 at 14:17
  • Updating to 3.8 isn't an option right now because the whole admin view crashes within the update, it's an issue with SP page builder I'm also working on. – Julia Z Oct 3 '17 at 14:19
  • If you update SP Page Builder to the latest version aswell, you won't have the issue mentioned with the admin backend. I say this cause 3.8 had routing changes, so it may fix the issue. Else take a look at the .htaccess file to see if you can see any rewrite conditions for /shop-pages-2/register-2/profile – Lodder Oct 3 '17 at 14:31
  • Okay thank you. I'll update thua question after I updated sp pagebuilder and joomla – Julia Z Oct 3 '17 at 14:34
  • 3.8.1 has just been released and includes a "Redirect plugin not redirecting correctly" fix which might help. For details see: github.com/joomla/joomla-cms/pull/17997 – Neil Robertson Oct 4 '17 at 23:39
1

Let me explain first, how the redirect happen after login.

File: components/com_users/views/login/default_login.php

<?php $return = $this->form->getValue('return', '', $this->params->get('login_redirect_url', $this->params->get('login_redirect_menuitem'))); ?>

The page will redirect to:

  • Value of return parameter in the request; if empty then
  • Value you set in your menu item for login_redirect_url; if empty then
  • Value you set in your menu item for login_redirect_menuitem

So the final redirect depends on the same order of values above.

If none of the above values are available, the final return value will be your profile page (what is happening in your case). The code for this in:

file: components/com_users/controllers/user.php

// Set the return URL if empty.
if (empty($data['return']))
{
    $data['return'] = 'index.php?option=com_users&view=profile';
}

Please make a note that; the redirect url that you set in your menu item must be internal url or selecting the ID of the menu item. Internal urls starts with index.php.

Example index.php?option=com_mycomponent&view=myview

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.