talk@lists.collectionspace.org

WE HAVE SUNSET THIS LISTSERV - Join us at collectionspace@lyrasislists.org

View all threads

Adding a concept authority, seeing "Uncaught TypeError: Cannot read property 'order' of undefined" in the browser JavaScript console

PM
Peter Murray
Fri, Nov 13, 2015 10:08 PM

I am adding a concept authority called 'concept-objectName':

https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application/sdmom-authority-concept.xml

...and I've setup an XMLmerge in the application config file:

https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application-tenant.xml#L49

The configuration does get merged correctly (as near as I can tell):

https://gist.github.com/dltj/c281142794f9a0a92747#file-merged-base-authority-concept-xml_sdmom-authority-concept-xml-xml-L36-L59

But when going to the createnew.html page, I'm getting an error in the browser JavaScript console:

Uncaught TypeError: Cannot read property 'order' of undefined
(anonymous function) @ CreateNew.js:158
fluid.each @ CSpaceInfusion.js:10471
that.prepareModelForRender @ CreateNew.js:157
(anonymous function) @ CSpaceInfusion.js:15192
(anonymous function) @ CSpaceInfusion.js:14676
fluid.tryCatch @ CSpaceInfusion.js:10281
fluid.pushActivity @ CSpaceInfusion.js:14656
(anonymous function) @ CSpaceInfusion.js:14675
(anonymous function) @ CSpaceInfusion.js:10968
fluid.tryCatch @ CSpaceInfusion.js:10281
fireToListeners @ CSpaceInfusion.js:10967
fire @ CSpaceInfusion.js:11020
that.refreshView.renderer.refreshView @ CSpaceInfusion.js:18944
cspace.createNew.refreshView @ CreateNew.js:220
fluid.invokeGlobalFunction @ CSpaceInfusion.js:10845
(anonymous function) @ CSpaceInfusion.js:15156
fluid.tryCatch @ CSpaceInfusion.js:10281
fluid.pushActivity @ CSpaceInfusion.js:14656
(anonymous function) @ CSpaceInfusion.js:15154
(anonymous function) @ CreateNew.js:312
togo.success @ Utilities.js:319
deferred.resolveWith @ CSpaceInfusion.js:1259
done @ CSpaceInfusion.js:7392
callback @ CSpaceInfusion.js:8171

...and the browser never finishes rendering the createnew.html screen.  If I hit the Concept Authorities REST service:

https://cspace.vagrant/cspace-services/conceptauthorities

... I see that the authority is created, so this seems like something in the UI.  I didn't have to do anything special in the UI, though, to create Place authorities in the same way.

Thoughts?

Peter

Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

I am adding a concept authority called 'concept-objectName': https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application/sdmom-authority-concept.xml ...and I've setup an XMLmerge in the application config file: https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application-tenant.xml#L49 The configuration does get merged correctly (as near as I can tell): https://gist.github.com/dltj/c281142794f9a0a92747#file-merged-base-authority-concept-xml_sdmom-authority-concept-xml-xml-L36-L59 But when going to the createnew.html page, I'm getting an error in the browser JavaScript console: Uncaught TypeError: Cannot read property 'order' of undefined (anonymous function) @ CreateNew.js:158 fluid.each @ CSpaceInfusion.js:10471 that.prepareModelForRender @ CreateNew.js:157 (anonymous function) @ CSpaceInfusion.js:15192 (anonymous function) @ CSpaceInfusion.js:14676 fluid.tryCatch @ CSpaceInfusion.js:10281 fluid.pushActivity @ CSpaceInfusion.js:14656 (anonymous function) @ CSpaceInfusion.js:14675 (anonymous function) @ CSpaceInfusion.js:10968 fluid.tryCatch @ CSpaceInfusion.js:10281 fireToListeners @ CSpaceInfusion.js:10967 fire @ CSpaceInfusion.js:11020 that.refreshView.renderer.refreshView @ CSpaceInfusion.js:18944 cspace.createNew.refreshView @ CreateNew.js:220 fluid.invokeGlobalFunction @ CSpaceInfusion.js:10845 (anonymous function) @ CSpaceInfusion.js:15156 fluid.tryCatch @ CSpaceInfusion.js:10281 fluid.pushActivity @ CSpaceInfusion.js:14656 (anonymous function) @ CSpaceInfusion.js:15154 (anonymous function) @ CreateNew.js:312 togo.success @ Utilities.js:319 deferred.resolveWith @ CSpaceInfusion.js:1259 done @ CSpaceInfusion.js:7392 callback @ CSpaceInfusion.js:8171 ...and the browser never finishes rendering the createnew.html screen. If I hit the Concept Authorities REST service: https://cspace.vagrant/cspace-services/conceptauthorities ... I see that the authority is created, so this seems like something in the UI. I didn't have to do anything special in the UI, though, to create Place authorities in the same way. Thoughts? Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company
PM
Peter Murray
Sat, Nov 14, 2015 7:51 PM

Ah!  Figured it out.  Either web-url or title-ref can't have a dash in it:

https://github.com/cherryhill/sdmom-tenant-config/commit/4152c406a167cfccb6a2344d04b5cad3a68828d6#diff-956bd8e7226e865583277e59232fe373

All better now.

Peter

On Nov 13, 2015, at 5:08 PM, Peter Murray pmurray@chillco.com wrote:

I am adding a concept authority called 'concept-objectName':

https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application/sdmom-authority-concept.xml

...and I've setup an XMLmerge in the application config file:

https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application-tenant.xml#L49

The configuration does get merged correctly (as near as I can tell):

https://gist.github.com/dltj/c281142794f9a0a92747#file-merged-base-authority-concept-xml_sdmom-authority-concept-xml-xml-L36-L59

But when going to the createnew.html page, I'm getting an error in the browser JavaScript console:

Uncaught TypeError: Cannot read property 'order' of undefined
[...]
...and the browser never finishes rendering the createnew.html screen.  If I hit the Concept Authorities REST service:

https://cspace.vagrant/cspace-services/conceptauthorities

... I see that the authority is created, so this seems like something in the UI.  I didn't have to do anything special in the UI, though, to create Place authorities in the same way.

Thoughts?

Peter

--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company

Ah! Figured it out. Either `web-url` or `title-ref` can't have a dash in it: https://github.com/cherryhill/sdmom-tenant-config/commit/4152c406a167cfccb6a2344d04b5cad3a68828d6#diff-956bd8e7226e865583277e59232fe373 All better now. Peter > On Nov 13, 2015, at 5:08 PM, Peter Murray <pmurray@chillco.com> wrote: > > I am adding a concept authority called 'concept-objectName': > > https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application/sdmom-authority-concept.xml > > ...and I've setup an XMLmerge in the application config file: > > https://github.com/cherryhill/sdmom-tenant-config/blob/d69967b1a534d280cf8d96b0c370d561a9ec1d5f/application-tenant.xml#L49 > > The configuration does get merged correctly (as near as I can tell): > > https://gist.github.com/dltj/c281142794f9a0a92747#file-merged-base-authority-concept-xml_sdmom-authority-concept-xml-xml-L36-L59 > > But when going to the createnew.html page, I'm getting an error in the browser JavaScript console: > > Uncaught TypeError: Cannot read property 'order' of undefined > [...] > ...and the browser never finishes rendering the createnew.html screen. If I hit the Concept Authorities REST service: > > https://cspace.vagrant/cspace-services/conceptauthorities > > ... I see that the authority is created, so this seems like something in the UI. I didn't have to do anything special in the UI, though, to create Place authorities in the same way. > > Thoughts? > > > Peter -- Peter Murray Dev/Ops Lead and Project Manager Cherry Hill Company