Forums

Covering OroCommerce topics, B2B eCommerce trends, community updates and company announcements.

Forums OroCommerce Require JS not loaded properly

This topic contains 3 replies, has 2 voices, and was last updated by  Rio 3 months, 3 weeks ago.

  • Creator
    Topic
  • #25011

    Rio
    Participant

    Hi Masters,

    In my frontend view (inspect element) there’s only show 8 js files at live server, but in local laptop it’s working properly almost 300 js files, and the errors show that

    “TypeError: $.widget is not a function[Learn More]
    jquery.multiselect.min.js:21:65
    TypeError: e.ech is undefined[Learn More]”

    It means that some dependencies of javascript files are not success loaded… I’ve tried the following steps:
    – oro:platform:update
    – oro:requirejs:build
    – clear:cache

    Is there any missing about installation on my live server (eg: bitnami), Anybody knows about this issue …
    please give some advance …

    Thanks :D

Viewing 3 replies - 1 through 3 (of 3 total)
  • Author
    Replies
  • #25012
    msulima
    msulima
    Moderator

    Hello, Rio.

    You have loaded only 8 js files, because you opened site in prod mode. Under prod mode most of js files compiled to one minimized js file with name oro.min.js.

    When you have loaded almost 300 js files, it means that you opened site in dev mode. In this case all js files will be loaded as is.

    And about error. It seems some of required components in your environment not installed or something else dependency missed in your system.

    Try to reinstall vendors with command composer.phar install (composer.phar file should be located in application`s folder or registered as global component in system, also should be removed folder vendor before reinstalling vendors).

    Also, please check that nodejs module installed in your system and available to run in command line interface for the user under which you will run oro:platform:update.
    Then try to clear cache or remove cache folder. Next run oro:platform:update. It will do all necessary.

    If all required dependency exist – application should work correct.

    And documentation that can help you to install application: https://oroinc.com/b2b-ecommerce/doc/current/install-upgrade


    #25073

    Rio
    Participant

    Hi Msulima,

    Thanks for respond, yes you correct and I found an issue, actually I just created custom javascript on my own bundle and it was worked correctly (dev mode), after compiled become one file oro.min.js there is a trouble on my custom ajax javascript. I have to adapt based on behavior in backbone.js and it’s a bit hard in order to debug the tracing code on oro.min.js :(

    Is there any solution how to solve it or do you have some suggestion best practice how to create custom javascript (jquery ajax call)
    note: ajax submitted at twice times

    Thanks in Advance

    #25076

    Rio
    Participant

    Ah got it Msulima, the error caused by message-queue got broken, finally I stopped and run php app/console oro:message-queue:consume –env=prod -vvv …
    And it’s work …

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

You must be logged in to reply to this topic.

You will be redirected to [title]. Would you like to continue?

Yes No
ssossossosso