This appears to be a regression.

If you upload a new image or edit an existing one, you will see:
[[wysiwyg_imageupload::]]
instead of something like
[[wysiwyg_imageupload:1355:]]
A symptom of this problem is that the ajax that submits the form upon hitting the "INSERT" button is failing to return json. Instead it's returning markup
Only local images are allowed.

This form is rendered in sites/all/modules/wysiwyg_imageupload/wysiwyg_imageupload.form.inc in the wysiwyg_imageupload_edit_form function. The piece of code looking for a JSON string is in sites/all/modules/wysiwyg_imageupload/plugins/imgupload/imgupload.js around line 86. Since json isn't returned we get an error of "Parseerror" as shown in the console after I added an error handler on this form submission like so:
var form = $(dialogIframe).contents().find('form#wysiwyg-imageupload-edit-form');
form.ajaxSubmit({
dataType : 'json',
method: 'post',
async: false,
data: {
submitimagedetails : 'JSinsert',
parent_build_id: Drupal.settings.wysiwyg_imageupload.current_form
},
success : function(data,status,xhr,jq) {
console.log(data);
console.log(status);
iid = data.data.iid;
if(!iid) {
return;
}
},
error: function(one,two,three) {
console.log(one);
console.log(two);
console.log(three);
console.log('There was an error in add');
}
});
Note that iid=0 above so that is part of the reason we get jack in the tag. iid is set in the success handler. It turns out that what is said in #825180 is true and there is nothing being sent in "submitted" key on the form state.

Comments

generalredneck created an issue. See original summary.

generalredneck’s picture

Status: Active » Needs review
StatusFileSize
new847 bytes
generalredneck’s picture

Removed the button from view.

mcpuddin’s picture

I can confirm this as well and the patch does work. I'm not 100% sure, but I recently updated my Drupal 6 core system and that might've made the previous fix for #825180: Dialog returns empty img tag invalid, but I haven't actually confirmed that... doubt this will go anywhere, but the patch looks good to me! haha

mcpuddin’s picture

Status: Needs review » Reviewed & tested by the community
sano’s picture

thank you for the patch.