Skip to content

[COMMS-833] Fix asset paths for documents on a relative url#24390

Draft
judithroth wants to merge 1 commit into
devfrom
bug/comms-833-documents-don-t-work-properly-with-rails-relative-url
Draft

[COMMS-833] Fix asset paths for documents on a relative url#24390
judithroth wants to merge 1 commit into
devfrom
bug/comms-833-documents-don-t-work-properly-with-rails-relative-url

Conversation

@judithroth

Copy link
Copy Markdown
Contributor

The documents assets in the shadow root did not respect he relative url, so they were trying to load /assets/... instead of loading //assets/...

Ticket

https://community.openproject.org/wp/COMMS-833

What are you trying to accomplish?

Make assets for documents work when RAILS_RELATIVE_URL_ROOT is set.

What approach did you choose and why?

Add a new method raw_variable_asset_path which has to be used when the rails link helpers (stylesheet_link_tag, javascript_include_tag, etc) are not used.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@judithroth judithroth self-assigned this Jul 22, 2026
Documents don't work properly with rails relative url

https://community.openproject.org/wp/COMMS-833

The documents assets in the shadow root did not respect he relative url,
so they were trying to load <base-url>/assets/... instead of loading
<base-url>/<relative-url>/assets/...
@judithroth
judithroth force-pushed the bug/comms-833-documents-don-t-work-properly-with-rails-relative-url branch from b12a961 to 9572fd7 Compare July 22, 2026 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant