Closed H4Mm3r closed 1 year ago
I've found this error in the browser console :
Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET https://dev/.....fr/_themes/acme/griotte-bootstrap-theme/bundles/fosjsrouting/js/router.min.js"" at /opt/sylius/dev/vendor/symfony/http-kernel/EventListener/RouterListener.php line 127
I'm using bootstrap-theme for the frontoffice but no changes on the admin bundle.
This script should be help you
Related : https://github.com/Sylius/SyliusThemeBundle/issues/91
#!/usr/bin/env bash
# Related issue : https://github.com/Sylius/SyliusThemeBundle/issues/91
#./bin/fix-theme-assets.sh
# Requirements:
# - jq ~= 1.6
set -o errexit;
set -o nounset;
set -o pipefail;
goToRoot() {
local currentDir;
currentDir=$( cd "$( dirname $0 )" && pwd )
cd "${currentDir}/../"
}
fix_theme() {
local themeName="${1:?}"
mkdir -p "public/_themes/${themeName}";
unlink "public/_themes/${themeName}/bundles" 2> /dev/null || true;
ln -s "../../../bundles" "public/_themes/${themeName}/bundles";
}
fix_themes() {
while IFS= read -r -d '' themeConfig
do
local themeName;
themeName=$(jq 'if .extra? | has("sylius-theme") then .name else null end' -r "${themeConfig}")
if [ "null" != "${themeName}" ]; then
fix_theme "${themeName}"
fi
done < <(find "./themes/"* -maxdepth 1 -name 'composer.json' -print0)
}
main() {
fix_themes
}
goToRoot
main
This script should be help you
Related : Sylius/SyliusThemeBundle#91
#!/usr/bin/env bash # Related issue : https://github.com/Sylius/SyliusThemeBundle/issues/91 #./bin/fix-theme-assets.sh # Requirements: # - jq ~= 1.6 set -o errexit; set -o nounset; set -o pipefail; goToRoot() { local currentDir; currentDir=$( cd "$( dirname $0 )" && pwd ) cd "${currentDir}/../" } fix_theme() { local themeName="${1:?}" mkdir -p "public/_themes/${themeName}"; unlink "public/_themes/${themeName}/bundles" 2> /dev/null || true; ln -s "../../../bundles" "public/_themes/${themeName}/bundles"; } fix_themes() { while IFS= read -r -d '' themeConfig do local themeName; themeName=$(jq 'if .extra? | has("sylius-theme") then .name else null end' -r "${themeConfig}") if [ "null" != "${themeName}" ]; then fix_theme "${themeName}" fi done < <(find "./themes/"* -maxdepth 1 -name 'composer.json' -print0) } main() { fix_themes } goToRoot main
This is exactly what I needed. It works. Thanks a lot for the solution.
I'm closing this issue as the problem comes with SyliusThemeBundle.
Hello,
It seems that this plugin isn't working with Sylius 1.12.8.
"Next" or "Create new" button don't do anything.
Any known issue ?
Thanks by advance.