Hi,
I use lightbox2 (last version dev on 24 juli). But this is also happens on latest stable version.
I use the login function of lightbox2. Everytime I try to login the url of the lightbox is
http://site.com/user/login/lightbox2?destination=node/407%2523comment-form
I click on the link and the close the lightbox. Then the link has become:
http://site.coml/user/login/lightbox2/lightbox2?destination=node/407%252...
So that's mean the word lightbox2 has been added in the url. This happen everytime I click and the url become longer and longer. This is the login link of a comment form.
Then I add a hardcoded link to the login in the menu. In the beginning the link already has 2 lightbox2 words while I only wrote one (harcoded). So the link is:
http://site.coml/user/login/lightbox2/lightbox2?destination=node%2Fhomepage
The the effect of longer url also happens everyime I click on it.
This is happens on Windows Vista and XP and both firefox and internet explorer.
Sorry but the site is not accessible yet online, so I can't give real url.
Comments
Comment #1
cesarian commentedAnyone please fix this?
Comment #2
stella commentedI can't reproduce this with the latest dev version. Can you try the newer version instead?
Comment #3
tetramentis commentedI have the same issue with Lightbox 6.x-1.9
In Lightbox options I've disabled Login form support, and instead added manually this code:
It generates a proper URL of the form /user/login/lightbox2, but repetitive clicks (followed by closing the login box) do exactly what the OP described - they add more '/lightbox2' segments to the URL.
Not looking at the code yet, I would think that clicking the login link (OR dismissing the login dialog with a cross at the lower right) somehow triggers this replacement
href: this.href.replace(/user\/login?/,"user/login/lightbox2")again and again, and that replacement does not check if the URL already has the '/lightbox2' postfix.Comment #4
tetramentis commented"Longer URLs" can be fixed by replacing the contains select *= with simple equals select =, like in the example below (which works for clean URLs only), file js/lightbox_modal.js:
old:
$("a[@href*='/user/login'], a[@href*='?q=user/login']").each(function() {new:
$("a[@href='/user/login'], a[@href*='?q=user/login']").each(function() {At least for clean URLs, I believe the login URL is always just /user/login, with nothing following it, so '*' from '*=' can be safely omitted (correct me if I'm wrong). Omitting the asterisk stops adding '/lightbox2' segments to the login link on every 'link click'/'modal frame close' pair of events.