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

Frontend plugin cannot be displayed when using the jQuery library embedded in the Webapps

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 7.14.19
    • 7.14.9
    • webapp

    Description

      Environment (Required on creation):

      • Camunda Platform Webaps 7.14.9
      • 7.15 & 7.16 are not affected due to the refactoring made in CAM-12594

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      When configuring a frontend plugin that uses the jQuery library that is part of the Webapps, there is a race condition: When an angularjs view not showing the plugins is opened first and one navigates to the plugins, the same are displayed correctly. However, when the view displaying a plugin is reloaded in the browser (and the Webapp is bootstrapped), the error is shown.

      Steps to reproduce (Required on creation):

      • Configure a frontend plugin that uses the jQuery library embedded in the Webapps
      • Login to the Webapp
      • Navigate to the plugin point
      • Reload the view in the browser

      Observed Behavior (Required on creation):

      Loading indicator is shown forever and the following error is logged to the browser console:

      plugin.js:137 Uncaught Error: [$injector:modulerr] Failed to instantiate module cam.cockpit due to:
      Error: [$injector:modulerr] Failed to instantiate module cockpit.plugin.cockpitEE due to:
      Error: [$injector:modulerr] Failed to instantiate module cockpit.plugin.activityInstance-period due to:
      Error: [$injector:modulerr] Failed to instantiate module cockpit.plugin.activityInstance-period.actions due to:
      Error: [jqLite:nosel] Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element
      ...
      

      Expected behavior (Required on creation):

      The frontend plugin is shown correctly.

      Root Cause (Required on prioritization):

      There is a race condition of bootstrapping the Webapp and loading the frontend plugins.

      Solution Ideas (Optional):

      Move the plugin loading code (https://github.com/camunda/camunda-bpm-webapp/blob/7.14/ui/cockpit/client/scripts/camunda-cockpit-bootstrap.js#L33-L75) until after JQuery and angular are loaded (https://github.com/camunda/camunda-bpm-webapp/blob/7.14/ui/cockpit/client/scripts/camunda-cockpit-ui.js#L173).

      Hints (Optional):

      Apply the fix to Cockpit.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                clifton.davies Clifton Davies
                tassilo.weidner Tassilo Weidner
                Clifton Davies Clifton Davies
                Tassilo Weidner Tassilo Weidner
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce