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

BUGFIX: Correctly append cache buster value to existing query parameters for included CSS & JS #3753

Merged
merged 1 commit into from Mar 17, 2024

Conversation

Sebobo
Copy link
Member

@Sebobo Sebobo commented Mar 15, 2024

Prevent invalid urls when static Uris already have query parameters and Neos UI tries to add its own cache buster value.

@Sebobo Sebobo added Bug Label to mark the change as bugfix 8.3 labels Mar 15, 2024
@Sebobo Sebobo changed the title BUGFIX: Correctly append cache buster value BUGFIX: Correctly append cache buster value to existing query parameters for included CSS & JS Mar 15, 2024
@Sebobo Sebobo marked this pull request as ready for review March 15, 2024 11:10
@@ -95,7 +95,7 @@ protected function build(array $resourceArrayToSort, \Closure $builderForLine)
$hash = substr(md5_file($resourceExpression), 0, 8);
$resourceExpression = $this->resourceManager->getPublicPackageResourceUriByPath($resourceExpression);
}
$finalUri = $hash ? $resourceExpression . '?' . $hash : $resourceExpression;
$finalUri = $hash ? $resourceExpression . (str_contains($resourceExpression, '?') ? '&' : '?') . $hash : $resourceExpression;
Copy link
Member

@mhsdesign mhsdesign Mar 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this really the flow way of doing that? With Flow 9 we could use neos/flow-development-collection#3316

but for 8.3 this might be all weve got :/

@Sebobo Sebobo merged commit 102cd7c into 8.3 Mar 17, 2024
10 of 11 checks passed
@Sebobo Sebobo deleted the bugfix/cache-buster-fix branch March 17, 2024 13:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.3 Bug Label to mark the change as bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants