Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-17345

Dot in docName breaks the deletedAttachments Live table

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 12.4, 11.10.6
    • 11.3.5
    • Index
    • Easy
    • N/A
    • N/A

    Description

      Steps to reproduce:

      • Create a page with dot in the name
      • Attach a file
      • Delete the attachment
      • Go in Page Index > Deleted attachments

      Results:

      • The results in livetable are not displayed anymore.
      • Inspect the page, go to Network > Response
      • The following error is displayed:
      SyntaxError: JSON.parse: bad control character in string literal at line 12 column 16 of the JSON data
      
      {
      "totalrows": 1,
      "returnedrows": 1,
      "offset": 1,
      "reqNo": 1,
      "query" : "select datt.id, datt.filename from DeletedAttachment as datt where 1=1  order by datt.filename asc", 
      "rows": [
      {
      "deleteUrl" : "/xwiki/bin/delattachment/0.%20Plan%2020K%20PCR/1.Solution%20BDC%20Sansure%20-%20BioRad%20.Blue-Dna.CFX96.%20bis/WebHome/1585755473811-717.png?trashId=1&form_token=XN6hRTKCVdIRn2xUyAaDCg",
      "url" : "/xwiki/bin/downloadrev/0.%20Plan%2020K%20PCR/1.Solution%20BDC%20Sansure%20-%20BioRad%20.Blue-Dna.CFX96.%20bis/WebHome/1585755473811-717.png?rev=1.1&rid=1",
      "filename"  : "1585755473811-717.png",
      "docName"  : "0
      . Plan 20K PCR.1
      .Solution BDC Sansure - BioRad 
      .Blue-Dna
      .CFX96
      . bis.WebHome",
      "title"  : "1.Solution BDC Sansure - BioRad .Blue-Dna.CFX96. bis",
      "documentUrl" : "/xwiki/bin/view/0.%20Plan%2020K%20PCR/1.Solution%20BDC%20Sansure%20-%20BioRad%20.Blue-Dna.CFX96.%20bis/",
      "canDelete" : true,
      "canRestore" : false,
      "alreadyExists" :  false ,
      "restoreUrl" : "/xwiki/bin/download/0.%20Plan%2020K%20PCR/1.Solution%20BDC%20Sansure%20-%20BioRad%20.Blue-Dna.CFX96.%20bis/WebHome/1585755473811-717.png",
      "date" : "2020 May 21, 09:42",
      "deleter" : "XWiki.Admin",
      "deletername" : "Administrator",
      "deleterurl" : "/xwiki/bin/view/XWiki/Admin"
      }
      ]}
      

      Because the livetable is broken (empty), no attachment can be restored.


       

      Attachments

        Activity

          People

            mflorea Marius Dumitru Florea
            andreic Camelia Andrei
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: