I have been developing an Xblock that allows people to write code in the browser. It has been requested a lot and I need it as well so I open-sourced it. The Xblock seems to work fine until you try to edit its settings.
Upon clicking the save button, nothing happens. I don’t see anything in the console output. I am unsure what could cause this.
The code can be found here GitHub - EmpowrOrg/CodeEditorXblock at dev
I got some logs that should help. It seems the container.js has an error. This happens on a uncustomized stock instance of openedx.
TypeError: elem.immediateDescendents is not a function
immediateDescendents jQuery
map http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:284
map http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:594
map http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:283
immediateDescendents jQuery
n http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:19
initializeXBlocks http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:19
initializeBlock http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:19
handleXBlockFragment http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
fire http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329
fireWith http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3459
tuple[0] http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3558
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
fire http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329
add http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3388
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
fire http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329
add http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3388
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
fire http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329
add http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3388
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
i http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
fire http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329
fireWith http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3459
tuple[0] http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3558
o http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1
u http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:58
d http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:58
jQuery.fn.immediateDescendents/<@http://studio.local.overhang.io/static/studio/js/src/jquery.immediateDescendents.js:18:21
map/<@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:284:20
map@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:594:13
map@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:283:33
jQuery.fn.immediateDescendents@http://studio.local.overhang.io/static/studio/js/src/jquery.immediateDescendents.js:12:28
n@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:19:16502
initializeXBlocks@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:19:17682
initializeBlock@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:19:17408
./cms/static/js/views/xblock.js/o</handleXBlockFragment/<@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:98738
fire@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329:31
fireWith@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3459:7
Deferred/</deferred[tuple[0]]@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3558:36
i@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:99829
i@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100083
./cms/static/js/views/xblock.js/o</addXBlockFragmentResources/i/<@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100045
fire@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329:31
add@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3388:7
i@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100028
./cms/static/js/views/xblock.js/o</addXBlockFragmentResources/i/<@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100045
fire@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329:31
add@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3388:7
i@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100028
./cms/static/js/views/xblock.js/o</addXBlockFragmentResources/i/<@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100045
fire@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329:31
add@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3388:7
i@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100028
./cms/static/js/views/xblock.js/o</addXBlockFragmentResources/i/<@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:100045
fire@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3329:31
fireWith@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3459:7
Deferred/</deferred[tuple[0]]@http://studio.local.overhang.io/static/studio/js/cms-base-vendor.11448695f92c.js:3558:36
./common/static/common/js/components/utils/view_utils.js/o</T/o<@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:1:124237
u@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:58:349
./node_modules/scriptjs/dist/script.js/</i/i[d]@http://studio.local.overhang.io/static/studio/bundles/js/factories/container.2f9cc6c8d3a8d40fbd44.4dcdddfb1a22.js:58:872