Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

  • isc_Canvas_invalidateCache() error in 11.0 since 2016-06-16

    isc.version="v11.0p_2016-08-01/LGPL Deployment"

    ​Internet Explorer 11


    We started to get an error from our SmartClient application on moving between two
    recent builds of 11.0.
    We saw
    Error: Unable to get property 'context' of undefined or null reference
    when changing the data shown within a moderately complex form.

    We traced the error to a single if statement added to the function isc_Canvas_invalidateCache()
    some time between build 2016-06-16 and build 2016-08-01.

    This is a super-simple fix. so I believe you will just want to apply it straight away but if you need help to reproduce it, let me know andI will try to assist.

    Please see the 3 code fragments below , ie:
    1. The 2016-06-16 version, which was working for us.
    2. The 2016-08-01 with the extra "if" test that is the source of the error.
    3. A fix we have applied to ISC_Core.js which eliminates the error.


    // Taken from ISC_Core.js

    // isc.version="v11.0p_2016-06-16/LGPL Deployment"
    function isc_Canvas_invalidateCache() {
    if (this.data && this.data.invalidateCache != null)
    return this.data.invalidateCache();
    else if (this.isGrouped && isc.isA.ResultSet(this.originalData)) {
    this.originalData.setSort(this.data.getSort(), true);
    this.originalData.invalidateCache();
    this.regroup()
    }
    }

    //isc.version="v11.0p_2016-08-01/LGPL Deployment"
    function isc_Canvas_invalidateCache() {
    if (this.data.context) {
    delete this.data.context.data;
    delete this.data.context.implicitCriteria
    }
    if (this.data && this.data.invalidateCache != null)
    return this.data.invalidateCache();
    else if (this.isGrouped && isc.isA.ResultSet(this.originalData)) {
    this.originalData.setSort(this.data.getSort(), true);
    this.originalData.invalidateCache();
    this.regroup()
    }
    }

    /*
    The FIX that we have applied. We suggest this is applied to your source.
    Note the added "this.data &&" in the first "if" statement;
    */
    function isc_Canvas_invalidateCache() {
    if (this.data && this.data.context) {
    delete this.data.context.data;
    delete this.data.context.implicitCriteria
    }
    if (this.data && this.data.invalidateCache != null)
    return this.data.invalidateCache();
    else if (this.isGrouped && isc.isA.ResultSet(this.originalData)) {
    this.originalData.setSort(this.data.getSort(), true);
    this.originalData.invalidateCache();
    this.regroup()
    }
    }


    Stack Trace:

    TypeError: Unable to get property 'context' of undefined or null reference
    at isc_Canvas_invalidateCache (http://10.70.99.22/OA10-XA/XA/isomor...re.js:3449:586)
    at EntityDataLoaded (Function code:1043:21)
    at isc_c_Class_fireCallback (http://10.70.99.22/OA10-XA/XA/isomor...Core.js:281:68)
    at Anonymous function (http://10.70.99.22/OA10-XA/XA/Static...a-SC.js:195:17)
    at Anonymous function (http://10.70.99.22/OA10-XA/XA/Main.vbhtml:128:21)
    at isc_c_Class_fireCallback (http://10.70.99.22/OA10-XA/XA/isomor...Core.js:281:68)
    at isc_Class_fireCallback (http://10.70.99.22/OA10-XA/XA/isomor...ore.js:349:279)
    at isc_c_RPCManager_fireReplyCallback (http://10.70.99.22/OA10-XA/XA/isomor...ing.js:1687:67)
    at isc_c_RPCManager_fireReplyCallbacks (http://10.70.99.22/OA10-XA/XA/isomor...ng.js:1692:123)
    at isc_c_RPCManager_performOperationReply (http://10.70.99.22/OA10-XA/XA/isomor...ng.js:1685:119)



  • DaveC
    replied
    Good to see the quick turnaround on this. Gives us more confidence in using SmartClient within our system.

    Leave a comment:


  • Isomorphic
    replied
    Thanks for the heads up, it has been already fixed, you'll find the fix applied to the next nightly build.

    Leave a comment:

Working...
X