November Happy Hour will be moved to Thursday December 5th.

Catalogue view fails with custom dijit after upgrade to 7.19.1/8.7.1

Vote:
 

We've upgraded our solution to EPiServer 7.19.1 and Commerce 8.7.1 and now we can't load the catalogue view, the cause behind the error that is thrown is our custom dijit, which was working before the upgrade. The error is only occuring randomly. If we outcomment the custom dijit it is working.

Following errors is thrown in firebug:

Error: Could not resolve dependency "epi.globalcommandregistry" (epi.dependency)

"callback@http://spsm.local/hittalaromedel/ClientResources/Scripts/widgets/emailview/EmailCommands.js:20:33
_25e/
.cache["epi-cms/CMSModule"]/<.initialize@http: spsm.local hittalaromedel spsm manage cms 7.19.1.0 clientresources epi-cms widgets.js:2:9929>
.cache["epi/ModuleManager"]/<._runmoduleinitializer><@http: spsm.local hittalaromedel spsm manage shell 7.19.1.0 clientresources epi epi.js:2:8779>
.cache["dojo/_base/lang"]/<@http: spsm.local hittalaromedel spsm manage shell 7.19.1.0 clientresources dojo dojo.js:15:30898>
_c8@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/dojo/dojo.js:15:11378
_36@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/dojo/dojo.js:15:12993
_7c/<@http: spsm.local hittalaromedel spsm manage shell 7.19.1.0 clientresources dojo dojo.js:15:13239>
_37@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/dojo/dojo.js:15:13083
_7c@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/dojo/dojo.js:15:13164
_e7/_ea@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/dojo/dojo.js:15:13689
_fea@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/epi/shell/widgets.js:2:559805
_2f@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/lib/xstyle/load-css.js:2:1959
_27@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/lib/xstyle/load-css.js:2:1494
_1a/_1c[_2]@http://spsm.local/hittalaromedel/SPSM/manage/Shell/7.19.1.0/ClientResources/lib/xstyle/load-css.js:2:1114
"

Sometimes only the first error is thrown and then the catalogue view loads correctly, and then the second error is occuring and the catalogue view fails.

The custom dijit looks like this:

require([
    'dojo/aspect',
    'dojo/_base/declare',

    'epi/dependency',
    'spsm/emailview/EmailUpdateCommand'
], function (
    aspect,
    declare,
    dependency,
    EmailUpdateCommand
) {
    console.log(EmailUpdateCommand);
    var handle,
        registry = dependency.resolve('epi.globalcommandregistry'),
        callback = function (identifier, provider) {
            if (identifier !== 'epi.cms.globalToolbar') {
                return;
            }
            provider.addCommand(new EmailUpdateCommand(), { showLabel: true, id: "EmailUpdateCommand", disabled: false });

            handle.remove();
        };

    handle = aspect.after(registry, 'registerProvider', callback, true);
})

EmailUpdateCommand is another js file, and the value from the log above is 3(!), and in Chrome I'm getting:

TypeError: number is not a function

Any ideas why code above fails after the upgrade?

/J

#117045
Feb 10, 2015 16:28
* 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.