Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment | File | Size | Author |
---|---|---|---|
#5 | colorbox_destination_subdir-1171612-5.patch | 879 bytes | ckng |
Comments
Comment #1
Nikdilis CreditAttribution: Nikdilis commentedConfirmed.
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.
Comment #2
Nikdilis CreditAttribution: Nikdilis commentedThink this is a major issue.
Comment #3
mazoerkam CreditAttribution: mazoerkam commentedsubscribe
Comment #4
mazoerkam CreditAttribution: mazoerkam commentedsolved by me
just remove (-) in line 11 and 14
original -1 change to 1
:D :D
Comment #5
ckng- Remove basePath if exists, i.e subdir installation
- Tested on both root and subdir installation
Comment #6
frjo CreditAttribution: frjo commentedCommitted path #5 to 7-dev. Thanks ckng!
Comment #8
warmth CreditAttribution: warmth commentedHi, does this have something to do with this: #1654938: How to redirect back to destination? Any help?