WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Conversation

@martinlagler
Copy link
Member

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #409
License MIT

What's in this PR?

Use media redirect route to fix media url in data tab.

if (null === $this->downloadUrl) {
// The given id must be a number which we replace
$idReplacerNumber = '875421';
$localeToReplace = 'en';
Copy link
Member

@alexander-schranz alexander-schranz Jul 14, 2025

Choose a reason for hiding this comment

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

use {locale} or __locale__ here:

Suggested change
$localeToReplace = 'en';
$localeToReplace = '{locale}';

The en is not unique enough here. If somebody change the admin url to a domain which may contains en letters or a directory it would replace that also. So you need something more unique like {locale}.

you might still need str replace url encoded version of $localeToReplace not sure if symfony router use raw url encode or url encode.

Copy link
Member

Choose a reason for hiding this comment

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

ping @martinlagler :)

Copy link
Member Author

Choose a reason for hiding this comment

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

@alexander-schranz Ups 😅 fixed now.

@alexander-schranz alexander-schranz merged commit bf62a68 into sulu:2.5 Nov 10, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants