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

Remove prefixed locale on multi sites from glide url #1842

Closed
wants to merge 1 commit into from
Closed

Remove prefixed locale on multi sites from glide url #1842

wants to merge 1 commit into from

Conversation

jonassiewertsen
Copy link
Contributor

When using a multisite, glide will prefix the current locale. As a result, the images can't be found anymore.

A workaround has been, to create symlinks or mess with the Nginx config.

Can't we solve this problem via PHP? Are there cases, where it does make sense to have the locale prefixed to the images?
It would be easy to a config setting inside the assets config file to disable this behavior if someone wants this behavior.

This change would instantly make glide images available on all multisites, without messing with symlinks or config files.

Obviously this code does need a refactor. Before doing that, I wanted to discuss this and ask if such kind of behavior would be merged at all?

When using a multisite, glide will prefix the current locale. As a result, the images can't be found anymore. 

A workaround has been, to create symlinks or mess with the Nginx config. 

Can't we solve this problem via PHP? Are there cases, where it does make sense to have the locale prefixed to the images?
It would be easy to a config setting inside the assets config file to disable this behavior if someone wants this behavior.

This change would instantly make glide images available on all multisites, without messing with symlinks or config files. 

Obviously this code does need a refactor. Before doing that, I wanted to discuss this and ask if such kind of behavior would be merged at all?
@Pixney-William
Copy link
Contributor

+1

@andjsch
Copy link
Contributor

andjsch commented May 17, 2020

I totally agree, there should be an easy way to disable this behaviour. I think it would necessary though, to map it to a config file. The routes config looks like a good place for it after having a first glance into it.

@ebeauchamps
Copy link
Contributor

Actually I can think of some use cases where locale is important, for instance when the packaging for an identical product is different for different markets. You'll definitively want to have different assets each related to a specific locale.

@jonassiewertsen
Copy link
Contributor Author

If done like described, it would be possible to toggle between those to behaviours. Wouldn't that be perfect for your use cases as well @ebeauchamps ?

The difference would be, that the default behaviour would change and you do not need symlinks and stuff for a normal/small multi site. If needed, you can easily change the behaviour.

I would love to work on the integration, but we need to hear from the gents first if it does make sense to put work into this or not.

@ebeauchamps
Copy link
Contributor

"If done like described, it would be possible to toggle between those to behaviours. Wouldn't that be perfect for your use cases?"

Absolutly, I just need a way, even if it isn't the default behaviour.

@jonassiewertsen
Copy link
Contributor Author

This is the correct way to achieve the wanted functionality:
#1953

Therefore I will close this draft.

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.

4 participants