Skip to content

Static resources not working correctly in 2.8.2 #15696

@muzzwood

Description

@muzzwood

Bug report

Summary

When viewing a static resource (web context) in 2.8.2, only the content field renders. The rest of the template is ignored.
I noticed the issue when upgrading a site from 2.8.1 that relies on static resources.
As a quick fix, I have copied over modstaticresource.class.php from 2.8.1 and that works as expected.

Step to reproduce

Create an HTML file, create a static resource and link to the file. Be sure to use the new system settings resource_static_path or resource_static_allow_absolute. Assign a template that's not empty and has the [[*content]] tag specified.

Observed behavior

Only the content field renders. The rest of the template isn't there.
If the [[*content]] tag is removed from the template, then the template renders fine (obviously without the content).

Expected behavior

Template should render as normal with the static resource content being added via the [[*content]] tag.

Related issue(s)/PR(s)

Could be something to do with a change made here:
#15656

Environment

MODX version 2.8.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThe issue in the code or project, which should be addressed.urgentThe issue requires attention and has higher priority over others.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions