Hi,
I just installed the module and it looks really nice. Only the abbreviated url seems to link to a url that is lacking the language code (e.g. ../article-name instead of ../en/article-name). Could it be I'm doing something wrong?
Thanks, Dirkk
Hi,
I just installed the module and it looks really nice. Only the abbreviated url seems to link to a url that is lacking the language code (e.g. ../article-name instead of ../en/article-name). Could it be I'm doing something wrong?
Thanks, Dirkk
Comments
Comment #1
icecreamyou commentedIt's entirely possible that this is an issue in the module but I'm probably going to need you to test some things to help me fix it because I don't have access to a multilingual site at the moment. I'll get back to you once I figure out what it is that I need you to test.
Comment #2
icecreamyou commentedOkay. Go to a node/add form and switch to PHP input mode. Put the following code in the "body" textarea and click "Preview." The code should run once and display the results. Mess around with the last part and see if you can get the URL you're expecting.
I'm a little befuddled by your problem because - although I don't have the resources to attempt to reproduce it - the approach this module is currently using *should* produce the right result. It's possible, though, that one of the modules you're using that allows your site to have different URLs for different language sections is messing with things.
Comment #3
DIRKMJK commentedThanks for your assistance. When I run it as is I get ../node/add/news-story [news story being the content type]
When I replace $_GET['q'] with $_SERVER["REQUEST_URI"] I get ../en/node/add/news-story - so I guess that's good isn't it?
Comment #4
icecreamyou commentedAfter some more research - try this:
Comment #5
DIRKMJK commentedthis one returns ..//en/node/add/news-story
(with the double slash immediately after the site name - actually the previous one also returned a double slash, i hadn't noticed - sorry about that. anyway, it seems to point to the proper page regardless of the double slash)
Comment #6
icecreamyou commentedOkay, I found the "real" way I've been looking for since forever now.
...I'll commit this as soon as it's confirmed that it works.
Comment #7
DIRKMJK commentedI just tried and it returns the correct url - also without the double slash!
Comment #8
icecreamyou commentedFixed in dev!
Comment #9
DIRKMJK commentedMany thanks, it returns the correct url now!
There is one thing; instead of the icon it now presents the text 'post to twitter'. so if you select icon_text you get 'post to twitter post to twitter'
Comment #10
icecreamyou commentedHmm... that must be because the image is not located in a virtual language-specific directory.
The source of the image should look something like this:
...but I assume yours looks something like this?
That's a pretty easy fix, just replace line 108 in tweet.module with this:
I will commit this change to dev as soon as it's confirmed to work.
Comment #11
DIRKMJK commentedActually, the image is in
http://www.example.com/modules/tweet/icon.png
Incidentally, I just found that I can get it to work by changing line 108 into
Comment #12
icecreamyou commentedYou should put non-core modules in /sites/all/modules instead of /modules to make upgrades easier. But regardless, obviously I can't ask users to go edit their module file to put in their site URL.
I've committed the change to dev. Please reopen this issue if you continue to have problems.
Comment #13
DIRKMJK commentedMany thanks for fixing this!
(And I'll move my non-core modules...)