For a Drupal site installed under a subdir, e.g. http://example.com/mysite/, the destination always mess up as http://example.com/mysite/mysite

The problem code is

colorbox_login.js Line 18:
this.href = new_path + addquery + 'destination=' + window.location.pathname.substr(1);

which always output
http://example.com/mysite/user/login/colorbox?destination=mysite, or
http://example.com/mysite/user/login/colorbox?destination=mysite/XXX/YYY, if other paths

CommentFileSizeAuthor
#5 colorbox_destination_subdir-1171612-5.patch879 bytesckng
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Nikdilis’s picture

Confirmed.
My site is http://localhost/d7
After login the site changes to http://localhost/d7/d7 and ends up with a page-not-found-error message.

Nikdilis’s picture

Priority: Normal » Major

Think this is a major issue.

mazoerkam’s picture

subscribe

mazoerkam’s picture

solved by me
just remove (-) in line 11 and 14
original -1 change to 1
:D :D

ckng’s picture

Status: Active » Needs review
FileSize
879 bytes

- Remove basePath if exists, i.e subdir installation
- Tested on both root and subdir installation

frjo’s picture

Status: Needs review » Fixed

Committed path #5 to 7-dev. Thanks ckng!

Status: Fixed » Closed (fixed)

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

warmth’s picture

Hi, does this have something to do with this: #1654938: How to redirect back to destination? Any help?