Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot read property split of undefined #17

Closed
Samaalir opened this issue Jun 8, 2017 · 1 comment
Closed

Cannot read property split of undefined #17

Samaalir opened this issue Jun 8, 2017 · 1 comment

Comments

@Samaalir
Copy link

Samaalir commented Jun 8, 2017

Hello @tmcgee could you help me here please, I got this error while trying to include this widgets into my cmv app

TypeError: Cannot read property 'split' of undefined
at Object.mo.manifest.ret.processManifestLabel (utils.js:1345)
at Object._processManifest (WidgetManager.js:260)
at Object. (WidgetManager.js:222)
at init.js:63

my configurations are :
in the app.js :

 (function () { 
    var path = location.pathname.replace(/[^\/]+$/, '');
    window.dojoConfig = {
        async: true,
        packages: [
            {
                name: 'viewer',
                location: path +'../Scripts/arcgis/viewer'
            }, {
                name: 'gis',
                location: path + '../Scripts/arcgis/gis'
            }, {
                name: 'config',
                location: path + '../Scripts/arcgis/config'
            }, {
                name: 'JSZip3',
                main: 'jszip-3.1.3.min',
                location: path + '../Scripts/arcgis/gis/dijit/Export/lib'
            }, {
                name: 'proj4js',
                location: '//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15'
            }, {
                name: 'flag-icon-css',
                location: '//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.8.0'
            }, {
                name: 'jimu',
                location: path + '../Scripts/arcgis/gis/dijit/wab/jimu.js'
            }, {
                name: 'libs',
                location: path + '../Scripts/arcgis/gis/dijit/wab/libs'
            }, {
                name: 'wabwidgets',
                location: path + '../Scripts/arcgis/gis/dijit/wab/widgets'
            }
        ]
    }; 
require(window.dojoConfig, [
    'dojo/_base/declare',

    // minimal Base Controller
    'viewer/_ControllerBase',

    // *** Controller Mixins
    // Use the core mixins, add custom mixins
    // or replace core mixins with your own
    'viewer/_ConfigMixin', // manage the Configuration
    'viewer/_LayoutMixin', // build and manage the Page Layout and User Interface
    'viewer/_MapMixin', // build and manage the Map
    'viewer/_WidgetsMixin', // build and manage the Widgets
    'viewer/_WABMixin' // cusom mix-in to use the new widgets
    // 'viewer/_WebMapMixin' // for WebMaps
    //'config/_customMixin'

], function (
    declare,

    _ControllerBase,
    _ConfigMixin,
    _LayoutMixin,
    _MapMixin,
    _WidgetsMixin,
    _WABMixin
    // _WebMapMixin
    //_MyCustomMixin

) {
    var App = declare([

        // add custom mixins here...note order may be important and
        // overriding certain methods incorrectly may break the app
        // First on the list are last called last, for instance the startup
        // method on _ControllerBase is called FIRST, and _LayoutMixin is called LAST
        // for the most part they are interchangeable, except _ConfigMixin
        // and _ControllerBase
        //
        _LayoutMixin,
        _WidgetsMixin,
        // _WebMapMixin,
        _MapMixin,
        _WABMixin,
        // configMixin should be right before _ControllerBase so it is
        // called first to initialize the config object
        _ConfigMixin,

        // controller base needs to be last
        _ControllerBase
    ]);
    var app = new App();

    app.startup();
});

})(); `

the home index :
`<script src="~/Scripts/arcgis/3.20/init.js"></script>

<script src="~/Scripts/arcgis/config/app.js"></script> <script src="~/Scripts/arcgis/gis/dijit/wab/libs/caja-html-sanitizer-minified.js"></script>

`

@Samaalir
Copy link
Author

Samaalir commented Jun 8, 2017

The problem is that i have not specified the locale language :
solution : modifying the app.js
add locale ex:

async: true,
        locale: 'fr', //or 'en-us' ...
        packages: [ ...

@Samaalir Samaalir closed this as completed Jun 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant