Content Management and Capture

 View Only
Expand all | Collapse all

Could not load dojo-dependencies from DatacapWebPlugin in ICN custom plugin

  • 1.  Could not load dojo-dependencies from DatacapWebPlugin in ICN custom plugin

    Posted Fri December 04, 2020 02:42 PM

    Hello,

    we are using IBM Content Navigator (3.0.8) to validate documents processed in IBM Datacap (9.1.6). IBM Datacap installation contains DatacapWebPlugin (ICN plugin), where UI for ICN is defined.

    We would like to customize this UI, therefore we implemented our IBM navigator custom plugin(CustomPlugin). In CustomPlugin I would like to add some functionality before (aspect.before) some methods from default DatacapWebPlugin are executed.

    When I require some dojo classes from DatacapWebPlugin in CustomPlugin, classes are fetched, but if those classes require another dojo classes, those, some of them could not be fetched (404-not found).

    Main JS in CustomPlugin.js:

    //# sourceURL=DCP.js

    require([

    "dojo/_base/declare",

    "dojo/_base/lang",

    "dojo/i18n",

    "dojo/aspect",

    "datacapweb/client/FieldDetailWidget" //loading clas from DatacapWebPlugin

    ], function(

    declare,

    lang,

    i18n,

    aspect,

    FieldDetailWidget

    ) {

    console.log("loaded");

    });

    DatacapWebPlugin project structure

    com/

    ibm/.../

    WebContent/

    datacap/

    FieldDetailWidget.js

    ....

    datacapweb/

    ....

    FieldDetailWidget.js from DatacapWebPlugin:

    define([

    ... //some dojo dependencies

    "datacapweb/model/properties/controller/ControllerManager",

    "datacapweb/model/properties/registry/RegistryManager",

    "datacapweb/model/util/DCUtil",

    "datacapweb/model/util/DCConstant",

    "datacapweb/widget/editors/extras/DCSnippet",

    "datacapweb/client/FieldDetailWidgetCustomization",

    "datacap/widget/EDSSupportMixin",

    "datacap/model/Field",

    "datacap/model/DatacapObject",

    "dojo/text!./templates/FieldDetailWidget.html"

    ],

    function(

    ... //some dojo dependencies

    ControllerManager,

    RegistryManager,

    DCUtil,

    DCConstant,

    DCImageSnippet,

    FieldDetailWidgetCustomization,

    EDSSupportMixin,

    Field,

    DatacapObject,

    template) {

    ...

    });

    When I load CustomPlugin in ICN, then I get error in browser console, that

    EDSSupportMixin.js, Field.js and DatacapObject.js could not be found.

    1. I found out, that GET request, which should get those files contains wrong url: host/navigator/datacap/widget/EDSSupportMixin.js Correct should be host/navigator/plugin/DatacapWebPlugin/getResource/datacap/widget/EDSSupportMixin.js
    2. The problem occurs only if some class from DatacapWebPlugin requires class from "datacap" folder. E.g.:
      1. "datacap/widget/EDSSupportMixin"

    Strange thing is, that on UAT environment we have no such a issue. Could you provide some hints ?

    Notes:

    • Default DatacapWebPlugin was provided with Datacap installation and I could not modify it directly.
    • CustomPlugin is below DatacapWebPlugin in ICN->admin desktop-> plugins, so CustomPlugin should be loaded after DatacapWebPlugin.
    • On UAT environment: ICN 3.0.6, Datacap 9.1.6 there is no problem with dependencies. I cannot even see GET requests, which are getting EDSSupportMixin.js, Field.js or DatacapObject.js

    Thank you for your help.

    Peter



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: Could not load dojo-dependencies from DatacapWebPlugin in ICN custom plugin

    Posted Thu December 10, 2020 01:43 AM

    Please contact Datacap support to look into the dependency issue in the DatacapWebPlugin JS.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: Could not load dojo-dependencies from DatacapWebPlugin in ICN custom plugin

    Posted Thu December 10, 2020 03:00 PM

    I would like to add dojo versions:

    • Dojo Version1.10.4 (f4fef70) - on UAT environment, where everything works fine
    • Dojo Version1.15.3 (NaN) - on problematic environment


    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: Could not load dojo-dependencies from DatacapWebPlugin in ICN custom plugin

    Posted Mon April 15, 2024 02:40 PM

    Hello, 

    I am facing the same issue. Did you find the solution for this?



    ------------------------------
    Muhammad Danish
    ------------------------------