Opened 8 years ago

Closed 5 years ago

#13655 closed defect (patchwelcome)

LocalImage editor plugin breaks after one successful upload

Reported by: William Riley Owned by: Evan
Priority: low Milestone: tbd
Component: Editor Version: 1.7.0b1
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by bill)

I'm finding that after a successful upload in the LocalImage plugin, the uploader isn't working if you try to make any subsequent uploads. Setting a timeout before adding the image to the editor seems to fix the issue. If I change the onComplete event in _initialFileUploader to look like this:

_this.connect(fup, "onComplete", function(data){
	var urlPrefix = _this.baseImageUrl;
	urlPrefix = urlPrefix && urlPrefix.charAt(urlPrefix.length - 1) == "/" ? urlPrefix : urlPrefix + "/";
	urlInput.set("value", urlPrefix + data[0].file); //Single selection
	_this._isLocalFile = false;
	_this._setDialogStatus(true);
	setTimeout(function(){
		_this.setValue(_this.dropDown.get("value"));
	}, 200);
});

It seems to not break. I'm also finding that this doesn't happen if the image upload failed.

Probably not the best way to fix this, but at least it provides some insight as to what's going on (I think the editor needs to be shown right after uploading is complete to fix some styling.) Perhaps this is more of an uploader bug than a LocalImage bug.

Change History (6)

comment:1 Changed 8 years ago by bill

Description: modified (diff)
Owner: set to Jared Jurkiewicz

comment:2 Changed 8 years ago by Jared Jurkiewicz

Owner: changed from Jared Jurkiewicz to Chris Mitchell

comment:3 Changed 8 years ago by Jared Jurkiewicz

This plugin is owned by IBM, contributed by Eldon. Reassigning to Chris Mitchell to delegate to proper owner.

comment:4 Changed 8 years ago by Chris Mitchell

Owner: changed from Chris Mitchell to Evan

comment:5 Changed 6 years ago by bill

Priority: highlow

comment:6 Changed 5 years ago by bill

Resolution: patchwelcome
Status: newclosed

Unlikely this will be fixed unless someone wants to supply a patch (including a test case).

Note: See TracTickets for help on using tickets.