Atozed Forums
Error in 15.1.9 cannot read property set of null - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software Products (https://www.atozed.com/forums/forum-1.html)
+--- Forum: IntraWeb (https://www.atozed.com/forums/forum-3.html)
+---- Forum: English (https://www.atozed.com/forums/forum-16.html)
+----- Forum: IntraWeb General Discussion (https://www.atozed.com/forums/forum-4.html)
+----- Thread: Error in 15.1.9 cannot read property set of null (/thread-1514.html)



Error in 15.1.9 cannot read property set of null - PDSBILL - 01-31-2020

I have app the runs great both as a exe and dll under 15.0.17. App uses TMS components.
when run as exe under 15.1.9 i get the folllowing errors.

Any idea where to start looking?

Uncaught TypeError: Cannot read property 'set' of null
    at findCssRuleFromSelector (IWCommon__ED5C788A0.js:3281)
    at findCssRule (IWCommon__ED5C788A0.js:3313)
    at internalGetElementCssRule (IWCommon__ED5C788A0.js:3355)
    at getElementCssRule2 (IWCommon__ED5C788A0.js:3397)
    at HTMLSpanElement.IWCL_SetRect [as SetRect] (IWCL__ED5C788A0.js:492)
    at DoUpdateRects (IWCL__ED5C788A0.js:1218)
    at DoAlign (IWCL__ED5C788A0.js:1272)
    at HTMLDivElement.IWCL_UpdateRects [as UpdateRects] (IWCL__ED5C788A0.js:1302)
    at DoUpdateRects (IWCL__ED5C788A0.js:1221)
    at DoAlign (IWCL__ED5C788A0.js:1272)


Actual code from chrome debugger (bold line is what is identifed as error line)

function findCssRuleFromSelector(sheet, selectorName, sheetIdx) {
    var rules = IW.CSS.getCSSRules(sheet);
    if (rules && rules.length) {
        for (var j = rules.length - 1; j >= 0; j--) {
            if (rules[j].selectorText && (rules[j].selectorText === selectorName)) {
                // save it in CSS rule cache
                cssRuleCache.set(selectorName, { sheet: sheetIdx, rule: j });
                return rules[j];
            }
        }
    }
    return null;
}


RE: Error in 15.1.9 cannot read property set of null - Alexandre Machado - 01-31-2020

What component is that? I guess you are changing it during an async event, right?


RE: Error in 15.1.9 cannot read property set of null - PDSBILL - 01-31-2020

I am using TMS TIWAdvWebGrid
I build a simple hello world app with the grid, and no errors. So I do not believe it is the source of the problem.
I cannot trace into IW code so I am trying commenting out sections of code to try and find the issue.
Was hoping that someone may have seen this same issue


RE: Error in 15.1.9 cannot read property set of null - Alexandre Machado - 01-31-2020

I'll see what I can find. We can possibly avoid the JS error from IW side, but not sure if whatever the grid is doing in async will work


RE: Error in 15.1.9 cannot read property set of null - PDSBILL - 01-31-2020

(01-31-2020, 09:42 PM)Alexandre Machado Wrote: I'll see what I can find. We can possibly avoid the JS error from IW side, but not sure if whatever the grid is doing in async will work

OK,  I found it.  The last programmer added

ExtraHeader.Add('<script type="text/javascript">function findCssRuleInCache(selectorName) {return null};</script>');

I commented this out and everything now works. I assume this was added to correct an issue in prior Intraweb Version.



RE: Error in 15.1.9 cannot read property set of null - Alexandre Machado - 01-31-2020

Hum... he probably disabled the rule cache from IW creating a new function with the same name. Makes sense.


RE: Error in 15.1.9 cannot read property set of null - PDSBILL - 02-01-2020

Not knowing what the last programmer was trying to do, Is this somehing I need to worry about?

Thank you for your support.