Question

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!

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top