删除当前徽标后,在未提交的情况下上传徽标会显示错误

I just wanted to change the logo I had uploaded. So I went to /admin/config/logo, removed the current logo, and tried to upload the new one. It failed: POST https://example.discourse.group/uploads/complete-external-upload 400 (Bad Request)

It works when I scroll down and click submit to save after deleting the old logo before uploading the new one. It also works to drop the new logo without deleting the old one, but I didn’t try that at first because as long as there is a logo in place, the field doesn’t say I can do that.

I also tried uploading a new logo, deleting that, and uploading another one, which also fails:


Okay, actually the upload works. When you delete the old logo, upload a new one, ignore the error, and submit the changes, you will see the new logo. So, what does the error tell me, and why are the buttons disabled afterwards when it magically still works?

3 个赞

Thanks for posting this, @Moin.

I just tested this out, and it looks like the error shows when you drag-and-drop and image, but not when you click to upload - if you do that then there’s no issue.

That’s certainly a bug, so w’ell have a look and see what we can do about it.

Thanks!

3 个赞

Upon further testing, this issue only seemed to be happening intermittently, and not consistently with the same images or anything else like that. That being said, this has been resolved as part of another update, and I can no longer replicate it on any site.

1 个赞

At the moment, I can still reproduce it on my forum, which was updated about 15 hours ago. I will try again after the next deploy

2 个赞

To help debug this further:

  1. Does this happen every time you try to upload an image with drag-and-drop? Does it happen with any image you try it with?
  2. Do any errors show up in your console? If so, could you screenshot those and post them here?
  3. If it is happening consistently with one particular image, could you upload that image here?

Thanks!

1 个赞

So far, it happens every time I try to upload an image with drag-and-drop after deleting the current image without saving in between.
I recorded another video using the pencil sketch default image and the site setting interface instead of the config page. But the issue remains the same on both. Though the save button is much further down on the config page, which is why not saving after deleting is more likely there.

Yes, I don’t think the screenshot reveals much more than what I already mentioned in my first post.

It happens with every image I tried.


This is the one used in the recording above.

2 个赞

OK - thanks - will do some more testing and here and see what we can figure out.

1 个赞