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

EZP-31912: Fixed decorating image URLs with proper absolute prefix #110

Merged
merged 4 commits into from
Sep 30, 2020

Conversation

alongosz
Copy link
Member

@alongosz alongosz commented Sep 22, 2020

Question Answer
JIRA issue EZP-31912
Type bug
Target eZ Platform version v3.1+
BC breaks no
Doc needed ibexa/documentation-developer#1142

This PR fixes decorating image URLs with custom url_prefix.

While the JIRA ticket describes complicated AWS case, in fact URL prefix can be used with local (default) binary handler and it was the part which was broken.

In 2.5 we used to fetch io.url_prefix from dynamic (SiteAccess-aware) configuration for AbsolutePrefix which decorates media URLs.

Since dynamic settings feature was no longer possible due to Symfony 4+ Container changes, we've rewritten the decorating to make the implementation fetch the proper setting.

It seems however that what should be used at the line above is actually getUrlPrefix instead of getLegacyUrlPrefix. See the parameter names fetched by both methods.

TODO:

  • See if DI Container test coverage can be added for this case to avoid another regression in the future

Checklist:

  • PR description is updated.
  • Tests are implemented.
  • Added code follows Coding Standards (use $ composer fix-cs).
  • PR is ready for a review.

@alongosz
Copy link
Member Author

@ezsystems/documentation-team qualification of "doc needed" changed, but I got you covered there ;)

@micszo micszo self-assigned this Sep 23, 2020
Co-authored-by: Adam Wójs <adam.wojs@ez.no>
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Member

@micszo micszo left a comment

Choose a reason for hiding this comment

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

Retested successfully with single and multi repo setup using io.url_prefix.
Tested on eZ Platform EE v3.1.2 with diff.

@micszo micszo removed their assignment Sep 30, 2020
@alongosz alongosz merged commit edfd1ac into 1.1 Sep 30, 2020
@alongosz alongosz deleted the fix-1.1/ezp-31912-fix-io-url-prefix branch September 30, 2020 10:38
@alongosz alongosz changed the title EZP-31912: Fixed decorating binary files URLs with proper absolute prefix EZP-31912: Fixed decorating image URLs with proper absolute prefix Sep 30, 2020
Steveb-p pushed a commit that referenced this pull request May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working QA approved
Development

Successfully merging this pull request may close these issues.

8 participants