Scenario:
A multi-language site, with the negotiation set on 'path prefix'.
Using the ajax slideshow as a view. Add a language filter on the view (Node translation: Language in Current user's language, No language). That's a standard filter for multi-language content.
Create some nodes in a non-default language.
Bug:
The slideshow displays empty slides for these nodes.
The neutral language nodes work, however.
Explanation:
The ajax call is made to mysite.com/photos/get/photos/, but it should be made to mysite.com/es/photos/get/photos/ (for Spanish, that is).
Unfortunately, Drupal.settings.basePath, used by the ajax call, doesn't contain the path prefix (though it should, imo).
I'm attaching a patch addressing this issue, please review it and, if adequate, apply it. Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| ajax_slideshow_multilang_fix.patch | 1.81 KB | bdimofte |
Comments
Comment #1
bdimofte commentedUntil this problem is solved, I'm documenting a quick fix, for the people facing the problem.
I'm not getting into details, but this trick should work fine:
1. Make the filters of the block display ('Content') overridden
2. Apply the node translation filter ONLY on the default display ('Tabs').
Comment #2
udig commentedbdimofte,
thanks for spotting the issue and providing this workaround. should be covered at the next release.
Comment #3
Dokuro commentedJust note that that walk around will not work for links that are references, but the patch does.
Thanks for the patch!
Comment #4
lal2017 commentedThis workaround solution worked well thanks!
Comment #5
CesarD commentedThis workaround did not work for me, nor did the patch.
A page in my site is something like: www.mysite.com/?q=en/node/33
The TABS links in the ajax slideshow (even after applying the patch and with the workaround) look like: www.mysite.com/33
So I have two problems, the languange and the fact that "node" is not showing up. So in the slideshow there's no content obviously.
Any suggestions?
Thanks in advance!