Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I have Shorten URL module enabled and configured to use bit.ly as the primary shortener. I have confirmed that the module has in fact created a shortened URL for the page in question. But when a service link is clicked, no URL (long or short) is being displayed. If I turn off Always use short links, the full URL is output. If I turn How generate short links to use node/xxx alias, that works as well. It only does NOT work when Use Short URL service is selected. If I disable Shorten URL, it works using the default tinyurl link.
Comments
Comment #1
TheCrow CreditAttribution: TheCrow commentedTried it and used latest dev of Shorten URL with TinyURL as backup shortener service and bit.ly as first and seem it swtich to the backup service everytime, maybe bit.ly doesn't work with local websites?
Comment #2
ckngFor me I can't get any of the shorten options working, all without link.
Comment #3
gittosj CreditAttribution: gittosj commentedIt is working but takes some juggling. Steps to fix / enable it are:
1) Make sure shorten itself is properly installed and configured by testing at [www.yoursite.com]/shorten
This took me some time and fettling with settings at [www.yoursite.com]/admin/config/services/shorten
2) Clear your cache and enable the settings at [www.yoursite.com]/admin/config/services/service-links
3) It works!
Comment #4
BeaPower CreditAttribution: BeaPower commentedworks for me after clearing cache and enabling http:// and not www.
Comment #5
Simon Georges CreditAttribution: Simon Georges commentedSeems to be ok after clearing caches and properly configuring Shorten.
Comment #6
TheCrow CreditAttribution: TheCrow commentedAdded in doc: http://servicelinks.altervista.org/?q=about/troubleshooting
Comment #7
BenK CreditAttribution: BenK commentedHi everyone,
Actually, I don't think this problem is resolved yet. At its core, the issue is that the following option is enabled by default in the shorten module:
But if this option is enabled, then Service Links link shortening won't work if you're using bit.ly. It's a somewhat problematic issue because then you need to uncheck that option (which makes the url several characters longer).
Any idea on how to fix? Not sure if this is a Service Links or Shorten module issue.
--Ben
Comment #8
TheCrow CreditAttribution: TheCrow commentedComment #9
IceCreamYou CreditAttribution: IceCreamYou commentedI changed the default for the "www. instead of http://" setting to prefer http://.
However, it sounds like this is actually an issue with Service Links expecting a URL that starts with http:// and not accepting URLs that start with www. instead, though from briefly looking through the code it's not immediately obvious to me where that would be. Shorten URLs is just a dumb API that returns links that are correctly formed according to the settings. Now that the default settings should be compatible, I'll leave it up to the Service Links maintainer to decide whether action is still required on the Service Links side or whether this issue can be marked fixed.
Comment #10
TheCrow CreditAttribution: TheCrow commented@Benk followed the #3 suggestions?
@IceCream thank you!
Comment #11
BenK CreditAttribution: BenK commentedIt looks like the problem is on the Service Links side.... comments in #3 don't solve the issue.
Thanks,
Ben
Comment #12
TheCrow CreditAttribution: TheCrow commentedtested it again with www. option on/off and with localhost/external url, seems that bit.ly doesn't work only for local addresses, that's why it switch to tinyurl (my second choice on shorten urls module)... there is nothing to fix at all, unless you have some not working online website i could give a look on.
Comment #13
BenK CreditAttribution: BenK commented@The Crow: Thanks for taking a look. I've got a live website (not local) where I'm experiencing the problem. But the website I'm using is in the format of subdomain.foo.com. Maybe the www option can't be used on a subdomain.... meaning it actually has to be "www", not just any subdomain on the site?
Thanks,
Ben
Comment #14
TheCrow CreditAttribution: TheCrow commentedTried right now with http://translate.google.com/ and it still works with both www. on and off, i think the question is, your domain is reachable by bit.ly? This seems to be the only reason why bit.ly shouldn't work.
If you use the bitly.com interface to short your link does it works?
Comment #15
IceCreamYou CreditAttribution: IceCreamYou commentedbit.ly should work with the www option. The www option affects the URL that Shorten URLs outputs but has nothing to do with bitly itself -- i.e. Shorten URLs gives a full URL like http://example.com to bit.ly and then bit.ly returns a token like aAbBcC, then Shorten URL uses that to construct a URL like either http://bit.ly/aAbBcC or www.bit.ly/aAbBcC. I just checked and both formats resolve correctly.
If your problem is that Shorten URLs is falling back to the secondary service, that means the request to bit.ly is failing. Usually this would be because you have invalid API keys or something similar. However it looks like bit.ly has deprecated the API that Shorten URLs is using without incrementing the API version -- since it's just deprecated and not removed it should still work, but maybe there's a problem there (or maybe bit.ly isn't giving out the old API keys any more?). Feel free to open a new issue against Shorten URLs to upgrade to the new OAuth authentication scheme.
Comment #16
mmaina CreditAttribution: mmaina commentedHad the same problem while using Service Links and in fact, the Facebook button wasn't even showing up! But once I cleared all cache, everything is OK now :-)
Comment #17
the url CreditAttribution: the url commentedThanks for this amazing post, its in me to share my favorite shorten a url service is personally use myself!