OroCRM Forums

Covering OroCRM topics, including community updates and company announcements.

Forums Forums OroCRM OroCRM – Installation/Technical Issues or Problems Empty dashboard in production mode

This topic contains 7 replies, has 3 voices, and was last updated by  Pieter 8 years, 11 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
    Topic
  • #26488

    Pieter
    Participant

    Hi guys,

    We dedided to have a look at the latest and gratest of OroCRM so installed it on a lab VM. First thing we ran into; Installation using HHVM seems broken (it tries to run hhvm –php somewhere and misforms some command it tries to execute in the DB migration scripts). So we assume HHVM is not supported at this point.

    So we did a fallback to PHP5.6 and now got trough the install (CLI) with sample data. All is fine in development mode when logging in dev mode.

    However in production mode the dashboard is gone (while running the same user, in app_dev it works fine), also many views seem to miss data. It seems to be a JS issue as there are some errors visible in the console that seem to indicate something is missing. No 404’s to JS files however.

    Uncaught TypeError: Cannot read property ‘normalize’ of undefined : oro.min.js:350
    calendar-view.js:530 Uncaught TypeError: undefined is not a function : calender-view.js:530

    Tried to redo assets install etc. to no avail.

    Is this a known issue? Or where do I start to find the issue?

    Thanks,

Viewing 7 replies - 1 through 7 (of 7 total)
  • Author
    Replies
  • #26489

    Yevhen Shyshkin
    Participant

    Hello, Pieter.

    Unfortunately, HHVM is not supported for now.

    As for work in prod mode – please, remove cache (rm -r /app/cache/*) and do cache clear in prod mode (php app/console cache:clear –env prod) – after that prod mode should work fine.

    If you still have issues – please, check php log for errors and put them here – we’ll try to help you.

    Best regards, Yevhen.

    #26490

    Pieter
    Participant

    Hi Yevhen,

    For some reason php-fpm out of the box came with very little logging and I overlooked that (only got that for OroCRM, the proof of concept PHP based projects we run HHVM).

    So the culprit is this (from symfony prod log);
    [2015-04-03 23:30:55] request.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: “No route found for “GET /bundles/ready.js”” at /srv/www/crm/app/cache/prod/classes.php line 2263 {“exception”:”[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException: No route found for \”GET /bundles/ready.js\” at /srv/www/crm/app/cache/prod/classes.php:2263, Symfony\\Component\\Routing\\Exception\\ResourceNotFoundException: at /srv/www/crm/app/cache/prod/appProdUrlMatcher.php:5752)”} []

    No idea how that came to be and why it is no problem in dev node. Perhaps the failed HHVM based installs messed something up, so Will first try a complete clean install.

    #26491

    Pieter
    Participant

    Clean install of crm-application.tar.bz2 (1.4.1) using php-cli, exact same result;
    Via app.php => 404 tot ready.js and no dashboard widgets
    Via app_dev.php => No issues, all works fine

    For me to reproduce in PHP 5.6 (via PHP-FPM/NGINX)
    extract tarball
    php app/console oro:install –drop-database –sample-data –verbose
    … input data
    … run is OK, clear cache etc etc.
    … login via browser via app.php or / => Above issue
    … remove restriction from app_dev
    … login via browser via app_dev.php => No issues
    (PS also had to crank up max_exec_time and max_mem for the first run).

    Can clear the cache as many times as I want, issue remains when using app.php.

    In dev the JS is loaded from;
    /bundles/oroui/js/requirejs/ready.js
    In prod the JS is 404ed from;
    /bundles/ready.js

    If I copy the one from the bundle to web/bundles/ the PROD version stops at
    TypeError: callback is not a function
    calendar-view.js

    Edit;
    – No errors logged in php error log (also no 500 or 503 so that seems normal).
    – The prod symfony logs show above error when the JS file 404’s, when copying that JS file manually the error is gone, but then calendar-view.js (line 530, kol 16) throws a JS error in browser, seems in catch, and no widgets shown. Calls an undifned function callback(), which might be related to standard.js, don’t know.
    – PHP 5.6.7, Ubuntu 14.04, just stock install + sample data from the tarball on your download page

    #26492

    Rodolfo
    Participant

    Try this:

    #26493

    Pieter
    Participant

    (PS don’t see any of the js assets in there what are we looking for?)

    #26494

    Rodolfo
    Participant

    I also don’t have route to ready.js But I found these files on the path bellow:

    find . -name ‘ready.js’
    ./vendor/oro/platform/src/Oro/Bundle/UIBundle/Resources/public/js/requirejs/ready.js
    ./web/bundles/oroui/js/requirejs/ready.js

    Honestly, I thought that running assetic:dump + assets:install would solve your problem. The weird thing is you said that it’s working well on app_dev.php. Are you using Nginx or Apache? Did you configured the webserver’s files properly according with the official symfony2 documentation?

    Did you try this: php app/console cache:warmup –env=prod –no-debug

    #26495

    Pieter
    Participant

    Did you try this: php app/console cache:warmup –env=prod –no-debug
    > Nope, but issue remains.

    Nginx, config;

    The 8080 is because it’s behind Varnish (which at this time does not cache anything, the issue remains when going to 8080 directly).

Viewing 7 replies - 1 through 7 (of 7 total)

The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.

Back to top