I've chosen my dashboard as my home page, using the link on the Dashboard page.

It works fine if I click on the Drupal TM at the top of the screen - I go to the Dashboard.

But if I come to drupal.org and login, I am redirected to the Drupal home page, not to the Dashboard. It seems like I should end up at the Dashboard, since I've chosen that as my home page?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

lisarex’s picture

Project: » Drupal.org customizations
Version: » 6.x-3.x-dev
Component: Dashboard » Code

Moving this to the Drupalorg customizations project, as part of closing down the Redesign project.

mgifford’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue summary: View changes

This is still an issue in D7.

I'd have thought this would do it in all/modules/drupalorg/drupalorg/drupalorg.module

function drupalorg_init() {
  global $user, $conf;

  // Use the dashboard as the home page if the user selected it.
  if ($user->uid !== 0 && !empty($user->data['drupalorg_set_home']) && $_SERVER['REQUEST_URI'] === url('')) {
    drupal_goto('user/' . $user->uid . '/dashboard');
  }

but doesn't seem to.

mgifford’s picture

Issue tags: +dashboard
Shyamala’s picture

Shyamala’s picture

Should be based on the settings on the Dashboard page.
dashboard-as-homepage

mallezie’s picture

Assigned: Unassigned » mallezie

It seems the setting is correct. When you are logged in, and you access drupal.org/ it redirects to the dashboard.
It doesn't work when you just login.

When you login, using the login link, you get redirected to /home (which is the front page, but the if checks on url).
That's probably an easy fix.
When you login going directly to /user you get redirected to /u/dries (as dries).

Adding the first as extra condition could fix the first problem. The second one needs more thought.
I'll work further on this, and provide a patch.

mallezie’s picture

I think this exists out of 2 parts.
First part is to redirect to the dashboard on login. This is attached in the patch.
This redirects a user when logging in on drupal.org/user

I'll attach a second patch (probably this will be for drupalorg_crossite) to adjust the login link in the menu (this is now to /user?destination=home, i think this should be without the destination parameter). Since changing /home to the dashboard is probably a worse idea.

mallezie’s picture

Assigned: mallezie » Unassigned
Status: Active » Needs review
FileSize
819 bytes

And attached there is a patch for drupalorg_crossite which removes the destination parameter on the login-link for the home page.

Shyamala’s picture

The logo when logged in works perfectly. i.e based on your selection the logo links to either the drupal home page or dashboard. We only need to change the redirect on login from /home to drupal.org.

mallezie’s picture

The situation was that when you selected the dashboard to your homepage drupal.org/ brings you there. drupal.org/home still brings you to the frontpage (this is the expected behavior).

Patch 1 does the following (the drupalorg patch)

When you login via the /user page it redirects you to your dashboard (if that's set as your homepage)

Patch 2 does the following (drupalorg_crossite patch)

This changes the menu to remove the redirect to /home when you're on the homepage. That way when you login on the home page you'll get redirected to your dashboard instead of to /home

In reply to #9
The logo links you to drupal.org/ which is your dashboard, and the link in the menu links you to drupal.org/home (this is the current behavior). I'm not sure we should change te logo link to /home but that should probably be a follow-up issue

  • drumm committed 963a18f on 7.x-3.x authored by mallezie
    #965614 After login, should redirect to my dashboard
    
drumm’s picture

$account is not necessarily a fully-loaded user object, so I added

$account = user_load($account->uid);
drumm’s picture

Project: Drupal.org customizations » Drupal.org cross-site customizations

  • drumm committed 8466011 on 7.x-3.x authored by mallezie
    #965614 After login, should redirect to my dashboard
    
drumm’s picture

Status: Needs review » Fixed
Issue tags: +needs drupal.org deployment

Committed with minor code style changes.

drumm’s picture

Issue tags: -needs drupal.org deployment

Now deployed on Drupal.org.

Anonymous requests to Drupal.org are cached in a few different layers, that have not been cleared. The home page link to log in will keep ?destination=home for a few minutes, as those clear out.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.