I'm creating a theme that inherits from Vanilla. I've performed quite some changes (mainly throwing stuff out left and right, see my other threads). Now I just noticed that somehow, when using my theme, the survey logic doesn't work properly anymore. Comparing vanilla and my theme, I noticed that when using mine, the following can be seen on the JS console whenever survey logic failed:
Code:
jquery-3.1.1.min.js:2 Uncaught TypeError: Cannot read property 'error' of undefined
at checkconditions (survey_runtime.js:129)
at HTMLDocument.<anonymous> (survey_runtime.js:23)
at HTMLDocument.dispatch (jquery-3.1.1.min.js:3)
at HTMLDocument.q.handle (jquery-3.1.1.min.js:3)
at Object.trigger (jquery-3.1.1.min.js:4)
at a.fn.init.triggerHandler (jquery-3.1.1.min.js:4)
at HTMLDocument.<anonymous> (jquery-migrate-3.0.0.min.js:2)
at j (jquery-3.1.1.min.js:2)
at k (jquery-3.1.1.min.js:2)
This seems to stem from this piece of code in survey_runtime.js, function checkconditions():
Code:
try{
ExprMgr_process_relevance_and_tailoring(evt_type,name,type);
} catch(e) { console.ls.error(e); }
I assume the "console.ls.error()" is causing the error, it should probably be "console.error"? In any case, the only reason we see this problem is because the try-catch failed. Which hints that ExprMgr_process_relevance_and_tailoring() failed. I assume this is the core of the issue.
Now I'm trying to figure out why this is failing. I understand that it is probably very hard, if not impossible, to point out the issue without having access to the system/theme. Still, maybe someone who understand the whole JS pipeline somewhat better might have an idea of what markup-changes could potentially cause this?
I'm grateful for any input. Thank you.