shopware / docker

Running Shopware in Docker for Production
MIT License
32 stars 10 forks source link

Theme not loaded in browser #91

Open evanjamesjackson opened 1 month ago

evanjamesjackson commented 1 month ago

Hello -

I have created a custom Shopware theme that I am compiling with theme:compile. I can see that the two expected theme folders are created under /var/www/html/public/theme: image

I can confirm that my Storefront sales channel is using this theme: image

However, when I load the site, only the 9bf1323b98bdec27166ca597bfbcdaea folder is being loaded, and only its CSS file (no JS): image

In contrast, when running Dockware with the same theme, both folders and all associated CSS and JS are loaded (disregard different GUIDs for the theme folders as this is a different installation): image

Is there some step I'm missing in getting both themes to appear when using this Docker image?

evanjamesjackson commented 1 month ago

An update on this - I have discovered that removing this line https://github.com/shopware/docker/blob/c89dd1d351bf8d1c96fc98c64f12bfd3eb83495f/fpm/rootfs/usr/local/etc/php-fpm.d/docker.conf#L10 makes my theme load properly. Obviously though that breaks environment variables - is there a known way to work around this?

shyim commented 1 month ago

How does your compose / k8s config look like. Do you use s3 for storage or just mounts?

JOPA159 commented 3 weeks ago

Hi I have the same problem as @evanjamesjackson. I am using the example compose config from the README with only volumes, not s3. Is there any solution to this problem?

evanjamesjackson commented 3 weeks ago

How does your compose / k8s config look like. Do you use s3 for storage or just mounts?

Sorry for the delay @shyim. I'm using Docker Compose volume mounts same as @JOPA159 above.

aritas1 commented 3 weeks ago

Im hitting the same problem. docker compose with local volume mounts on my end. for now there is no s3 or k8s involved.

JOPA159 commented 3 weeks ago

Try installing the custom Shopware theme using composer. It solved the problem for me.

shyim commented 3 weeks ago

Can someone setup a example repository as a reproducer?

aritas1 commented 2 weeks ago

I'm not entirely sure if my problem is really related to this issue, but I'm getting the same behavior with the theme:compile command in my image.

My problems seems to be persist in the database. When I use the container image with a blank database, everything works fine. However, problems arise when using our existing database.

Timeline:

Current State:

After trying various solutions, uninstalling and reinstalling themes, adding the deployment-helper or introducing store.shopware.com/swagelletheme via composer, I seem to have ended up in a semi-broken state:

Screenshot 2024-08-06 104531

shyim commented 2 weeks ago

I would also say it's not relatable to that.