Not a bug Route filter forwarding user to a thread instead of a node

sbj

Well-known member
Affected version
2.1.7
So, I messaged with a user of mine on WhatsApp and sent him some links. And anytime I sent him a link, he landed on the same thread even though those links were not links to a thread. He is using Apple 11 pro max.

So after some tests it looks like the route filters are the problem.

I am using these filters.

1584219441247.png


So when I send him a url like this:
https://xenforo.com/community/_forums_/xenforo-pre-sales-questions.5/

you expect him to land on the node number 5?
No, he landed on the thread with id 5.

Actually these urls work on my phone and on my WhatsApp, on his they don't, so it took me a while to figure out what the problem was. Also, my links were not clear like this but had filters in them (like prefix filters applied), so in first instance I thought maybe an addon could be a problem.

I can deliver real urls for test purposes via pm if needed.

Thanks.
 
Well, that's interesting.

This seems to be a bug in WhatsApp and how they handle Markdown style parsing, in particular.

In Markdown _forum_ should become forum (a single underscore wrapped around text makes it italic).

In other words your link (simplified) in WhatsApp instead of being _forum_/some-forum-title.5/ actually becomes forum/some-forum-title.5/. And then because you have changed your threads/ route to forum/ that's why it lands on the thread.

Not a lot we can do about this unfortunately. Ideally WhatsApp needs to block Markdown formatting in URLs.

...Like we do!

https://xenforo.com/community/_forum_/5/
 
I see. If I only knew 2 years ago that putting _ around words are used for markdowns and can mess up things :(.

I just wanted to use a route which works both in my native language and in English and at the same time for SEO reasons (so I would have the term forum in every single link).

Are you sure this is because of WhatsApp? If it is indeed, how do you explain that it works on my phone (Xiaomi, Android 10) where I can click on the same link on WhatsApp?

Okay, let's say there is nothing to do about it.

Can you please tell me how I can make changes here without breaking 2 years of urls spread everywhere? Thanks.
 
Are you sure this is because of WhatsApp? If it is indeed, how do you explain that it works on my phone (Xiaomi, Android 10) where I can click on the same link on WhatsApp?
Yeah you can see it right here:

IMG_8998 2.webp

Notice how the formatting of the word forum is italicised and the underscores are a slightly different colour?

IMG_8999 2.webp

And then when it's posted, notice how the underscores are missing and the word forum is italicised?

If it isn't doing it on Android WhatsApp then either:

a) It has already been fixed in Android
or
b) Android just has a different (correct) behaviour.

Okay, let's say there is nothing to do about it.

Can you please tell me how I can make changes here without breaking 2 years of urls spread everywhere? Thanks.
I wouldn't bother trying to do anything about it apart from reporting it to WhatsApp. I have done that by the way, through the app.

It's something they absolutely should fix and presumably they will if the behaviour differs on other platforms.

IMG_9001.webp
 
Great explanations. I don't have an Apple phone to test, so much appreciated.

I wouldn't bother trying to do anything about it apart from reporting it to WhatsApp. I have done that by the way, through the app.

It's something they absolutely should fix and presumably they will if the behaviour differs on other platforms.
Okay, I will report aswell.

Just to be sure, the general consensus is that markdowns shouldn't be applied to links, correct? So, I am not the exception but WhatsApp is, which acts differently against the general consensus.

Because if not, I have to change my routes just to be conform with the general consesus in the www.
 
It's a tricky thing to get right but yeah, the expected behaviour is that Markdown syntax within a string that looks like a URL should not apply Markdown formatting.

I usually turn to GitHub to test the expected Markdown behaviour:

1584223427602.webp

Notice it links it correctly without changing it ti forum.
 
Thanks, I reported it meanwhile.

A secondary question, I thought I could trick the system but unfortunately it doesn't work.

Since we can replace routes with custom routes, why can't we replace the replaced one?

So if
forums/ to _forum_/ like I did.
I thought I could do a 2nd route
_forum_/ to test_route/

So it would go from forums->_forum_->test_route

But this doesn't work on my localhost. It would have been too easy I guess :D.
 
Top Bottom