I have exactly the same problem. I upgraded Mahara from 1.8.1 to 1.9.1. and then the problem started. We run Mahara on a MacOSX server, and has no extra extensions installed. I've tried both Safari and Firefox, but the problem is the same.
/Per A
Umeå, Sweden
From David's screencast I can see that you have some third-party plugins installed. Do you have the problem of not being able to see a block's configuration when you are on a standard Mahara instance without the plugins? If that is the case, it might be worthwhile adding the plugins one at a time to see where the issue is.
Cheers
Kristina
]]>
Can I get you to try changing this:
appendChildNodes(document.body, DIV({id: 'overlay'}));
(function($) {
// configblock.javascript might use MochiKit so $ must have its default value
eval(configblock.javascript);
})(getElement);
To this, to see if make any difference:
appendChildNodes(document.body, DIV({id: 'overlay'}));
eval(configblock.javascript);
If it does make a difference can you test by adding a few different blocks to the page to see which work and which do not.
Cheers
Robert
]]>
---
var pf_instconf = new Pieform({"name":"instconf","jsForm":true,"submitButtons":["action_configureblockinstance_id_1540"],"preSubmitCallback":"formStartProcessing","jsSuccessCallback":"blockConfigSuccess","jsErrorCallback":"blockConfigError","globalJsErrorCallback":"formGlobalError","postSubmitCallback":"formStopProcessing","newIframeOnSubmit":false,"checkDirtyChange":true});pf_instconf.init();instconf_artefactid = new FileBrowser('instconf_artefactid', 0, {"upload":1,"resizeonuploaduseroption":0,"resizeonuploaduserdefault":1,"uploadagreement":1,"createfolder":0,"edit":0,"tag":1,"select":1,"alwaysopen":1,"publishing":1,"selectone":1,"showtags":1,"editmeta":1}, config);
instconf_artefactid.filedata = [];instconf_artefactid.selecteddata = [];instconf_artefactid.tabdata = {"tabs":{"user":"My files","group":"Group files","site":"Site files"},"subtabs":[],"owner":"user","ownerid":null,"upload":true}; instconf_artefactid.init();
$j(function() {
$j("#instconf_retractable").click(function() {
if (this.checked) {
$j("#instconf_retractedonload").removeAttr("disabled");
$j("#instconf_retractedonload").removeAttr("checked");
}
else {
$j("#instconf_retractedonload").removeAttr("checked");
$j("#instconf_retractedonload").attr("disabled", true);
}
});
});
ERROR: sendjsonrequest() callback failed: TypeError: src is null [object Object]
---
]]>Here is the output for your request:
---
Attr.specified is deprecated. Its value is always true. jquery.js?v=1.9.1:2378
event.returnValue is deprecated. Please use the standard event.preventDefault() instead. jquery.js?v=1.9.1:3445
var pf_instconf = new Pieform({"name":"instconf","jsForm":true,"submitButtons":["action_configureblockinstance_id_1523"],"preSubmitCallback":"formStartProcessing","jsSuccessCallback":"blockConfigSuccess","jsErrorCallback":"blockConfigError","globalJsErrorCallback":"formGlobalError","postSubmitCallback":"formStopProcessing","newIframeOnSubmit":false,"checkDirtyChange":true});pf_instconf.init();
tinyMCE.idCounter=0;
tinyMCE.execCommand('mceAddControl', false, "instconf_text");
PieformManager.connect('onsubmit', "instconf", tinyMCE.triggerSave);
PieformManager.connect('onreply', "instconf", function () {
tinyMCE.execCommand('mceRemoveControl', false, "instconf_text");});var p = new Paginator("artefactid_pagination", "artefactid_data", null, "view\/artefactchooser.json.php", {"value":null,"blocktype":"textbox","group":null,"institution":null});
var acSelectArtefacts = []
var ul = getFirstElementByTagAndClassName('ul', 'artefactchooser-tabs', 'instconf_artefactid_container');
var doneBrowse = false;
var browseA = null;
var searchA = null;
var browseTabCurrent = true;
if (ul) {
forEach(getElementsByTagAndClassName('a', null, ul), function(a) {
p.rewritePaginatorLink(a);
if (!doneBrowse) {
doneBrowse = true;
browseA = a;
// Hide the search form
connect(a, 'onclick', function(e) {
hideElement('artefactchooser-searchform');
removeElementClass(searchA.parentNode, 'current');
getFirstElementByTagAndClassName(searchA, null, 'accessible-hidden').innerHTML = '(' + get_string('tab') + ')';
addElementClass(browseA.parentNode, 'current');
getFirstElementByTagAndClassName(browseA, null, 'accessible-hidden').innerHTML = '(' + get_string('tab') + get_string('selected') + ')';
browseA.blur();
$('artefactchooser-searchfield').value = ''; // forget the search for now, easier than making the tabs remember it
if (!browseTabCurrent) {
browseTabCurrent = true;
}
e.stop();
});
}
else {
searchA = a;
// Display the search form
connect(a, 'onclick', function(e) {
showElement('artefactchooser-searchform');
removeElementClass(browseA.parentNode, 'current');
addElementClass(searchA.parentNode, 'current');
connect('artefactchooser-searchfield', 'onkeypress', function(e) {
if (e.key().code == 13) { // enter pressed - submitting form
e.stop();
signal('artefactchooser-searchsubmit', 'onclick', true);
}
});
// Wire up the search button
connect('artefactchooser-searchsubmit', 'onclick', function(e) {
if (e._event != true) {
e.stop();
}
var loc = searchA.href.indexOf('?');
var queryData = [];
if (loc != -1) {
queryData = parseQueryString(searchA.href.substring(loc + 1, searchA.href.length));
queryData.extradata = serializeJSON(p.extraData);
// need to do this old school as the mochikit js is being called on a jquery page
queryData.search = document.getElementById('artefactchooser-searchfield').value;
}
sendjsonrequest(p.jsonScript, queryData, 'GET', function(data) {
var tbody = getFirstElementByTagAndClassName('tbody', null, p.datatable);
if (tbody) {
if (
(document.all && document.documentElement && typeof(document.documentElement.style.maxHeight) != "undefined" && !window.opera)
||
(/Konqueror|AppleWebKit|KHTML/.test(navigator.userAgent))) {
var temp = DIV({'id':'ie-workaround'});
temp.innerHTML = '<table><tbody>' + data.data.tablerows + '</tbody></table>';
swapDOM(tbody, temp.childNodes[0].childNodes[0]);
}
else {
// This does not work in IE and Konqueror, the tbody
// innerHTML property is readonly.
// http://www.ericvasilik.com/2006/07/code-karma.html
tbody.innerHTML = data['data']['tablerows'];
}
}
new ArtefactChooserSelect(data.data.artefactdata);
// Update the pagination
if ($(p.id)) {
var tmp = DIV();
tmp.innerHTML = data['data']['pagination'];
swapDOM(p.id, tmp.firstChild);
// Run the pagination js to make it live
eval(data['data']['pagination_js']);
// Update the result count
var results = getFirstElementByTagAndClassName('div', 'results', p.id);
if (results) {
results.innerHTML = data['data']['results'];
}
}
});
});
$('artefactchooser-searchfield').focus();
if (browseTabCurrent) {
browseTabCurrent = false;
}
e.stop();
});
}
});
}/**
* Call the selectjscallback function whenever a radio button is clicked
*/
function ArtefactChooserSelect(artefacts) {
var self = this;
this.artefacts = artefacts;
this.init = function() {
self.connectPagination();
self.connectRadios();
}
/**
* Connects pagination so that when a page is changed, we are told about it
*/
this.connectPagination = function() {
paginatorProxy.addObserver(self);
connect(self, 'pagechanged', self.pageChanged);
}
/**
* Update artefact data & connect radios to the selectjscallback
*/
this.pageChanged = function(data) {
self.artefacts = data.artefactdata;
self.connectRadios(data);
}
this.connectRadios = function(data) {
forEach(getElementsByTagAndClassName('input', null, 'artefactid_data'), function(radio) {
connect(radio, 'onclick', function() {
if (self.artefacts[radio.value]) {
updateTextContent(self.artefacts[radio.value]);
}
});
});
}
self.init();
}
new ArtefactChooserSelect(acSelectArtefacts);
instconf_artefactids = new FileBrowser('instconf_artefactids', 0, {"upload":1,"resizeonuploaduseroption":0,"resizeonuploaduserdefault":1,"uploadagreement":1,"createfolder":0,"edit":0,"tag":1,"select":1,"alwaysopen":1,"publishing":1,"selectone":0,"showtags":1,"editmeta":1}, config);
instconf_artefactids.filedata = [];instconf_artefactids.selecteddata = [];instconf_artefactids.tabdata = {"tabs":{"user":"My files","group":"Group files","site":"Site files"},"subtabs":[],"owner":"user","ownerid":null,"upload":true}; instconf_artefactids.init();function updateTextContent(a) {
setNodeAttribute('instconf_title', 'value', a.title);
tinyMCE.activeEditor.setContent(a.description);
setNodeAttribute('instconf_license', 'value', a.license);
setNodeAttribute('instconf_licensor', 'value', a.licensor);
setNodeAttribute('instconf_licensorurl', 'value', a.licensorurl);
jQuery('#instconf_textreadonly_display').innerHTML = a.safedescription;
jQuery('#instconf_licensereadonly_display').innerHTML = a.safelicense;
setNodeAttribute('instconf_tags', 'value', a.tags);
jQuery('#instconf_textreadonly_display').innerHTML = a.safedescription;
jQuery('#instconf_tagsreadonly_display').innerHTML = a.safetags;
jQuery('#instconf_makecopy').prop('checked', false);
if (a.editable == 1) {
addElementClass('instconf_textreadonly_header', 'hidden');
addElementClass('instconf_textreadonly_container', 'hidden');
addElementClass('instconf_readonlymsg_container', 'hidden');
addElementClass('instconf_licensereadonly_header', 'hidden');
addElementClass('instconf_licensereadonly_container', 'hidden');
addElementClass('instconf_tagsreadonly_header', 'hidden');
addElementClass('instconf_tagsreadonly_container', 'hidden');
removeElementClass('instconf_text_header', 'hidden');
removeElementClass('instconf_text_container', 'hidden');
if (jQuery('#instconf_license_header').length) {
// only deal with these if the license metadata is enabled
removeElementClass('instconf_license_header', 'hidden');
removeElementClass('instconf_license_container', 'hidden');
removeElementClass('instconf_license_description', 'hidden');
removeElementClass('instconf_license_advanced_fieldset', 'hidden');
}
removeElementClass('instconf_tags_header', 'hidden');
removeElementClass('instconf_tags_container', 'hidden');
removeElementClass('instconf_tags_description', 'hidden');
var blockcountmsg = jQuery('#instconf_otherblocksmsg_container');
if (blockcountmsg && jQuery('#textbox_blockcount')) {
var otherblockcount = 0;
if (a.blocks && a.blocks.length > 0) {
for (var i = 0; i < a.blocks.length; i++) {
if (a.blocks[i] != 1523) {
otherblockcount++;
}
}
}
if (otherblockcount) {
replaceChildNodes('textbox_blockcount', otherblockcount);
jQuery(blockcountmsg).removeClass('hidden');
}
else {
jQuery(blockcountmsg).addClass('hidden');
}
}
if (typeof a.attachments != 'undefined') {
// remove any attached files
for (var key in instconf_artefactids.selecteddata) {
signal($('instconf_artefactids_unselect_' + key), 'onclick', instconf_artefactids.unselect);
}
// add in ones we need
if (a.attachments.length > 0) {
for (var i = 0; i < a.attachments.length; i++) {
instconf_artefactids.add_to_selected_list(a.attachments[i]);
}
}
}
}
else {
addElementClass('instconf_text_header', 'hidden');
addElementClass('instconf_text_container', 'hidden');
addElementClass('instconf_otherblocksmsg_container', 'hidden');
if (jQuery('#instconf_license_header').length) {
// only deal with these if the license metadata is enabled
addElementClass('instconf_license_header', 'hidden');
addElementClass('instconf_license_container', 'hidden');
addElementClass('instconf_license_description', 'hidden');
addElementClass('instconf_license_advanced_fieldset', 'hidden');
}
addElementClass('instconf_tags_header', 'hidden');
addElementClass('instconf_tags_container', 'hidden');
addElementClass('instconf_tags_description', 'hidden');
removeElementClass('instconf_textreadonly_header', 'hidden');
removeElementClass('instconf_textreadonly_container', 'hidden');
removeElementClass('instconf_readonlymsg_container', 'hidden');
removeElementClass('instconf_licensereadonly_header', 'hidden');
removeElementClass('instconf_licensereadonly_container', 'hidden');
removeElementClass('instconf_tagsreadonly_header', 'hidden');
removeElementClass('instconf_tagsreadonly_container', 'hidden');
}
if (table = getFirstParentByTagAndClassName($('instconf_text_container'), 'table', 'maharatable')) {
updateBlockConfigWidth(getFirstParentByTagAndClassName(table, 'div', 'blockinstance'), getElementDimensions(table).w);
}
}
connect('chooseartefactlink', 'onclick', function(e) {
e.stop();
toggleElementClass('hidden', 'instconf_artefactid_container');
toggleElementClass('hidden', 'instconf_managenotes_container');
});
forEach(getElementsByTagAndClassName('a', 'copytextboxnote', 'instconf'), function(link) {
connect(link, 'onclick', function(e) {
e.stop();
forEach(getElementsByTagAndClassName('input', 'radio', 'artefactid_data'), function(i) {
if (i.checked) {
i.checked = false;
}
});
jQuery('#instconf_makecopy').prop('checked', true);
addElementClass('instconf_textreadonly_header', 'hidden');
addElementClass('instconf_textreadonly_container', 'hidden');
addElementClass('instconf_readonlymsg_container', 'hidden');
addElementClass('instconf_otherblocksmsg_container', 'hidden');
addElementClass('instconf_licensereadonly_header', 'hidden');
addElementClass('instconf_licensereadonly_container', 'hidden');
addElementClass('instconf_tagsreadonly_header', 'hidden');
addElementClass('instconf_tagsreadonly_container', 'hidden');
removeElementClass('instconf_text_header', 'hidden');
removeElementClass('instconf_text_container', 'hidden');
if (jQuery('#instconf_license_header').length) {
// only deal with these if the license metadata is enabled
removeElementClass('instconf_license_header', 'hidden');
removeElementClass('instconf_license_container', 'hidden');
removeElementClass('instconf_license_description', 'hidden');
removeElementClass('instconf_license_advanced_fieldset', 'hidden');
}
removeElementClass('instconf_tags_header', 'hidden');
removeElementClass('instconf_tags_container', 'hidden');
removeElementClass('instconf_tags_description', 'hidden');
});
});
augment_tags_control('instconf_tags');
if (jQuery('#instconf_license').length) {
removeElementClass('instconf_license', 'hidden');
}
if (jQuery('#instconf_license_advanced_fieldset').length) {
removeElementClass(getFirstElementByTagAndClassName('fieldset', null, 'instconf_license_advanced_fieldset'), 'hidden');
}
$j(function() {
$j("#instconf_retractable").click(function() {
if (this.checked) {
$j("#instconf_retractedonload").removeAttr("disabled");
$j("#instconf_retractedonload").removeAttr("checked");
}
else {
$j("#instconf_retractedonload").removeAttr("checked");
$j("#instconf_retractedonload").attr("disabled", true);
}
});
});
views.js?v=1.9.1:1341
ERROR: sendjsonrequest() callback failed: TypeError: Cannot read property 'addEventListener' of null [object Object] Packed.js?v=1.9.1:1757
---
Thanks for your help!
]]>As I am not able to replicate this error can you do a test for me?
Can you edit the htdocs/js/views.js file and add this line:
console.log(configblock.javascript);
below this line (approx line 1339):
appendChildNodes(document.body, DIV({id: 'overlay'}));
Then in Firefox (with firebug plugin added) can you let me know what the console message is? It should be a bunch of lines beginning with 'var pf_instconf ='
I believe the data that is trying to render the 'instconf' form is somehow wrong for you and hence why the form doen't appear, but I'm not sure what exactly is wrong.
Cheers
Robert
]]>Note that we rolled back from 1.9.0 to 1.8.1 which was successful as a workaround, but we'll obviously be holding off on 1.9.1 since it sounds like we'd see the same issue anyway.
]]>ERROR: sendjsonrequest() callback failed: TypeError: Cannot read property 'addEventListener' of null [object Object] Packed.js?v=1.9.1:1757
]]>
I've been helping David look into this. To follow up on his comments, the element which MochiKit is attempting to reference is named "instconf". At the time that this piece of code is being executed there doesn't appear to be any element by that name loaded into the DOM.
Cheers,
Chris
]]>i got the following information from the company that runs our server. I am sorry it means nothing to me, but if there is a wider problem it may possibly be helpful?
"Stack trace (usually hidden) when failure occurs in Chrome:
"TypeError: Cannot read property 'addEventListener' of null
at MochiKit.Base.update.connect (http://mahara.tcol.ac.nz/js/MochiKit/Packed.js?v=1.9.0:4662:16)
at Pieform.init (http://mahara.tcol.ac.nz/lib/pieforms/static/core/pieforms.js?v=1.9.0:148:49)
at eval (eval at <anonymous> (http://mahara.tcol.ac.nz/js/views.js?v=1.9.0:1342:29), <anonymous>:1:390)
at http://mahara.tcol.ac.nz/js/views.js?v=1.9.0:1342:13
at addConfigureBlock (http://mahara.tcol.ac.nz/js/views.js?v=1.9.0:1343:11)
at http://mahara.tcol.ac.nz/js/views.js?v=1.9.0:555:17
at d.addCallbacks.document.documentElement.style.cursor (http://mahara.tcol.ac.nz/js/mahara.js?v=1.9.0:248:23)
at Object.MochiKit.Async.Deferred._fire (http://mahara.tcol.ac.nz/js/MochiKit/Packed.js?v=1.9.0:2229:5)
at cb (http://mahara.tcol.ac.nz/js/MochiKit/Packed.js?v=1.9.0:2236:6)
at Object.MochiKit.Async.Deferred._fire (http://mahara.tcol.ac.nz/js/MochiKit/Packed.js?v=1.9.0:2229:5)""
I've tested the essential theme in Mahara 1.9 and I am unable to replicate your problem. There could indeed be a bug in Mahara 1.9 that is causing your issue but it hard to tell what exactly is causing things to go wrong.
The files for the essential theme that I am testing with come from the zip file on the page in the earlier post.
Are your Essential theme files possibly older/out of date?
Are you able to view the error logs to see if there is any useful errors occuring when you try adding a blcok to a page?
Is the browser showing any javascript errors?
Cheers
Robert
]]>]]>
I tried installing the Essential theme on my 1.10dev site and it worked fine for me in Firefox and Chrome. What version of Mahara are you using?
As the Essential theme is not part of core Mahara it might be worth contacting the theme creator about your issue. This forum post has more details.
Cheers
Robert
]]>
I have zero technical knowledge so have recorded screencast of what the problem is. Any help gratefully accepted.
http://tcol-tutorials.ac.nz/p6w4nku0tzn/
]]>