Theme </head> script does not work on 404 page

(Joshua Rosenfeld) #1

We use the following script to make the logo link to /latest when clicked, as an effort to support people who like the categories view (default) and those who prefer the latest view. It was just reported, however, that the logo link on a 404 page does not get modified as expected, and links to categories not latest.

<!DOCTYPE html>
<!-- Make logo link to /latest -->
<script type="text/discourse-plugin" version="0.4">
  api.changeWidgetSetting('home-logo', 'href', '/latest')

(Rafael dos Santos Silva) #2

The 404 page doesn’t use ember, is just a plain HTML, so that won’t work.

Maybe you can get a simple jQuery snippet for that page, but are 404 so common to warrant it?

(Joshua Rosenfeld) #3

I never ran into this myself, so I never thought about how common they are. Good to know there’s a simple reason why the script doesn’t work, I’ll report back to the user.