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

RTE and media picker should route medias the same way in the Delivery API #16550

Merged
merged 3 commits into from
Jun 4, 2024

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Jun 4, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #16416

Description

As described in #16416, the Delivery API outputs different media routes for the media picker and medias in RTE. This PR ensures that:

  1. Media picker and RTE uses the same implementation (IApiMediaUrlProvider) to calculate media routes in the Delivery API.
  2. The Delivery API respects WebRoutingSettings.UrlProviderMode.

Testing this PR

Given a document with a media picker and an RTE (with a media inside), verify that the Delivery API output:

  1. Contains the same media route (URL) for both properties.
  2. Respects WebRoutingSettings.UrlProviderMode - e.g. setting it to explicitly render absolute URLs.
  3. Also works when outputting RTE as JSON.

Breaking change

This PR is behaviourally breaking. But the current behaviour is a bug - it should not behave like that.

@Zeegaan Zeegaan merged commit 3dace4f into release/13.4 Jun 4, 2024
10 of 13 checks passed
@Zeegaan Zeegaan deleted the v13/fix/delivery-api-media-routing branch June 4, 2024 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants