Published Page CSS Not Showing on Frontend

AI-generated summary

Users are reporting an issue with custom CSS not loading on published Published Pages following a recent update [chrismalone](/t/-/369642/1, /t/-/369642/6). The CSS, housed in a common.css file within a Theme Component, only appears when editing the pages in the admin panel chrismalone. Falco inquired if recent stylesheet changes were the cause, and RGJ confirmed the problem, noting that even the main theme’s CSS wasn’t loading and the <discourse-assets> section was missing from published pages’ code RGJ. david requested clarification on the CSS file location and subsequently identified a fix via a GitHub pull request david, which RGJ and chrismalone have confirmed resolves the issue.

Since the latest update (I think), I’m having an issue with my Published Pages. I have my custom css for the pages in a theme component. The CSS has always loaded correctly. Now, I only see the custom CSS styling when I’m in the editor for the pages. When I look at the pages at their published url, the custom css is not loading at all.

Has anyone seen this behavior? Or have any ideas what might be going on?

Thanks for any help you can give!

2 Likes

Is anyone else experiencing this?

@david maybe some recent change to how we load stylesheets?

1 Like

Can you confirm which file that custom CSS is in? Or if it’s just an admin-panel-authored theme, which tab you’re using?

Yes, I can confirm, I am seeing the same behavior on today’s tests passed.

Only plugin stylesheets are being loaded.

Even the CSS from the main theme is not loaded.

Normal pages:

Published pages:

as you can see the entire <discourse-assets> section is not there. The plugin CSS is in the <head> instead and the CSS is nowhere to be found.

2 Likes

It’s a common.css file in a Theme Component we use for our custom css and head codes.

2 Likes

Thanks @chrismalone and @RGJ. This should be fixed by

https://github.com/discourse/discourse/pull/33179

3 Likes

Thank you David, that indeed resolves the issue!!!

3 Likes

Thanks so much!!!

This topic was automatically closed after 12 hours. New replies are no longer allowed.