Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Link shortening problem
Avatar
adedip
Member
Free Members
sp_UserOfflineSmall Offline
Aug 9, 2012 - 9:45 am

Hi there, upgrading from 4.5.1 to 5.1 I'have experience a strange issue with link shortening, previously I use to auto shorten links. Then in the 5.1 I decided to keep them long way.

Here's what happened:

[Image Can Not Be Found]

it creates a double urls, the first with empty field inside the tag, which points to the right link, and the second links to the first part of the old shortened link, just till dots interruption.

Any clue how to fix this?

Thanks.

Andrea

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 9, 2012 - 11:16 am

Are they OK if you turn the shortening back on - set to the same length as before?

andy-signature.png
YELLOW
SWORDFISH
Avatar
adedip
Member
Free Members
sp_UserOfflineSmall Offline
Aug 10, 2012 - 6:48 am

I can't find where to reverse it... I only see an option in Options > Current Settings > Messages links filtering with a number to put into (now it's 0).

Is it that one? I'm on production at the moment, I'd rather not mess up again. Is it that one I have to change? How many chars? is it reversible?

Thanks

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 11, 2012 - 8:44 am

Well yes - I meant can you try and revert back to the shortening you were using before you set it to zero. Same value.
We do seem to be experiencing an issue with link shortening and before that s sorted I would advise not changing it for now.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Marc Busch
Member
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2012 - 12:42 pm

Apologies for joining in here, but I also would like to see this problem fixed, as I have the same issue.

It is easy to play with this bug in this very forum right here and thereby pinpoint the problem:

Simple-Press turns all links in the text into clickable links (i.e. it adds the HTML around a link).

Experiment A:

1. Start a new post (or edit an old one or reply to a post)
2. Enter this in the text somewhere:   ww.LINK.com/text  (i.e. only ww instead of www)
3. Click preview

RESULT: The link is NOT activated (clickable) in the preview.

4. Correct the link to http://www.LINK.com/text
5. Click preview again

RESULT: The link IS activated (clickable). Actually, you see in this very post that the filter added http:// and activated the link.

-->> That means there's a filter looking for valid links in posts and surrounding them with HTML (<a> tags) to activate these links. This has nothing to do with URL shortening, because the link in the example IS already short. ;)

The behavior gets strange, when there are 2 or more dots (full stops) in the link:

Experiment B

As before (start new post...) and try this text in the preview:

http://www.Link.com/one.dot

http://www.Link.com/two..dots

Well, you see the problem right here in this post. :)

When there are two or more dots in a link, the bahavior is not correct.

Maybe it's similar/related to this:
http://core.trac.wordpress.org.....cket/19032

That's interesting, but it's not the real problem that adedip or I have...

The problem with the links from v4.5 and before is that these links are already active links (i.e. the <a...> HTML stuff with correct links and anchor text is already in the post). However, the filter (Experiment A) STILL identifies the anchor text as a link and activates it (i.e. adding additional <a> tags around the original anchor text... turning it into an active link --> BAD IDEA).

Now, the ANCHOR TEXT of the original link is used as the target link. Together with the "two dots in a row" bug, these links are not only wrong (pointing to the wrong URL), they also look strange. :)

I don't mind if they look strange.

I want them to point them to the correct URL...

 

Possible solution:

One way to achieve that would be to make sure that the filter (Experiment A) does NOT activate links, that ARE ALREADY active (i.e. surrounded by <a></a> tags). That would solve the problem for me... and adedip. :)

Marc

Avatar
Marc Busch
Member
Free Members
sp_UserOfflineSmall Offline
Aug 11, 2012 - 1:04 pm

UPDATE:

After looking at the HTML output of my previous post, it seems that the problem with the filter activating the anchor text as a new link only occurs in combination with the "two dots" problem:

Image Enlarger

The first link is parsed correctly. Only the second link with the double dots gets additional HTML (red).

So, it seems to be a "double dots" problem... eek

Avatar
Yellow Swordfish
Glinton, England
SP Master
sp_UserOfflineSmall Offline
Aug 11, 2012 - 4:32 pm

Yes - we know. As already said - we are looking into it and trying to decide the best way to deal with it.
You have my apologies for the bug but the fix will be the more important thing...and also understanding why this has started now when the code itself has been in place for a very long time. But that's a secondary issue,.

andy-signature.png
YELLOW
SWORDFISH
Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 620
Members: 17365
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10128
Posts: 79626