Virtual Happy Hour this month, Jun 28, we'll be getting a sneak preview at our soon to launch SaaS CMS!

Try our conversational search powered by Generative AI!

Unknown error in dojo script

Vote:
 

Hi,

I am getting following error when try to run dojo script

Uncaught TypeError: this.model.getUpdatedStore is not a function
at Object.postMixInProperties (widgets.js:2)
at Object.create (widgets.js:2)
at Object.postscript (widgets.js:2)
at Object._19e (dojo.js:15)
at Object.postscript (widgets.js:2)
at new (dojo.js:15)
at Object._execute (showRelatedPagesCommand.js:23)
at Object.execute (widgets.js:2)
at Object.onClick (widgets.js:2)
at Object.onItemClick (widgets.js:2)
postMixInProperties @ widgets.js:2
create @ widgets.js:2
postscript @ widgets.js:2
_19e @ dojo.js:15
postscript @ widgets.js:2
(anonymous) @ dojo.js:15
_execute @ showRelatedPagesCommand.js:23
execute @ widgets.js:2
onClick @ widgets.js:2
onItemClick @ widgets.js:2
(anonymous) @ widgets.js:2
(anonymous) @ dojo.js:15
(anonymous) @ widgets.js:2

does anyone know the root cause of this? Any idea?

Thanks,

Chandrakant H

#187178
Jan 15, 2018 14:25
Vote:
 

Try this to debug the issue:

https://world.episerver.com/blogs/Ben-McKernan/Dates/2014/8/Uncompressed-JavaScript-for-EPiServer-76/

#187199
Jan 15, 2018 22:32
Vote:
 

Hi Aniket,

Thanks for response.

Here is dojo script

define([
"dojo/_base/declare",
"epi/shell/command/_Command",
"epi-cms/widget/ContentReferences",
"epi/shell/widget/dialog/Dialog",
"epi/shell/TypeDescriptorManager",
"epi/i18n!epi/cms/nls/episerver.cms.widget.contentreferences"
],
function (
declare,
_Command,
ContentReferences,
Dialog,
TypeDescriptorManager) {
return declare([_Command], {
name: "ContentReferences",
label: "Content references",
tooltip: "Show content references",
iconClass: "epi-iconReferences",
canExecute: true,

_execute: function () {
var content = new ContentReferences({
model: {
contentData: this.model.contentData,
mode: "show"
}
});
content.startup();

var dialog = new Dialog({
defaultActionsVisible: false,
focusActionsOnLoad: true,
destroyOnHide: true,
dialogClass: "epi-dialog-contentReferences",
title: TypeDescriptorManager.getResourceValue(this.model.contentData.typeIdentifier, "references"),
content: content
});

dialog.definitionConsumer.add({
name: "close",
label: epi.resources.action.close,
action: dialog.onCancel
});

dialog.show();

var handle = content.on("viewReference", function () {
dialog.hide();
handle.remove();
});
}
});
});

when i checked in the consol this.model.contentdata is working properly, but in ContentRefrences.js 

postMixInProperties: function () {
this.inherited(arguments);

this.store = this.model.getUpdatedStore(this.store);
},

in below function it get stuck, Is there something missing in below code

 new ContentReferences({
model: {
contentData: this.model.contentData,
mode: "show"
}
});
content.startup();

Thanks,

Chandrakant H

#187223
Jan 16, 2018 12:45
Vote:
 

What are the steps you do to get this error? Have you written a custom dojo widget or are you using something built in? I don't recognize showRelatedPagesCommand.js.

#187276
Jan 17, 2018 15:06
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.