I recently updated the app to the 3.13 framework, and now am getting the following error when I load my application.

Uncaught TypeError: Cannot read property 'missingMessage' of undefined

Chrome says the error is being thrown on the Select Dijit. I do not have "lang" in my HTML tag (like this error). Anyone have any ideas?

var querySelect = new Select({
    id: "querySelect",
    name: "querySelect",
    options: [
        {label: "Signs", value: "signs", selected: true},
        {label: "Bridges", value: "bridges"},
        {label: "Culverts", value: "culverts"},
        {label: "Drains", value: "drains"},
        {label: "Roads", value: "roads"}
}, "query_select").startup();


Here is the simplifed code:

<script src="query.js"></script>    //Script with Select Dijit  
    var map;

    ], function (parser, esriConfig, IdentityManager, BorderContainer, ContentPane, Map, Draw, domConstruct, HomeButton, Scalebar, webMercatorUtils, BasemapToggle, Geocoder, GraphicsLayer, FeatureLayer, ArcGISDynamicMapServiceLayer, Color, SimpleMarkerSymbol, SimpleLineSymbol, Graphic, Query, Extent, Point, GeometryService, on, dom, domStyle, CheckBox, IdentifyTask, IdentifyParameters, InfoTemplate, Legend, esriRequest, DataGrid, Memory, ItemFileWriteStore, domConstruct) {

  • are you calling parser.parse()? can you provide a link to a simplified repro case? – John Gravois Mar 16 '15 at 18:05
  • Yes I am calling parser.parse(). The select dijit is contained in an external .js file. parser.parse() is called in <head> of index.html. I bet the select dijit is being parsed before parser.parse() is called. Is there a way to solve this when using external js files? – Jeremy Hamm Mar 16 '15 at 19:09
  • no need to 'bet'. set breakpoints in both locations to get more familiar with the actual flow of code. also, id still like to see a simplified repro case. – John Gravois Mar 17 '15 at 13:44
  • I added the code as it appears in my app, I am not sure if this is what you were looking for, if not let me know what you need and I can send it – Jeremy Hamm Mar 17 '15 at 14:30
  • by repro case, i mean a complete code example thats ready to run and doesn't include anything that isnt necessary to show the problem. whats in your query.js? isn't the problem reproducible when you comment out all those other unrelated modules? – John Gravois Mar 17 '15 at 20:04

With the code you had to create the Select, it creates the Select object and immediately runs the startup() method on that dijit. The startup() method does not return the Select object. It only runs processes after the dijit is loaded on the HTML DOM and visible. Therefore, your querySelect variable doesn't receive anything. Here's a better way to handle it.

var querySelect = new Select({
    id: "querySelect",
    name: "querySelect",
    options: [
        {label: "Signs", value: "signs", selected: true},
        {label: "Bridges", value: "bridges"},
        {label: "Culverts", value: "culverts"},
        {label: "Drains", value: "drains"},
        {label: "Roads", value: "roads"}
}, "query_select");

// now call startup on the querySelect.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.