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

Save relative URLs of images in database #52

Open
micka-fdz opened this issue Mar 24, 2023 · 4 comments
Open

Save relative URLs of images in database #52

micka-fdz opened this issue Mar 24, 2023 · 4 comments
Labels
help wanted Extra attention is needed

Comments

@micka-fdz
Copy link
Contributor

We need to save relative URLs instead of absolute URLs.

@bc-devle
Copy link

bc-devle commented Mar 25, 2023

Agreed, with full URLs we have to replace domain / subdomain text in database when we change (I did it earlier).

in the meantime here are some requests to do it :
update ps_configuration set value = replace(value, 'old_domain', 'new_domain');
update ps_prettyblocks_lang set state = replace(state, 'old_domain', 'new_domain');

@PrestaSafe
Copy link
Owner

Agreed to, i'll try to find a solution for that, but it could be complicated with virtual uri un multishop. Full domain it's easier when we need to change it.

@micka-fdz
Copy link
Contributor Author

micka-fdz commented Jul 18, 2023

After a discussion with @jf-viguier, we think it would be necessary to store only files path in DB.
URLs can be easily calculated using PrestaShop methods to manage different cases (multishop, multilingual...).

@PrestaSafe
Copy link
Owner

Hi everyone, yes we will change that, but we need to think of all the problems it could generate (prestashop in sub folder, multishop multilang etc...) We will probably use the HelperBuilder with the : $/path/to/img for generating the url.
A lot of tests should be made

@PrestaSafe PrestaSafe added the help wanted Extra attention is needed label Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants