View Issue Details

IDProjectCategoryView StatusLast Update
0034464mantisbtattachmentspublic2024-06-07 11:01
Reporterdiedie2 Assigned To 
Status newResolutionopen 
Product Version2.26.1 
Summary0034464: message upload should be better

I want to add an attachment to an issue, but when I click on "Add note", nothing happens. It's only when I hover over the file I got this error, which isn't even clear what is the problem exactly.

TagsNo tags attached.
Attached Files
image.png (17,599 bytes)   
image.png (17,599 bytes)   




2024-06-06 03:48

developer   ~0068954

I am not able to reproduce this.

Does the error appear when you attach the file, or when you submit it to the server by clicking Add Note ?

To my knowledge, a status code of 0 is usually returned when some kind of network error occurs during AJAX execution (read: I don't think this is something I can really help you with, as it is caused by something specific to your environment, not by MantisBT code.

To troubleshoot, you can use your browser's developer tools, to identify the failing HTTP request, possibly get additional information about the error and then analyze why it's not working.



2024-06-06 03:51

reporter   ~0068955

well, we've been using Mantis for at least 8 years now and this the first time this happens :-)

I will check dev tools asap!



2024-06-06 04:21

reporter   ~0068956

Last edited: 2024-06-06 04:21

OK this is weird; I was trying again with Dev Tools open...and now the file uploads without any problem. Although I'm sure I tried 3 times this morning. I didn't change anything, haven't reboot anything, but it's working again. Sorry to have you bothered.

Perhaps some more explanation if anyone with similar problem is searching or you wish to the debug:
The error showed on hovering the file after I clicked [i]Add note[/i]. Progressbar wasn't moving. I could add notes with text but no attachments. Browser wasn't frozen. What was in de console of the dev tools at that point, I guess I will never know....



2024-06-06 05:11

reporter   ~0068957

update: I was able to reproduce the error. When the file is open the moment you try to upload, this happens.



2024-06-07 02:55

developer   ~0068959

Thanks for the feedback.

I was able to reproduce the error. When the file is open the moment you try to upload, this happens.

I tried to reproduce this (i.e. open a test Excel sheet, save, leave it open and attach it to a new bugnote), but the file was uploaded successfully, so there must be additional considerations that makes it fail for you but not on my dev box (maybe environment-specific ? I tested on a W10 laptop with Mantis running on a WSL-based Ubuntu LAMP).

That being said, I agree that the way Dropzone.js was implemented needs improvement, particularly the box rendered when a file is uploaded - a clear visual clue that an error occurred would really help. Currently this has been hidden:

  • the SPAN in the .dz-error-mark DIV is empty
  • no specific CSS for .dz-error class

I'll try to fix that, PR will follow.



2024-06-07 04:00

reporter   ~0068960

Last edited: 2024-06-07 07:13

Does this help anything?
I'm on a W11 laptop using Edge. Mantis is running on a Windows Server 2022 with IIS 10, MySQL 8.0.36 en PHP 8.1.27



2024-06-07 05:13

developer   ~0068961

I don't have an IIS for testing, but it's possible that it handles file locking differently than Apache.

Anyway I'm not interested in the actual error itself here, as I just want to improve the display when any kind of error occurs so I can emulate the behavior with a different error type (e.g. file too big or unauthorized file type).

Since you have a consistently reproducible case, you'll be able to test the upcoming patch when I publish it and we should be fine.



2024-06-07 05:18

reporter   ~0068962

ok, will do!



2024-06-07 07:15

reporter   ~0068963

@degrad, if my screenshot is not needed, could you delete please (noticed I can't do it myself)....



2024-06-07 11:01

developer   ~0068964

Attachment is gone