Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Media Theme URLs using append_version point to wrong resource during local development (OSOE-775) #52

Closed
Piedone opened this issue Jan 18, 2024 · 0 comments · Fixed by #53
Assignees
Labels
bug Something isn't working

Comments

@Piedone
Copy link
Member

Piedone commented Jan 18, 2024

During local development of a Media Theme (I'm trying specifically with this one) you can include static resources like this:

{% assign appleIconUrl = "~/mediatheme/images/apple-touch-icon.png" | href %}
{% link rel:"apple-touch-icon", sizes:"180x180", href:appleIconUrl, append_version:"true" %}

This correctly generates this:

<link href="/mediatheme/images/apple-touch-icon.png" rel="apple-touch-icon" sizes="180x180" />

However, if you add append_version:

{% link rel:"apple-touch-icon", sizes:"180x180", href:appleIconUrl, append_version:"true" %}

Then it'll point to a wrong URL:

<link href="/media/_MediaTheme/Assets/images/apple-touch-icon.png?mediatheme=1830490569" rel="apple-touch-icon" sizes="180x180" />
  • This is most possibly due to some bug in FileVersionProviderDecorator.
  • This happened sometime between OC v1.5 and 1.7, before that it worked well.
  • This only affects local development, not the prod site.
  • Add a second asset inclusion that uses append_version to our sample template so next the UI test can catch this.

Jira issue

@Piedone Piedone added the bug Something isn't working label Jan 18, 2024
@github-actions github-actions bot changed the title Media Theme URLs using append_version point to wrong resource during local development Media Theme URLs using append_version point to wrong resource during local development (OSOE-775) Jan 18, 2024
@wAsnk wAsnk self-assigned this Jan 19, 2024
@wAsnk wAsnk closed this as completed in #53 Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants