Closed (fixed)
Project:
Colorbox Node
Version:
7.x-3.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Oct 2012 at 12:24 UTC
Updated:
27 Apr 2015 at 16:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
zamorta commentedI like to thank you!
Works like a charm.
Comment #2
sibiru commentedtrying to apply patch now :)
Comment #3
sibiru commentedthis patch is really work, thank you
suggest to be merge to new version
Comment #4
iLLin commentedThis patch does not work for my language setup. I setup Spanish as a second language and created two webforms. I gave them bot the same alias of "content/test-form" Here is my link:
print l('Test Form', 'content/test-form', array('query' => array('width' => '50%', 'height' => '50%'), 'attributes' => array('class' => array('colorbox-node'))));If I am in English the webform for the english form popups up. If I switch languages and now "es" is in the URL. Drupal automatically puts "es/" in front of content/test-form so the url ends up like this: es/content/test-form.
If I click on that link, then colorbox prepends "colorbox" to the front of the URL and passes that onto the colorbox node module. It is then ran through this check on l ine 102 of colorbox_node.module.
It retrieves the correct path and displays the correct page. Make sure that gets fired correctly. There maybe a better approach then what I am doing in that function but that approach is not with javascript. By using your method, it prepends "es/" in front of colorbox which is incorrect. So end up with URL's like this: es/colorbox/es/content/test-form
Comment #5
agnese.stelce commentedpaolomainardi code works really great but patch unfortunately didn't apply well with my make file so I generated new patch file against 7.x.-2.x.
Comment #6
paolomainardi commentedThanks Agnese :)
Comment #7
betz commentedsmooth aligator!
#5 works perfect.
Comment #8
betz commentedThe patch in #5 forgot to add
+ parse.searchto the path.This is needed for extra url parameters like default parameters for webform...
Attached the modified patch.
Comment #9
iLLin commentedPlease review my comment in #4.
Comment #10
harrrrrrr commented#5 works.
Comment #11
iLLin commentedAgain... review my comment in #4.
Comment #12
giorgosk@iLLin
maybe the problem is Entity Translatable Nodes/Entities ?
does colorbox_node work with entity translatable nodes ?
BTW entity translation is part of Drupal 8 now !!
http://drupal.org/project/entity_translation
those would have the same NID so you could only tell them apart by the language prefix
en/node/1
de/node/1
@everyone is your i18n setup involving entity_translation ?
Comment #13
paolomainardi commented@GiorgosK
No, i wrote my patch using just regular i18n modules, i didn't test it against entity translation modules.
Comment #14
agnese.stelce commented@GiorgosK
No, my setup included only i18n modules, no entity translation.
Comment #15
thesame- commentedI was facing the same problem as #4 as I ended up having path like this /[prefix]/colorbox/[prefix]/node/[nid]
I included patch that worked for me.
Comment #16
hefterbrumi commentedIs the patch in #15 works with entity translation? Icant apply anyways. Is that for 3.0?
Comment #17
Andre-Bupgraded affected version to 3.x since #2150593: Multilingual Support Problem reports an issue about i18n too.
patch probably needs rerolling to latest dev, shouldn't be too hard to include the language prefix.
Comment #18
Andre-BComment #19
upchuk commentedI also tried these solutions but unfortunately for my use case it doesn't really work.
My language settings are as follows:
example.com/path (for the default language)
example.com/en/path (for english)
And if I am on a page with the default language (without prefix) and want to load in a colorbox a node with the english language, it won't work because there is no 'en' path prefix to append to the 'link' variable.
This means the patches in this issue are not really sustainable as you are hardcoding the prefix in the ajax request from the page you currently are on. It should somehow accept it from the href.
I'm still trying to figure out a way...
Comment #20
jimmyko commentedI am facing the same problem on 7.x-3.x version. I have tried to patch it. Please help to review.
Comment #22
jimmyko commentedFYI. The patch I created on #20 is based on the 7.x-3.x branch on git.
Comment #23
iLLin commentedIt is just URLs. As long as your URLs are built correctly, it should work. Please see my comment in #4
Comment #24
jimmyko commented@iLLin
I have read your post but it is really not working in my case. I think the patch is a bit dirty but at least it can help at this moment.
Comment #25
Chris Gillis commentedThis isn't working for me. I have
If I take out the "colorbox-node" class, I get a link to the right language. (e.g. from /ko/ I get a link to /ko/node/30 which appears in Korean). However, when I add the "colorbox-node" class, it displays the modal in English. Any ideas how to work around?
Comment #26
iLLin commentedDo you have a demo site with creds so I can take a look?
Comment #27
Chris Gillis commentedNo, I don't sorry.
Also, because of this issue Ive decided to switch over to using modal_forms module instead. Seems to work fine.
Comment #28
korzh-nick commented#20 works for me
Comment #29
madeltoro commented#20 Works
Comment #30
madeltoro commented#20 Updated patch
Comment #31
gonchiponchi commentedthe patch #30 worked fine but i can't understand why this patch is not into the colorbox node , this bug is well know more than 2 years . i've the last colorbox node version installed and i still must install patch to work correctly.
Comment #32
giorgosk#30 applies cleanly on latest code 3.4 (dev version is older)
and its same patch since #20
and its been tested and works properly
it think it should be committed
Comment #34
iLLin commentedIn DEV, I'll get a new release out soon.