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

Issue copying a document that has its save comment longer than 255 characters

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A

    Description

      Steps to reproduce on a XEM 4.4.1:

      • attach a file with a long name to a wiki page but make sure its length < 255; the name of the attachment should contain blank spaces, special characters for instance "Erreur connue - éééé ùùùùùùùùùùùùù dans èèèèèè et AxiAM ààààààààààààààààààààà gjhdghjdghf.msg"
      • in the history tab the summary should look like
         "Ajout du fichier <a href="/xwiki/wiki/projects/downloadrev/SomeLongSpaceName/SomeEvenLongerPageName/Erreur+connue+-+%C3%A9%C3%A9%C3%A9%C3%A9+%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9%C3%B9+dans+%C3%A8%C3%A8%C3%A8%C3%A8%C3%A8%C3%A8+et+AxiAM+%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0%C3%A0+gjhdghjdghf.msg?rev=1.1">Erreur+connue+-+éééé+ùùùùùùùùùùùùù+dans+èèèèèè+et+AxiAM+ààààààààààààààààààààà+gjhdghjdghf.msg</a>"
        

      So the final comment has more than the maximum allowed value which is 255 and if you try to copy this page to another sub-wiki or to import and export it with history, you will get

      Caused by: java.sql.BatchUpdateException: Data truncation: Data too long for column 'XWR_COMMENT' at row 1

      .

      Maybe we could trim the comment in such cases?

      Attachments

        Issue Links

          Activity

            People

              vmassol Vincent Massol
              raluca.moisa Raluca Moisa
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: