Customization in body tag won't appear in some pages

If I add some customization in body tag like a div as shown in below screenshot:

The div appears in normal pages, but it won’t appear in some pages like (topic not found) page: for example
https://meta.discourse.org/t/123456778888888

While other customization works as expected that is added via head Header Footer etc.

2 Likes

This is somewhat tricky

https://github.com/discourse/discourse/blob/a19170a4c2c37bb6f6ae9531fe4f925777f3e8d5/app/views/layouts/no_ember.html.erb#L2-L28

I can spot two issues here …

  1. footer is not in footer tag. Which may be very tricky to fix if static pages add footer already.

  2. We are missing <%= raw theme_lookup("body_tag") %>

(2) is probably very simple and safe to add… (1) is hard.

@Johani can you add this to your list to determine if (2) is safe and just do a PR for it.

5 Likes

We now lookup theme fields more consistently in all the relevant views.

https://github.com/discourse/discourse/commit/340173eb121da6d3db899bf8c802fa78a24c068f

Thank you for reporting the issue @leo.proctor :+1:

4 Likes