Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-21709

Invalid Error Message When Attaching a File That Has Validation Problems

      NOTE: This bug report is for Confluence Cloud. Using Confluence Server? See the corresponding bug report.

      When trying to upload large files that exceeds the max attachments size (default 10M) there's a weird browser behavior that only happens in a certain way. Here's the steps to reproduce:
      1. Create a new page in a space.
      2. Save the post.
      3. Edit the post again.
      4. From the Rich Text editor toolbar, select Insert -> Attach
      5. Select a file from your local disk that exceeds the default size (above 10 megabytes)

      After the file upload progress bar is done, you can see a file download prompt from the browser for "attachfile.action". The behavior is the same for IE and Firefox. See attached screenshots.

        1. FireFox_error2.png
          FireFox_error2.png
          1.04 MB
        2. IE_error1.png
          IE_error1.png
          1.27 MB

            [CONFCLOUD-21709] Invalid Error Message When Attaching a File That Has Validation Problems

            Hi everyone,

            Thank you for previously raising this bug and bringing it to our attention.

            Within our company roadmap and work capacity, we try to address or review each bug request but admit that not each one will be resolved. To continue the culture of being honest and open, we are closing this bug to focus on our upcoming roadmap for all Confluence users.

            As we continue to roll out features we do look at requests made by our users and if you feel like this bug is still impacting your team please let us know.

            Thank you again for providing valuable feedback to our team!

            Sunny Xu (Inactive) added a comment - Hi everyone, Thank you for previously raising this bug and bringing it to our attention. Within our company roadmap and work capacity, we try to address or review each bug request but admit that not each one will be resolved. To continue the culture of being honest and open, we are closing this bug to focus on our upcoming roadmap for all Confluence users. As we continue to roll out features we do look at requests made by our users and if you feel like this bug is still impacting your team please let us know. Thank you again for providing valuable feedback to our team!

            Michael Rudolph added a comment - - edited

            Still broken in 5.8.5 and 6.0.4 when using Arsenal Lockpoint plugin

            Michael Rudolph added a comment - - edited Still broken in 5.8.5 and 6.0.4 when using Arsenal Lockpoint plugin

            Still broken in Confluence 5.6.1 with IE10. Only difference from the original bug description is that the error message now references" attachfile.json" instead of "attachfile.action".

            Scott Dudley [Inactive] added a comment - Still broken in Confluence 5.6.1 with IE10. Only difference from the original bug description is that the error message now references" attachfile.json" instead of "attachfile.action".

            Hi david@arsenalesystems.com

            Thanks for getting in touch. Unfortunately this isn't on our immediate backlog. There are a number of higher priority issue that we need to address before tackling problems such as this. As soon as we have any updates on this we'll make sure this ticket it updated.

            Regards
            Steve Haffenden
            Confluence Bugmaster
            Atlassian

            Steve Haffenden (Inactive) added a comment - Hi david@arsenalesystems.com Thanks for getting in touch. Unfortunately this isn't on our immediate backlog. There are a number of higher priority issue that we need to address before tackling problems such as this. As soon as we have any updates on this we'll make sure this ticket it updated. Regards Steve Haffenden Confluence Bugmaster Atlassian

            Confluence team- What is the status on fixing this? This continues to cause user confusion and generate support tickets for us due to the underlying coding error in Confluence JS. As shown in the code snippet above, the fix looks pretty trivial.

            David Goldstein [Arsenale] added a comment - Confluence team- What is the status on fixing this? This continues to cause user confusion and generate support tickets for us due to the underlying coding error in Confluence JS. As shown in the code snippet above, the fix looks pretty trivial.

            Scott Dudley [Inactive] added a comment - - edited

            In Confluence 4.3.3, this has been partially fixed for Firefox (although not IE). In Firefox, instead of displaying the download file dialog, it displays just a stock error message that is not helpful:

            Could not upload the file to Confluence. The server may be unavailable.

            When a more-suitable error message is available (such as "the file is too large" or "the file contains invalid characters"), it seems like that should be displayed rather than the generic message.

            I tracked this problem down to ajs/message-handler.js:

             46             // Extracts XWork-style errors from a response object and displays them.
             47             // Returns true if errors were found and handled, false otherwise.
             48             handleResponseErrors: function (response, defaultMessage) {
             49                 var errors = [].concat(response.validationErrors || []).concat(response.actionErrors || []).concat(response.error    Message || []);
             50                 if (errors.length) {
             51                     this.displayMessages(defaultMessage || errors);
             52                     return true;
             53                 }
             54                 return false;
             55             }
            

            In line 51, it appears that the message handler is explicitly ignoring the specific error messages and replacing them with the default error message.

            It seems like it would be a lot more user-friendly to actually display the more-specific error message (and this is how the file upload behavior works in other parts of Confluence).

            This nonspecific error message seems to be causing a lot of confusion with various related problems. eg.

            https://answers.atlassian.com/questions/41118/could-not-upload-the-file-to-confluence
            https://answers.atlassian.com/questions/48054/cannot-upload-attachments-using-the-file-uploader-error-could-not-upload-the-file-to-confluence-the-server-may-be-unavailable
            https://answers.atlassian.com/questions/41120/i-cannot-upload-an-image-file-to-page
            https://confluence.atlassian.com/display/CONFKB/Upload+attachment+function+does+not+work+in+Editing+mode
            https://answers.atlassian.com/questions/87032/error-uploading-image-using-the-brand-designer
            https://jira.atlassian.com/browse/CONF-26598
            https://jira.atlassian.com/browse/CONF-26532

            Scott Dudley [Inactive] added a comment - - edited In Confluence 4.3.3, this has been partially fixed for Firefox (although not IE). In Firefox, instead of displaying the download file dialog, it displays just a stock error message that is not helpful: Could not upload the file to Confluence. The server may be unavailable. When a more-suitable error message is available (such as "the file is too large" or "the file contains invalid characters"), it seems like that should be displayed rather than the generic message. I tracked this problem down to ajs/message-handler.js: 46 // Extracts XWork-style errors from a response object and displays them. 47 // Returns true if errors were found and handled, false otherwise. 48 handleResponseErrors: function (response, defaultMessage) { 49 var errors = [].concat(response.validationErrors || []).concat(response.actionErrors || []).concat(response.error Message || []); 50 if (errors.length) { 51 this .displayMessages(defaultMessage || errors); 52 return true ; 53 } 54 return false ; 55 } In line 51, it appears that the message handler is explicitly ignoring the specific error messages and replacing them with the default error message. It seems like it would be a lot more user-friendly to actually display the more-specific error message (and this is how the file upload behavior works in other parts of Confluence). This nonspecific error message seems to be causing a lot of confusion with various related problems. eg. https://answers.atlassian.com/questions/41118/could-not-upload-the-file-to-confluence https://answers.atlassian.com/questions/48054/cannot-upload-attachments-using-the-file-uploader-error-could-not-upload-the-file-to-confluence-the-server-may-be-unavailable https://answers.atlassian.com/questions/41120/i-cannot-upload-an-image-file-to-page https://confluence.atlassian.com/display/CONFKB/Upload+attachment+function+does+not+work+in+Editing+mode https://answers.atlassian.com/questions/87032/error-uploading-image-using-the-brand-designer https://jira.atlassian.com/browse/CONF-26598 https://jira.atlassian.com/browse/CONF-26532

            In Confluence 4.3, this now just displays an empty "Attach File(s)" dialog box with a done button, even though it still does nothing and prevents the file from being uploaded.

            Scott Dudley [Inactive] added a comment - In Confluence 4.3, this now just displays an empty "Attach File(s)" dialog box with a done button, even though it still does nothing and prevents the file from being uploaded.

            It can also be the filename like Scott says.

            If I manualy upload a file with a & sign in the name it gives me this error. One user was getting the same errors as this when the & was there.

            "Excluded & High Risk Category.doc contains illegal characters ('&', '+', '?', '|' or '=')."

            Elvar Bjarki Böðvarsson added a comment - It can also be the filename like Scott says. If I manualy upload a file with a & sign in the name it gives me this error. One user was getting the same errors as this when the & was there. "Excluded & High Risk Category.doc contains illegal characters ('&', '+', '?', '|' or '=')."

            This also happens if you try to attach a file that contains a "+" in the filename, or really, if you run into any other sort of condition that invokes Confluence's I-have-a-problem-with-the-attachment error handling.

            Scott Dudley [Inactive] added a comment - This also happens if you try to attach a file that contains a "+" in the filename, or really, if you run into any other sort of condition that invokes Confluence's I-have-a-problem-with-the-attachment error handling.

              Unassigned Unassigned
              asdosreis AlysonA
              Affected customers:
              13 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated:
                Resolved: