XF 2.0 Routing Filter Bugged?

KensonPlays

Well-known member
Unsure on what's causing this. I have a bunch of pages linking to /pages/about/ (for example), with a Route Filter leading to /about/. But once a user clicks on the navigation item I have created for each page under Home > PAGENAME, it likes to add it onto the end.

Say if they go to the About page, then they go to the FAQ page, it ends up redirecting to /about/faq/ which doesn't exist.

Unsure of why this is happening. Can it be fixed? It's one of those things that can get irritating.
 
It's likely nothing to do with route filters, but instead how you're entering the links for the navigation items.

Presumably you're doing the URLs something like:

faq/

Which will make the URL relative to the current page, so if you're viewing about/ at that point, faq/ will be relative to about/faq/.

You just need to prefix the links with a forward slash.

/faq/
/about/

etc.

It was slightly different in XF1 because we had the base tag, but we don't have that anymore so you have to be a bit more careful about relative and absolute URLs.
 
It's likely nothing to do with route filters, but instead how you're entering the links for the navigation items.

Presumably you're doing the URLs something like:

faq/

Which will make the URL relative to the current page, so if you're viewing about/ at that point, faq/ will be relative to about/faq/.

You just need to prefix the links with a forward slash.

/faq/
/about/

etc.

It was slightly different in XF1 because we had the base tag, but we don't have that anymore so you have to be a bit more careful about relative and absolute URLs.
Ahh, okay. Thanks! I wasn’t sure if that would break it or not.

Does this need to be on both fields in Route Filters? Edit: It does not, just the second field.

Edit: Hmm... When I try adding the first “/” in, it removes it when I hit save. @Chris D
 
Last edited:
Sorry to bump, but when I tried adding the “/” in Chris, it doesn’t seem to accept the Route Filter change, and just stays the same about/

Then it still bugs out and after visiting a couple pages, then trying to go to another, it tacks it onto the end.
 
There's nothing wrong with the route filter. It's the link value you have for the public navigation entries you've created.

(Note that editing messages does not trigger mention alerts, so I didn't see your edit earlier).
 
There's nothing wrong with the route filter. It's the link value you have for the public navigation entries you've created.

(Note that editing messages does not trigger mention alerts, so I didn't see your edit earlier).
Link value? How would I correct this? It gets on my own nerves haha.

You should be able to browse back and forth no issues I think.
 
Under Admin CP > Setup > Public navigation I think you have created these items using that system, right?

1522797484279.webp

You need to edit each one of those (there may be others) and whereas the link might currently look like this:

1522797536442.webp

It needs to be changed to:

1522797559379.webp
 
Okay so I did as you said, changed /pages/about/ on Public Navigation to /about.

But now it doesn’t select the Home button for being highlighted (All those pages have that as the ‘parent’ button)

EDIT: Okay so it seems like it was 3 pages specifically, /servers /faq /affiliates.

It seems to be fixed now, will confirm when I get home in half hour on my pc (vs iPad).
 
Last edited:
Top Bottom