Getting e.fetchContent is not a function error on console which prevents custom javascript code from running
Hi - when running steps with custom javascript code, sometimes in the console I will see a
e.fetchContent is not a function
which prevents my custom javascript code in my step from running. Has anyone experienced this?
My step is a transitory step, so it interacts with the UI to click a button that prompts a window within the same browser, then it advances to the next step if the target element is present:
setTimeout(function() {
// clicks an html button
}, 200);
(function wireGuideAdvance (dom, step) {
if (!step) return;
var nextStep = guide.steps[guide.getPositionOfStep(step)];
var advanceOnce = pendo._.once(pendo.onGuideAdvanced);
function checkForElementAndAdvance (e) {
var checkForNextElement = setInterval(function () {
if (dom(nextStep.elementPathRule).length) {
advanceOnce();
clearInterval(checkForNextElement);
}
}, 1000);
}
pendo.attachEvent(document, 'click', checkForElementAndAdvance);
// step wrappable method to clear all event listeners
step.after('teardown', function () {
pendo.detachEvent(document, 'click', checkForElementAndAdvance);
});
})(pendo.dom,step);
1
コメント
Just to add one more data point, it seems to be intermittent. A teammate of mine also opened the guide in the designer, went through the preview, and it worked completely fine for them. Posting function calls:
I too am getting this error. I thought it was related to my JS or less likely my CSS, but upon removing the code and even the code block I still get this error. It consistently logs [e.fetchContent is not a function] when moving between steps.
I found that simply rebuilding the guide completely eliminated the error. My testing suggests that this was related to duplicating a guide step that contained a custom code block and then editing the second instance. Deleting the duplicated steps and creating each from scratch resulted in consistent desired behaviour with no errors.
サインインしてコメントを残してください。