Edit mode won't load due to script error

Ted
Ted
Vote:
 

Edit mode on an EPiServer 7 site fails to load with a JavaScript error saying: Cannot read property 'confirmation' of undefined

So, clearly there's something that's not defined. :/

Here's the "stack trace" from the console:

Uncaught TypeError: Cannot read property 'confirmation' of undefined widgets.js:2

(anonymous function) widgets.js:2
_c6 dojo.js:15
_36 dojo.js:15
_36 dojo.js:15
_36 dojo.js:15
_36 dojo.js:15
_7a dojo.js:15
_e8 dojo.js:15
loaded load-css.js:272
cbOnce load-css.js:234
link.(anonymous function).link.(anonymous function) load-css.js:149

All other resources seem to be loading just fine and there are no other script errors.

Any idea what might be causing this?

Thanks!

#69656
Apr 02, 2013 10:14
Ted
Vote:
 

Might add that I added Display attributes to existing page type properties to set GroupName and Order. After compilation this error started occuring.

#69657
Apr 02, 2013 10:18
Ted
Vote:
 

The error message is from Chrome, in Firefox the error message instead says: _12e2.buttons is undefined (in widget.js)

#69706
Edited, Apr 03, 2013 12:17
Ted
Vote:
 

Aha, I'm on to something! The errors only occur when swedish is selected as the UI language. So, it seems something is off with the widgets_sv.js?

#69708
Edited, Apr 03, 2013 12:24
Vote:
 

You are correct. It tried to look for an item keyed "confirmation" from the language bundle. How does the widgets_sv.js look like, though?

#69709
Apr 03, 2013 12:41
Ted
Vote:
 

Seems two versions of widgets_sv.js are loaded, one from /epi/CMS/1.0.431/ClientResources/EPi/Cms/nls/widgets_sv.js:

define("epi/cms/nls/widgets_sv",{"dijit/form/nls/ComboBox":{"previousMessage":"Föregående alternativ","nextMessage":"Fler alternativ"}});

 

The other one is: /epi/CMS/1.0.456/ClientResources/EPi/Cms/nls/widgets_sv.js which contains a whole lot more:

define("epi/shell/nls/widgets_sv",{"dijit/nls/common":{"buttonOk":"OK","buttonCancel":"Avbryt","buttonSave":"Spara","itemClose":"Stäng"},"dojo/cldr/nls/gregorian":{"months-format-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"quarters-standAlone-narrow":["1","2","3","4"],"field-weekday":"veckodag","dateFormatItem-yQQQ":"y
QQQ","dateFormatItem-yMEd":"EEE, yyyy-MM-dd","dateFormatItem-MMMEd":"E d

MMM","eraNarrow":["f.Kr.","e.Kr."],"dateTimeFormats-appendItem-Day-Of-Week":"{0}
{1}","dateFormat-long":"d MMMM
y","months-format-wide":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],"dateTimeFormat-medium":"{1}
{0}","dateFormatItem-EEEd":"EEE
d","dayPeriods-format-wide-pm":"em","dateFormat-full":"EEEE'en' 'den'
d:'e' MMMM y","dateFormatItem-Md":"d/M","dateFormatItem-MMMMEEEd":"EEE d

MMMM","dayPeriods-format-abbr-am":"AM","dateTimeFormats-appendItem-Second":"{0}
({2}:
{1})","dateFormatItem-yMd":"y-M-d","field-era":"era","dateFormatItem-yM":"yyyy-MM","months-standAlone-wide":["januari","februari","mars","april","maj","juni","juli","augusti","september","oktober","november","december"],"timeFormat-short":"HH:mm","quarters-format-wide":["1:a
kvartalet","2:a kvartalet","3:e kvartalet","4:e
kvartalet"],"timeFormat-long":"HH:mm:ss
z","field-year":"år","dateFormatItem-yMMM":"MMM
y","dateFormatItem-yQ":"yyyy Q","dateTimeFormats-appendItem-Era":"{0}
{1}","field-hour":"timme","dateFormatItem-MMdd":"dd/MM","months-format-abbr":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],"dateFormatItem-yyQ":"Q
yy","timeFormat-full":"'kl'. HH:mm:ss
zzzz","dateTimeFormats-appendItem-Week":"{0} ({2}:
{1})","field-day-relative+0":"i dag","field-day-relative+1":"i
morgon","field-day-relative+2":"i
övermorgon","dateFormatItem-H":"HH","months-standAlone-abbr":["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],"field-day-relative+3":"i

överövermorgon","quarters-format-abbr":["K1","K2","K3","K4"],"quarters-standAlone-wide":["1:a
kvartalet","2:a kvartalet","3:e kvartalet","4:e
kvartalet"],"dateFormatItem-M":"L","days-standAlone-wide":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"dateFormatItem-yyyyMMM":"MMM
y","dateFormatItem-MMMMd":"d:'e' MMMM","dateFormatItem-yyMMM":"MMM
-yy","timeFormat-medium":"HH:mm:ss","dateFormatItem-Hm":"HH:mm","quarters-standAlone-abbr":["K1","K2","K3","K4"],"eraAbbr":["f.Kr.","e.Kr."],"field-minute":"minut","field-dayperiod":"fm/em","days-standAlone-abbr":["sön","mån","tis","ons","tors","fre","lör"],"dateFormatItem-d":"d","dateFormatItem-ms":"mm:ss","quarters-format-narrow":["1","2","3","4"],"field-day-relative+-1":"i
går","dateFormatItem-h":"h a","dateTimeFormat-long":"{1}
{0}","dayPeriods-format-narrow-am":"AM","field-day-relative+-2":"i
förrgår","field-day-relative+-3":"i
förrförrgår","dateFormatItem-MMMd":"d MMM","dateFormatItem-MEd":"E
d/M","dateTimeFormat-full":"{1}
{0}","field-day":"dag","days-format-wide":["söndag","måndag","tisdag","onsdag","torsdag","fredag","lördag"],"field-zone":"tidszon","dateFormatItem-yyyyMM":"yyyy-MM","dateTimeFormats-appendItem-Day":"{0}
({2}:
{1})","dateFormatItem-y":"y","months-standAlone-narrow":["J","F","M","A","M","J","J","A","S","O","N","D"],"dateFormatItem-yyMM":"yy-MM","dateFormatItem-hm":"h:mm
a","dateTimeFormats-appendItem-Year":"{0}
{1}","dateTimeFormats-appendItem-Hour":"{0} ({2}:
{1})","dayPeriods-format-abbr-pm":"PM","days-format-abbr":["sön","mån","tis","ons","tors","fre","lör"],"dateFormatItem-yMMMd":"y
MMM d","eraNames":["före Kristus","efter
Kristus"],"days-format-narrow":["S","M","T","O","T","F","L"],"days-standAlone-narrow":["S","M","T","O","T","F","L"],"dateFormatItem-MMM":"LLL","field-month":"månad","dateTimeFormats-appendItem-Quarter":"{0}
({2}:
{1})","dayPeriods-format-wide-am":"fm","dateTimeFormats-appendItem-Month":"{0}
({2}: {1})","dateTimeFormats-appendItem-Minute":"{0} ({2}:
{1})","dateFormatItem-MMMMEd":"E d:'e'
MMMM","dateFormat-short":"yyyy-MM-dd","dateFormatItem-MMd":"d/M","field-second":"sekund","dateFormatItem-yMMMEd":"EEE
d MMM y","dateFormatItem-Ed":"d
E","dateTimeFormats-appendItem-Timezone":"{0}
{1}","field-week":"vecka","dateFormat-medium":"d MMM
y","dayPeriods-format-narrow-pm":"PM","dateFormatItem-yyyyQQQQ":"QQQQ
y","dateTimeFormat-short":"{1}
{0}","dateFormatItem-Hms":"HH:mm:ss","dateFormatItem-hms":"h:mm:ss
a"},"dijit/nls/loading":{"loadingState":"Läser in...","errorState":"Det
uppstod ett fel."}});

    

#69719
Edited, Apr 03, 2013 15:05
Vote:
 

I'm a bit curious as to why you have different versions of the scripts in parallell and more importantly; what triggers the loading of both versions?

The 1.0.431 belongs to the 7.0 release, but I don't know the origins of the 1.0.456 version.

You should be able to get a better stack trace by installing debug versions of the javascript files.

#69782
Edited, Apr 05, 2013 14:37
Ted
Vote:
 

Yeah, that's confusing me too. :/ Not sure why two separate versions are loaded. Good tip about the debug versions, I'll try that!

#69783
Apr 05, 2013 14:48
Ted
Vote:
 

Stefan, that link you provided seems to be broken?

#69837
Apr 08, 2013 10:53
Vote:
 

Should be working now.

#69838
Apr 08, 2013 11:04
ben
Vote:
 

Hi all, 

 

I have just install the Alloy Sample site and I am trying to get start with EPiServer 7.

Now I have been up to the step-3: "Open the templates". However, I encounter some issues about entering the EDIT MODE of the sample Alloy site. According to the info published in the link: 

http://world.episerver.com/Documentation/CMS/Get-started/EPiServer-7-CMS/3-Open-the-demo-templates/,

what I need to do is going to the editorial and administrative user interface for the Alloy site by adding "Episerver" to the URL, 

my sample site is installed in the path --- E:\EPiServer\Sites\MyEPiServerSite, I can see the Alloy site by entering http://localhost:17000, but once I enter --- http://localhost:17000/EPiServer, it just show me some error message as below: 

HTTP Error 404.0 - Not Found

The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.

 

So, can anyone tell me what is wrong here and any solutions or hints? I just want to enter the edit mode of the sample Alloy site. 

 

Thank UUUUUUUUU !!!

Ben 

#69881
Apr 09, 2013 6:58
Vote:
 

Funny thing, I got the exact same problem today...

I can trigger it to happen when I enable localization in episerver.framework:

<localization fallbackBehavior="Echo, MissingMessage, FallbackCulture" fallbackCulture="sv">
    <providers>
      <add virtualPath="~/Resources/LanguageFiles" name="languageFiles" type="EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider, EPiServer.Framework" />
    </providers>
  </localization>

    

#69929
Apr 09, 2013 21:02
Vote:
 

It seems some localized resources used by client side components/widgets are missing in both your selected ui culture and your fallback culture, which causes the widget creation to fail when localizing templates. It's certainly not a desirable behaviour, but a consequence of how dojo deals with localizations in widget templates that we haven't had the time to address.

Your best bet is probably to set fallbackCulture="en" and uiCulture="sv" to get Swedish as the default language.

 

@ben:

  • Click the "Log In" link in the bottom right of the start page
  • Log in with a user who is a member of the Administrators group
  • At the top right you should now see a clickable EPiServer logo that will take you to the edit interface

 

#69970
Apr 10, 2013 11:25
Vote:
 

The issue happened for me when deploying a 7.1 site to a 7.0 basic installation. I accidentally had the files belonging to 7.1 in the package instead of leaving them out.

#72617
Jun 24, 2013 16:17
Vote:
 

Hi!

I got the same error, and the reason was that the fallback culture was set to "no" in the localization-tag in episerverframework.config. When I changed it back to default ("en"), everything worked fine. 

#79923
Jan 10, 2014 8:52
Vote:
 

Thank y'all for sharing this! Saved me lots of time =)

#122661
Jun 09, 2015 13:57
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.