docker icon indicating copy to clipboard operation
docker copied to clipboard

Theme not loaded in browser

Open evanjamesjackson opened this issue 1 year ago • 9 comments

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 avatar Jul 05 '24 03:07 evanjamesjackson

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?

evanjamesjackson avatar Jul 11 '24 18:07 evanjamesjackson

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

shyim avatar Jul 12 '24 02:07 shyim

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?

JOPA159 avatar Jul 30 '24 11:07 JOPA159

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.

evanjamesjackson avatar Jul 30 '24 15:07 evanjamesjackson

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

aritas1 avatar Jul 31 '24 09:07 aritas1

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

JOPA159 avatar Jul 31 '24 10:07 JOPA159

Can someone setup a example repository as a reproducer?

shyim avatar Jul 31 '24 14:07 shyim

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:

  • We started using version 6.6.2.0 in late July.
  • We have since upgraded sequentially: 6.6.2.0 → 6.6.3.0 → 6.6.4.0 → 6.6.4.1.

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:

  • It seems that some migrations for the snippets (textbausteine) are missing in the database?
  • Logos appear multiple times.
  • It feels like some parts of the theme's CSS are missing.

Screenshot 2024-08-06 104531

aritas1 avatar Aug 06 '24 09:08 aritas1

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

shyim avatar Aug 07 '24 13:08 shyim

This is fixed by #101

shyim avatar Aug 23 '24 05:08 shyim