sylius:站点未在生产中正确部署 [英] sylius: site not deploying correctly in production

查看:36
本文介绍了sylius:站点未在生产中正确部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开发了一个基于 sylius 的站点,在开发环境中一切正常,但在生产环境中部署时出现了一些问题:

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:

在前端:编译的frontend.js返回一个错误:

In Frontend: compiled frontend.js return an error:

(function ($) { Uncaught TypeError: undefined is not a function frontend.js:27(匿名函数)

(function ($) { Uncaught TypeError: undefined is not a function frontend.js:27 (anonymous function)

jquery 1.8.0 包含在产生错误的行之前.

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).

在 prod 中部署站点的步骤是:

The steps done to deploy the site in prod were:

  1. 迁移了数据库.
  2. 安装在生产环境中:

  1. Migrated the database.
  2. 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
    

  • 奇怪的是,当 app.php 中的 debug 参数设置为 true 时,这些错误都不会出现.

    Curiously, when debug parameter is set to true in app.php none of these errors arise.

    非常感谢您的帮助!

    推荐答案

    您应该使用 no-debug 选项运行 Assetic dump 命令.php app/console assetic:dump --env=prod --no-debug.

    You should run Assetic dump command with the no-debug option. php app/console assetic:dump --env=prod --no-debug.

    这篇关于sylius:站点未在生产中正确部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆