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

Cannot resolve images shipped with fixtures #885

Open
Ferror opened this issue Dec 7, 2022 · 1 comment
Open

Cannot resolve images shipped with fixtures #885

Ferror opened this issue Dec 7, 2022 · 1 comment
Labels
Bug Docker Docker-related issues and PRs. Frontend

Comments

@Ferror
Copy link
Contributor

Ferror commented Dec 7, 2022

Environement

Fresh installation of Sylius-Standard by docker on 7.12.2022. Development and production environment.

Introduction

With adding webpack to the Sylius and Sylius-Standard the problem of missing thumbnails generated by liip package occurred. I don't know what the reason behind it is, but I would like to document the issue. Based on Sylius Community Slack the problem does exist without the usage of docker too.

Screenshot 2022-12-07 at 23 01 17

Screenshot 2022-12-07 at 23 00 11

Example

We have http://localhost/media/cache/resolve/sylius_shop_product_thumbnail/f4/cf/35bf6a62b06e31be473ac49d0ec9.jpg imageit does NOT exist inpublic/media` directory for Nginx and PHP containers. Well, the directory is empty.

Therefore we are missing some steps in Docker or Webpack.

The file responsible for loading the image -> https://github.com/Sylius/Sylius/blob/1.12/src/Sylius/Bundle/ShopBundle/Resources/views/Product/_mainImage.html.twig

Logs

[2022-12-07T22:33:21.964352+00:00] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException:
"Source image for path "6b/fd/1c6ee947b9a6cd20d5599be9322a.jpg" could not be found"
at /srv/sylius/vendor/liip/imagine-bundle/Controller/ImagineController.php line 168 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): Source image for path \"6b/fd/1c6ee947b9a6cd20d5599be9322a.jpg\" could not be found at /srv/sylius/vendor/liip/imagine-bundle/Controller/ImagineController.php:168)

[previous exception] [object] (Liip\\ImagineBundle\\Exception\\Binary\\Loader\\NotLoadableException(code: 0): Source image not resolvable \"6b/fd/1c6ee947b9a6cd20d5599be9322a.jpg\" in root path(s) \"/srv/sylius/public/media/image\" at /srv/sylius/vendor/liip/imagine-bundle/Binary/Locator/FileSystemLocator.php:47)"} []

@Ferror Ferror added Bug Docker Docker-related issues and PRs. Frontend labels Dec 7, 2022
@Ferror Ferror changed the title Can not resolve images shipped with fixtures Cannot resolve images shipped with fixtures Dec 7, 2022
@valentin-harrang
Copy link

Same issue? #893

frozenpixel added a commit to frozenpixel/Sylius-Celletech that referenced this issue Feb 22, 2023
frozenpixel added a commit to frozenpixel/Sylius-Celletech that referenced this issue Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Docker Docker-related issues and PRs. Frontend
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants