Support Forum

URL shortening

11 Answers

New Answer

MP Mr Papa
Mr Papa
Member

currently investigating if this is an issue or not… frankly, not sure we ever tried it… 😉

MP Mr Papa
Mr Papa
Member

so yeah, does look like there is an issue there… thanks for reporting it…  will get a ticket opened for it and look at resolution – suspect its an easy fix…  if so, we can post it back here for you to use now…

MP Mr Papa
Mr Papa
Member

think we have identified the issue…  working in a couple of quick tests…  more in depth testing needed, but looks promising… 

its a one line fix, so if it holds together, we will post the change here before too long…

YS Yellow Swordfish
Yellow Swordfish
Member

Here is the code fix should you want to make it. The file in question is:

/wp-content/plugins/simple-press/sp-api/sp-api-filters.php

This is a big file ansd the function needed is about one-third of the way through it around line 588:

sp_format_links()

In that function is this line of code:

$chunked = (strlen($urlname) > $charcount && preg_match('#^(http://|ftp://|www.)#is', $urlname)) ? substr_replace($urlname, '.....', ($charcount - 10), -10) : $urlname;

Comment that kine out – put a hash (#) in front of the code line – then add below it this replacement:

$chunked = (strlen($urlname) > $charcount && preg_match('#^(http://|https://|ftp://|www.)#is', $urlname)) ? substr_replace($urlname, '.....', ($charcount - 10), -10) : $urlname;

That should sort the issue.

BS BSABantam
BSABantam
Member

That did the trick, thanks.

Great response as always!

YS Yellow Swordfish
Yellow Swordfish
Member

Always welcome
And thanks for the confirmation.

BS BSABantam
BSABantam
Member

Was this fix supposed to be included in the recent update, or only in the forthcoming major release?

MP Mr Papa
Mr Papa
Member

Not until 6. 0 comes out… The one past week was a security fix… 

6.0 is essentially ready… Just have to find time everyone is around to release… Vacations and work travel getting in the way 😉 

MP Mr Papa
Mr Papa
Member

hopefully, we are very close to 6.0…  new owners of simple press and making few internal adjustments for them…