sylius: site not deploying correctly in production

試著忘記壹切 提交于 2020-01-05 04:59:06

问题


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:

  1. Migrated the database.
  2. Installed in production environmnet:

    php app/console sylius:install -e prod
    
  3. Cleared and warmed up the cache:

    php app/console cache:clear --env=prod --no-debug
    php app/console cache:warmup --env=prod --no-debug
    
  4. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!