Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-40882

PostEm > Incorrect error message when uploading wrong file type

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 11.4, 12.4, 19.0, 20.0 [Tentative]
    • Fix Version/s: 12.5, 19.0, 20.0 [Tentative]
    • Component/s: Post'Em
    • Labels:
      None
    • 19 status:
      Resolved
    • 12 status:
      Resolved
    • Test Plan:
      Hide
      1. In any site with both Resources and PostEm, upload an XLS/XLSX file to Resources
      2. In PostEm, click the 'Add' tab
      3. Enter some text into the 'Title' field, then click the button 'Choose a CSV file or URL from Resources'
      4. Click 'Attach a copy' beside the XLS/XLSX file you uploaded to resources; then click 'Continue'
      5. Click the 'Post' button; verify you see the appropriate error message indicating the file is of the wrong type
      6. Repeat the process above, this time uploading a new copy of the same file from your local file system (rather than selecting the one already uploaded to Resources), and again verify that you receive the appropriate error message indicating the file is of the wrong type
      Show
      In any site with both Resources and PostEm, upload an XLS/XLSX file to Resources In PostEm, click the 'Add' tab Enter some text into the 'Title' field, then click the button 'Choose a CSV file or URL from Resources' Click 'Attach a copy' beside the XLS/XLSX file you uploaded to resources; then click 'Continue' Click the 'Post' button; verify you see the appropriate error message indicating the file is of the wrong type Repeat the process above, this time uploading a new copy of the same file from your local file system (rather than selecting the one already uploaded to Resources), and again verify that you receive the appropriate error message indicating the file is of the wrong type

      Description

      When uploading a feedback file in PostEm, the instructions clearly state:

      Your feedback file must be saved in .csv format.
      The first column of your file must contain individual usernames.
      The first row of your file must contain headings.

      However, when you upload or link to a file in resources which is not a CSV, the error message is not appropriate:

      Some data in your uploaded file exceeded the 2,000 character limit and was truncated.
      Alert: Each column heading in your uploaded file may not exceed 500 characters.

      These errors may not be accurate, as the data in the file may be completely valid. The problem here is that the file type is invalid, and the error message should indicate this to the user to help them resolve the problem. There is already an error message present in the code designed to report this issue, but it's not being populated in this scenario:

      The file "fileName.ext" that you uploaded is not a valid file type. Please make sure your file is saved as a *.csv file and try again.

      The linked PR ensures that this error message is displayed to the user in the appropriate situation. It also removes the "Alert: " prefix on several error messages, as it's redundant and unnecessary.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                bjones86 Brian Jones
                Reporter:
                bjones86 Brian Jones
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Git Source Code