2020-04-06, 12:13 AM
These steps to reproduce assume:
I've investigated this problem, and concluded that the simplest way to solve it is to insert this new line of code (properly indented) at line number 132 of jscripts/post.js:
Edit: although a more appropriate solution (deleting rather than adding code) is to simply remove from those three files the first occurrence in each of the code:
- That attachments are enabled and that the current user has the right to upload+remove them.
- That Javascript is enabled.
- Either load up a new thread with newthread.php, or load up a post for editing with editpost.php, or load up a new reply in a thread with newreply.php.
- Beside "New Attachment:" click "Choose Files" and select a valid file to upload.
- Click "Add Attachment". The page reloads and the attachment appears in the list.
- Beside the attachment, click "Remove" and then click "Yes" on the approval dialogue that pops up. The attachment fades out and is removed from the page.
- Repeat steps #2 and #3. The page reloads but the added attachment is not present and has not been saved.
I've investigated this problem, and concluded that the simplest way to solve it is to insert this new line of code (properly indented) at line number 132 of jscripts/post.js:
document.input.attachmentaid.value = '';
Edit: although a more appropriate solution (deleting rather than adding code) is to simply remove from those three files the first occurrence in each of the code:
!$mybb->get_input('attachmentaid', MyBB::INPUT_INT) &&