admin管理员组文章数量:1366372
In my work shopware project I build the storefront and administration, the storefront loads with only html no styling applied, checking the source code it shows that it's trying to use:
/theme/f8a7b9a4e5582a69b04ec3de11ef1cdf/css/all.css
but visiting that file shows 404
This is my build storefront script description, i pasted the code on chatgpt and told it to describe it since i don't know if i can share code.
This is a bash script designed to handle various tasks related to building and installing dependencies for a Shopware project, specifically for its storefront. Here's a breakdown of the script's functionality:
Key Variables:
CWD: Stores the current working directory of the script.
PROJECT_ROOT: The root directory of the project, or a fallback value is set if PROJECT_ROOT is not already defined.
STOREFRONT_ROOT: Path to the storefront directory within the project, or a fallback if STOREFRONT_ROOT is not defined.
BIN_TOOL: Path to the binary tool (console), or ci if running in a continuous integration (CI) environment.
Script Breakdown:
Project Setup:
If the script is running in a CI environment, it switches BIN_TOOL to a ci binary and makes it executable.
Sets PROJECT_ROOT and STOREFRONT_ROOT based on the current working directory and defined variables.
Build the Storefront:
The script checks if the SHOPWARE_SKIP_BUNDLE_DUMP environment variable is not set. If not, it runs bundle:dump to prepare any bundles.
The feature:dump command is executed with an empty DATABASE_URL.
Install npm Dependencies for Plugins:
If the jq command-line tool is installed, it reads the var/plugins.json file, extracts plugin information (such as path and technical name), and installs npm dependencies for each plugin that needs it.
It installs dependencies by running npm clean-install if a package-lock.json file exists or npm install otherwise.
If jq is not installed, a message is printed saying that it can't check for required npm installations.
Storefront npm Setup:
The script installs npm dependencies for the storefront using the clean-install command.
It runs a custom script (copy-to-vendor.js) that likely handles copying necessary storefront files to the vendor directory.
It runs the npm run production command to build the production assets for the storefront.
Asset Installation:
If SHOPWARE_SKIP_ASSET_COPY is not set, it runs asset:install to install the necessary assets.
Theme Compilation:
If command-line arguments are provided, it runs the theme:compile command with the specified theme (-s option).
If no arguments are passed, it runs theme:compile without any arguments.
Purpose:
This script automates the process of setting up a Shopware storefront project, including managing npm dependencies for plugins and the storefront itself, preparing assets, and compiling the theme. It provides flexibility for both local development and CI environments.
Let me know if you need further clarification!
In my work shopware project I build the storefront and administration, the storefront loads with only html no styling applied, checking the source code it shows that it's trying to use:
https://to-d2c-shop.ddev.site/theme/f8a7b9a4e5582a69b04ec3de11ef1cdf/css/all.css
but visiting that file shows 404
This is my build storefront script description, i pasted the code on chatgpt and told it to describe it since i don't know if i can share code.
This is a bash script designed to handle various tasks related to building and installing dependencies for a Shopware project, specifically for its storefront. Here's a breakdown of the script's functionality:
Key Variables:
CWD: Stores the current working directory of the script.
PROJECT_ROOT: The root directory of the project, or a fallback value is set if PROJECT_ROOT is not already defined.
STOREFRONT_ROOT: Path to the storefront directory within the project, or a fallback if STOREFRONT_ROOT is not defined.
BIN_TOOL: Path to the binary tool (console), or ci if running in a continuous integration (CI) environment.
Script Breakdown:
Project Setup:
If the script is running in a CI environment, it switches BIN_TOOL to a ci binary and makes it executable.
Sets PROJECT_ROOT and STOREFRONT_ROOT based on the current working directory and defined variables.
Build the Storefront:
The script checks if the SHOPWARE_SKIP_BUNDLE_DUMP environment variable is not set. If not, it runs bundle:dump to prepare any bundles.
The feature:dump command is executed with an empty DATABASE_URL.
Install npm Dependencies for Plugins:
If the jq command-line tool is installed, it reads the var/plugins.json file, extracts plugin information (such as path and technical name), and installs npm dependencies for each plugin that needs it.
It installs dependencies by running npm clean-install if a package-lock.json file exists or npm install otherwise.
If jq is not installed, a message is printed saying that it can't check for required npm installations.
Storefront npm Setup:
The script installs npm dependencies for the storefront using the clean-install command.
It runs a custom script (copy-to-vendor.js) that likely handles copying necessary storefront files to the vendor directory.
It runs the npm run production command to build the production assets for the storefront.
Asset Installation:
If SHOPWARE_SKIP_ASSET_COPY is not set, it runs asset:install to install the necessary assets.
Theme Compilation:
If command-line arguments are provided, it runs the theme:compile command with the specified theme (-s option).
If no arguments are passed, it runs theme:compile without any arguments.
Purpose:
This script automates the process of setting up a Shopware storefront project, including managing npm dependencies for plugins and the storefront itself, preparing assets, and compiling the theme. It provides flexibility for both local development and CI environments.
Let me know if you need further clarification!
Share
Improve this question
asked yesterday
Gjergj KadriuGjergj Kadriu
5984 silver badges10 bronze badges
1 Answer
Reset to default 0I assume you have a problem when building a theme. Please deactivate unnecessary plugins/extensions to troubleshoot theme build issues and facilitate verification.
1. Use ddev ssh
to check the public\theme
folder:
Hashed theme folder containing CSS and JS files
Sales Channel theme ID containing other assets
Verify the hash folder matches ../theme/.../css/all.css. (The hash folder will be generated new when you change the theme)
2. If it does not exist or match, rerun ./bin/build-storefront.sh within your container and identify any issues during the build process. The expected outcome is completing assets:install
, theme:compile
, and cache:clear.
You can run separate commands such as php bin/console assets:install
本文标签: Theme allcss file on shopware 64120 shows 404page rendered without stylesStack Overflow
版权声明:本文标题:Theme all.css file on shopware 6.4.12.0 shows 404 - page rendered without styles - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743792223a2539784.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论