问题
I've developed a sylius based site and all is working fine in development environment, but some problems have arisen when deploying it on the production environment:
In Frontend: compiled frontend.js return an error:
(function ($) { Uncaught TypeError: undefined is not a function frontend.js:27 (anonymous function)
jquery 1.8.0 is included before the line that produces the error.
In Backend: no errors seems to arise but select widgets doesn't render (none of them).
The steps done to deploy the site in prod were:
- Migrated the database.
Installed in production environmnet:
php app/console sylius:install -e prod
Cleared and warmed up the cache:
php app/console cache:clear --env=prod --no-debug php app/console cache:warmup --env=prod --no-debug
Dumped assets:
php app/console assetic:dump --env=prod
Curiously, when debug parameter is set to true in app.php none of these errors arise.
Thank you very much for your help!
回答1:
You should run Assetic dump command with the no-debug option. php app/console assetic:dump --env=prod --no-debug
.
来源:https://stackoverflow.com/questions/19793086/sylius-site-not-deploying-correctly-in-production