• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 changing a specific thread url (route filters)

Live Free

Active member
#1
I'm using the route filter for directories no problem. Right now I'm trying to change a few specific threads but I can't seem to get it to work.

Find Route: threads/the-dreaded-“e”-word.127445/
Replace Route: articles2/the-dreaded-e-word/

Incoming URL conversion unchecked
Enabled
Also tried with threads as the base directory for both find and replace, no luck.

When I visit the replace route above I'm redirected to the thread - but I'm trying to change the actual thread url so it lands on the above replace route url.

What am I missing?
 

Liam W

Well-known member
#2
Does it work if incoming url conversion is checked?

I just tried something similar, and it works fine for me. The find route gets changed to the replace route when the find route is accessed...
 

Live Free

Active member
#3
Thanks for the reply.

For some reason I can do it fine with other specific threads in the same forum, but not with this particular thread: /threads/the-dreaded-“e”-word.127445/
 

Liam W

Well-known member
#4
Thanks for the reply.

For some reason I can do it fine with other specific threads in the same forum, but not with this particular thread: /threads/the-dreaded-“e”-word.127445/
Might be a bug with that URL then. Could it be the quotes possibly?

Has it worked with other threads with quotes?
 

Live Free

Active member
#5
Might be a bug with that URL then. Could it be the quotes possibly?

Has it worked with other threads with quotes?
I think you're right.

This URL also has the same problem:

Code:
/threads/get-hold-o’-yourself.127446/
The only thing other than quotes and apostrophe is that they are both by the same member.
 

Live Free

Active member
#6
I just went to try to test another thread with quotes in the URL but I can't seem to find any with quotes in the actual url. I found a thread with quotes in the title, but they were simply removed from the url.

Does XF typically remove quotes and apostrophes from URLs automatically?

Found several thread with quotes in the title but not in the actual URL. If XF filters it out when making the URL, why did these two particular threads include quotes/apostrophes? Hmmmm
 

Liam W

Well-known member
#7
I just went to try to test another thread with quotes in the URL but I can't seem to find any with quotes in the actual url. I found a thread with quotes in the title, but they were simply removed from the url.

Does XF typically remove quotes and apostrophes from URLs automatically?

Found several thread with quotes in the title but not in the actual URL. If XF filters it out when making the URL, why did these two particular threads include quotes/apostrophes? Hmmmm
Where they imported by any chance?
 

Mike

XenForo developer
Staff member
#8
Yes, the quotes are normally removed. What you've shown aren't actually quotes though -- they're "smart" quotes, so different characters. If you go into the thread, copy the URL and paste it into a text editor, you should see that the quotes are actually a special encoded string. You should be able to use that instead.

You could also just edit the title to use " or ' rather than other replacements.
 

Live Free

Active member
#9
@Liam W, that was my thought also, but they are all newly created.

I copied and pasted the title/content from a wordpress (migrating from a wordpress blog that only has about 10 pages or so), thus the unusual characters.

I've gone ahead and followed Mike's advice and edited the thread titles to the non special characters and the routes are working!

I would like to note, however, that when I was setting the route filter the title was copied from the thread, so the route was using the same special characters as the title/url, and the route wasn't working.