Content Management and Capture

 View Only
  • 1.  how to determine the JavaScript error in ICN plugin?

    Posted Mon June 28, 2021 08:21 PM

    The myPlugin plug-in conatains errors.

    An error occurred when evaluating the JavaScript for the myPlugin plug-in.

    here is the only js file in the plugin:

    require(["dojo/aspect"],

    aspect.around(ecm.model.Item, "getBookmark", function (originalGetBookmark) {

    return function (item, version, desktopId, repositoryId, repositoryType, templateName, wcProxy) {

    var url = originalGetBookmark(item, version, desktopId, repositoryId, repositoryType, templateName, wcProxy);

    url = url.replace(/repositoryType=p8($|&)/, "");

    url = url.replace(/template_name=\w*($|&)/, "");

    if (url.indexOf("vsId=") >= 0) {

    url = url.replace(/docid=[\w|%|-]*($|&)/, "");

    }

    return url;

    };

    }));

    the plugin actually works (with ?debug=true or ?debug=false), but always pops up the error on user's first access to Navigator



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 2.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Wed June 30, 2021 06:47 AM

    Hi,

    Have you tried to add require for ecm.model.Item?



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 3.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Fri July 02, 2021 01:59 PM

    still no success.

    further testing shows the plugin works immediately after New plugin/Load/Save but does not work (with error message) after logout-login.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 4.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Mon July 05, 2021 01:44 AM

    Please note custom code is not officially supported. You may debug via development tool of the browser to pinpoint the root cause. If this is due to unavailable desktop instance, you may call Desktop.loadDesktop() to load the desktop first.



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 5.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Tue July 13, 2021 12:29 PM

    thanks for the guidance...got it working.

    here is the code for myPlugin.js

    define(["dojo/aspect"], function(aspect) {

    aspect.around(ecm.model.Item, "getBookmark", function (originalGetBookmark) {

    return function (item, version, desktopId, repositoryId, repositoryType, templateName, wcProxy) {

    var url = originalGetBookmark(item, version, desktopId, repositoryId, repositoryType, templateName, wcProxy);

    url = url.replace(/repositoryType=p8($|&)/, "");

    url = url.replace(/template_name=\w*($|&)/, "");

    if (url.indexOf("vsId=") >= 0) {

    url = url.replace(/docid=[\w|%|-]*($|&)/, "");

    }

    url = url.replace(/&$/,""); //above occasionally leaves trailing amper

    return url;

    }

    });

    });

    empty myPlugin.css



    #IBMContentNavigator(ICN)
    #Support
    #SupportMigration


  • 6.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Fri October 13, 2023 11:09 AM

    hello, I am getting a similar java script error when i deployed my working custom plugin in 9.1.9 env.

    An error occurred when evaluating the JavaScript for the DatacapValidationsPlugin plug-in.

    Dev tool says - 

    GET http://chws6884:9081/navigator/datacap/model/Util.js 404 (Not Found)

    I have decompiles the IBM datacap 919 plugin (DatacapWebPlugin.jar) and see that the Util.js files exists.

    \WebContent\datacap\model\Util.js

    Can someone highlight what am missing. 

    Thanks,

    Vivek



    ------------------------------
    Vivek Arya
    ------------------------------



  • 7.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Thu December 07, 2023 04:11 PM

    Hi Vivek,

    I am also facing same issue after Upgrading Datacap to 919 from 916 and ICN to 3.0.13, working copy of custom plugin is throwing error same error batch.js not found.

    I tried many things like restructing the custom plugin to DcSamplePlugin provided in datacap installer but nothing worked.

    Please let us know if your issue is resolved and steps involved in it .

    Thanks,



    ------------------------------
    Rahul Patidar
    ------------------------------



  • 8.  RE: how to determine the JavaScript error in ICN plugin?

    Posted Thu December 07, 2023 04:36 PM

    Hello, I was able to decompile the original base DatacapWebPlugin jar and locate some missing files but it did not help much. As IBM has done changes to dojo and ICN package and old custom plugin does not work.

    it's sad that there is no documentation about all the IBM changes that has been done so we are still troubleshooting to resolve the custom plugin issue. 

    Thanks,

    Vivek Arya



    ------------------------------
    Vivek Arya
    ------------------------------