question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

after updating v1.0.7 to v1.0.26, started seeing below error and survey won't render.

See original GitHub issue

This error occurs while rendering a coplex survey after I updated the library to v1.0.26, which was working in surveyjs v1.0.7 . If you have any idea on this issue, please redirect to some literature. (Note: The survey gets built dynamically so its very difficult for me to share the surveyjson. )

TypeError: u.getConditionRunner is not a function
    at Function.e.runConditionsForItems (survey.vue.min.js:42)
    at t.runConditionsForItems (survey.vue.min.js:42)
    at t.runItemsCondition (survey.vue.min.js:42)
    at t.filterItems (survey.vue.min.js:42)
    at Object.<anonymous> (survey.vue.min.js:42)
    at t.e.propertyValueChanged (survey.vue.min.js:7)
    at Array.n.push (survey.vue.min.js:7)
    at eval (eval at renderActivity (bet.js:1559), <anonymous>:787:65)
    at Array.forEach (<anonymous>)
    at Object.onCreatedLoader (eval at renderActivity (bet.js:1559), <anonymous>:775:51)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
omkardusanecommented, Jun 20, 2018

Sorry, I forgot to mention I am using Vue version.

I temporarily fixed this issue by following patches to the survey.vue.js

from:

 ItemValue.runConditionsForItems = function (items, filteredItems, runner, values, properties) {
        if (!values) {
            values = {};
        }
        var itemValue = values["item"];
        var hasChanded = false;
        for (var i = 0; i < items.length; i++) {
            var item = items[i];
            values["item"] = item.value;
            console.log(item.runConditionsForItems, item)
            var itemRunner = item.getConditionRunner();
            if (!itemRunner) {
                itemRunner = runner;
            }
            var vis = true;
            if (itemRunner) {
                vis = itemRunner.run(values, properties);
                if (vis) {
                    filteredItems.push(item);
                }
            }
            else {
                filteredItems.push(item);
            }
            if (vis != item.isVisible) {
                hasChanded = true;
                item.setIsVisible(vis);
            }
        }
        if (itemValue) {
            values["item"] = itemValue;
        }
        else {
            delete values["item"];
        }
        return hasChanded;
    };

to:

 ItemValue.runConditionsForItems = function (items, filteredItems, runner, values, properties) {
        if (!values) {
            values = {};
        }
        var itemValue = values["item"];
        var hasChanded = false;
        for (var i = 0; i < items.length; i++) {
            var item = items[i];
            values["item"] = item.value;
            console.log(item.runConditionsForItems, item)
            var itemRunner = (!!item.getConditionRunner) ?item.getConditionRunner():false;
            if (!itemRunner) {
                itemRunner = runner;
            }
            var vis = true;
            if (itemRunner) {
                vis = itemRunner.run(values, properties);
                if (vis) {
                    filteredItems.push(item);
                }
            }
            else {
                filteredItems.push(item);
            }
            if (vis != item.isVisible) {
                hasChanded = true;
                if(!!item.setIsVisible)
                    item.setIsVisible(vis);
            }
        }
        if (itemValue) {
            values["item"] = itemValue;
        }
        else {
            delete values["item"];
        }
        return hasChanded;
    };
0reactions
omkardusanecommented, Jul 11, 2018

@dmitrykurmanov Hi, I just pulled this fix in 1.0.32 (till now I was using the lib containing my changes) and now I am seeing this error in the console. Though it is not making any functionality broken. but still, it seems like something is wrong.

survey.vue.min.js:6 Uncaught TypeError: Cannot read property 'strChanged' of undefined
    at Function.e.locStrsChanged (survey.vue.min.js:6)
    at t.e.locStrsChanged (survey.vue.min.js:6)
    at t.locStrsChanged (survey.vue.min.js:6)
    at t.locStrsChanged (survey.vue.min.js:6)
    at t.locStrsChanged (survey.vue.min.js:6)
    at t.notifyElementsOnAnyValueOrVariableChanged (survey.vue.min.js:6)
    at t.notifyQuestionOnValueChanged (survey.vue.min.js:6)
    at t.setValue (survey.vue.min.js:6)
    at t.setValueCore (survey.vue.min.js:6)
    at t.setNewValueInData (survey.vue.min.js:6)

survey.vue.min.js:6 Uncaught TypeError: Cannot read property 'strChanged' of undefined
    at Function.e.locStrsChanged (survey.vue.min.js:6)
    at t.e.locStrsChanged (survey.vue.min.js:6)
    at t.locStrsChanged (survey.vue.min.js:6)
    at t.locStrsChanged (survey.vue.min.js:6)
    at t.locStrsChanged (survey.vue.min.js:6)
    at t.notifyElementsOnAnyValueOrVariableChanged (survey.vue.min.js:6)
    at t.notifyQuestionOnValueChanged (survey.vue.min.js:6)
    at t.setValue (survey.vue.min.js:6)
    at eval (eval at renderActivity (bet.js:1611), <anonymous>:964:39)
Read more comments on GitHub >

github_iconTop Results From Across the Web

Error while loading & updating survey in Survey123 Connect
Hello, I started seeing survey loading & updating errors while using Survey123 Connect v.3.12.230. Once I open or save a xlsx form to...
Read more >
Fix export issues in Premiere Pro
Application hangs, freezes, or becomes unresponsive while rendering or exporting? We're here to help! Fix common export issues in 7 simple steps ...
Read more >
ingress-nginx/Changelog.md at main
Ingress controller now (starting from v1.0.0) mandates cluster scoped access to IngressClass. This leads to problems when updating old Ingress controller to ...
Read more >
Common Survey Errors
It is possible to create display logic based on a question that is only shown in one survey path. Any respondents who do...
Read more >
Lower Skokomish Vegetation Management Environmental ...
Lower Skokomish Vegetation Management Project ... The following list describes changes made to this EA after the 30 day ... (See PDC, BOT-07,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found