Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-10726

moment.js: Cannot read property 'humanize' of undefined

XMLWordPrintable

    • Icon: Bug Report Bug Report
    • Resolution: Duplicate
    • Icon: L3 - Default L3 - Default
    • None
    • 7.11.0
    • tasklist
    • None
    • Vanilla WildFly 17.0.1 with camunda-webapp-jboss-7.11.0.war
      Quickstart Tomcat with 7.11.0

      Using any other locale than en.json in Tasklist will cause moment.js to throw an error:

      deps.js?bust=7.11.0:23563 TypeError: Cannot read property 'humanize' of undefined
      at Moment.from (deps.js?bust=7.11.0:169999)
      at updateTime (deps.js?bust=7.11.0:94974)
      at updateMoment (deps.js?bust=7.11.0:95008)
      at deps.js?bust=7.11.0:95025
      at Scope.$digest (deps.js?bust=7.11.0:27136)
      at Scope.$apply (deps.js?bust=7.11.0:27496)
      at t.done (camunda-tasklist-ui.js?bust=7.11.0:1)
      at camunda-tasklist-ui.js?bust=7.11.0:1
      at p.callback (camunda-tasklist-ui.js?bust=7.11.0:1)
      at p.<anonymous> (camunda-tasklist-ui.js?bust=7.11.0:1)

      That's because the function this.locale() is called without any key and therefore tries to access this._locale._abbr which is undefinied, therefore it can't obviously read anything from it.

      I'm not sure whether this bug is related to a bug in moment.js or a bug in the way it's set in the locale.js - however, this will cause the task.due and task.followUp dates to be displayed in the raw form (as attached).

      Steps to reproduce:

      1. Download the Camunda Community Edition Quickstart
      2. Download any non-english locale
      3. Modify the app\tasklist\scripts\config.js to use the downloaded locale only
      4. Set a dueDate on a process

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              mhoffmann Mario-Luca Hoffmann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: