Skip to content

[4.x]: {% css %} and {% js %} tags not working on 403.twig #13989

@FrDH

Description

@FrDH

What happened?

Description

We wanted to style our 403.twig page, much like you'd do for a 404 page, but somehow none of the .js and .css files included with the {% js %} and {% css %} tags are being loaded. They just don't appear in the rendered HTML.

Steps to reproduce

  1. Create a basic html file and name it 403.twig, nothing fancy just a basic html page.
  2. Try to include one of the css files using a {% css %} tag
  3. Visit domain.com/403

Expected behavior

I'd expect the page to have some styling due to the loaded css file.

Actual behavior

No css file is loaded, the rendered HTML does not include the <link> tag.

Craft CMS version

4.5.11

PHP version

8.1

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions