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

XF 404 page

Ryan Kent

Well-known member
#1
If you try to access a non-existant page on a XF site you get a message that says:

XenForo Community - Error

The requested page could not be found.
I located the phrase "requested_page_not_found" and would like to replace it with the following:
Oops! We seem to have misplaced the page you seek.

You can press the Back button on your browser, or return to our forums by clicking here

Two questions:

1. It seems bbcode isn't accepted in a phrase. What's the best alternate?

2. Is there a way to say {site}/forums that way the phrase can be used without adjustment on other XF sites?
 

Brogan

XenForo moderator
Staff member
#2
You can use HTML in phrases.

Try using <a href="{xen:link 'forums/'}"> for the URL.

Edit: Just tried using the above and it doesn't work. You need to use standard HTML, like so:
<a href="/community">Forum</a>
 

Mike

XenForo developer
Staff member
#3
In a phrase, you can't use {xen:link} or any template syntax (or any variables that aren't exposed to the phrase). You'll have to use the direct URL.
 

Ryan Kent

Well-known member
#4
Thank you both Mike and Brogan for the guidance.

I modified my "requested_page_not_found" as indicated below. I also modified the "requested_thread_not_found" but replaced "." with "/forum".

I would offer the recommendation this change would be beneficial to everyone and you may want to consider it for the default XF phrase.

<h2>Oops! It looks like we misplaced the page you want. </h2>

<h1>You can press the Back button on your browser, or return to our home page by clicking <a href=".">Home</a></h1>
 

Tracy Perry

Well-known member
#6
Thank you both Mike and Brogan for the guidance.

I modified my "requested_page_not_found" as indicated below. I also modified the "requested_thread_not_found" but replaced "." with "/forum".

I would offer the recommendation this change would be beneficial to everyone and you may want to consider it for the default XF phrase.

<h2>Oops! It looks like we misplaced the page you want. </h2>

<h1>You can press the Back button on your browser, or return to our home page by clicking <a href=".">Home</a></h1>
Or you can simply look at this add-on. :D