Closed LiaraAlis closed 1 year ago
Maybe we have the same problem here as in https://github.com/dockware/dockware/issues/56?
I didnt had the time to look into it yet
The cause of this problem also happens for the admin watcher running at localhost:8181 instead of admin-projectname.dev.localhost
This all happens because the platform-local module is not being loaded.
On https://github.com/shyim/shopware-docker/blob/v1/swdc#L59 is a file check for src/Kernel.php
, a file which no longer exists in newer Shopware versions (tested with 6.4.16.1 and 6.4.12.0, exists in the latter, but not in the former) There's also a check for src/Core/composer.json
but that file doesn't exist in either version.
If I comment out both line 59 and 61, so it always include platform-local, then all my problems are solved.
@shyim As a shopware expert, can you say something about this checks? :P
For reference, the src/Kernel.php
file was removed in https://github.com/shopware/production/commit/a9e49a9f87b46b75b5636be68c12d9f30ef83cd3 but it still exists in the development template
src/Core/composer.json
never seems to have existed at that file location in either the production or the development template
Update: While the watchers are running on the correct urls again, I still have problems with missing assets in the storefront watcher, as initially described by @LiaraAlis
I seem to be missing this piece of code in vendor/shopware/storefront/Resources/app/storefront/build/proxy-server-hot/index.js
This seems to be because https://github.com/shyim/shopware-docker/blob/v1/modules/platform/hot-proxy-patched.js is replacing that file when running https://github.com/shyim/shopware-docker/blob/v1/modules/platform/storefront-watch.sh#L21
Final update (from me):
Because it fails that src/Kernel.php
filecheck mentioned yesterday it runs platform/storefront-watch.sh
instead of platform-local/storefront-watch.sh
platform/storefront-watch.sh
copies the (very old) file hot-proxy-patched.js
, which is missing some code, to build/proxy-server-hot/index.js
, permanently messing up the hot reload for the project you're running.
Even after fixing the filecheck, if it has already replaced build/proxy-server-hot/index.js
in your project, then assets still won't work correctly for that project. Either clone a new production template, or replace the build/proxy-server-hot/index.js
with the correct one from https://github.com/shopware/platform/blob/trunk/src/Storefront/Resources/app/storefront/build/proxy-server-hot/index.js
@shyim I can not confirm that this issue is resolved with this last patch. I think that it is also needed to update the hot-proxy-patched.js
as mentioned by @daniel-memo-ict. Using the original file, the watcher is working when executing bin/watch-storefront.sh
, even in my case the fonts couldn't be loaded and the size of the page is wrong. But maybe this is a problem with my theme.
But that file should not be copied anymore. rm -rf vendor && composer install
@LiaraAlis Indeed, if you've started the storefront watcher for a project, before getting this fix, then the hot proxy script has been permanently replaced. As @shyim said, removing the vendor folder and doing a composer install will make sure you get the original hot proxy script back. Replacing it manually as I've mentioned before will also work.
@shyim What is/was the use case for the hot-proxy-patched.js
file?
It was required for a really old shopware versions before I fixed it in the core
I did all this mentioned… but I must be stupid because I did it again and now it is working. đŸ˜… Okay, I never said anything. đŸ¤£
Hi,
using.localhost:9998 the following error occur:
swdc storefront-watch
with the production template does not work propably. Accessing the storefront under http://