Uploaded image for project: 'translate5'
  1. translate5
  2. TRANSLATE-4549

Segment can not be saved due error 400 Bad Request - invalid Markup provided

    • High
    • In special circumstances using spellcheck and track changes lead to non savable segments.

      problem

      Some segment content can not be saved with the following error: 

      400 Bad Request - invalid Markup provided 

      reproduction

      setup task

      Since track changes and inserts / deletes from a different user is needed, setup a review task with two steps, review and second review:

      change segment in a workflow step (here review)

      replace the previous content with new content which triggers spellcheck at the beginning of the segment (mage spellcheck work) was added.

      go to next workflow step

      Go to next workflow step, so that the user gets the track changes from the previous user, as seen above.

      Open the segment, make a mouse over to the added and deleted content so that the insert / delete tooltip is shown. This adds a generated id ext-id-NUM to the ins / del dom element.

      then modify the segment

      delete the word "work" and put it to the beginning - here in same colors since same user used:

      After the movement of the word the spellchecker runs again, cutting the previous ins tag and producing two ins tags (all fine with that) but keeps the same id for both tags (not fine): 

      Editor DOM:

       

      This produces then an error on saving:

      The segment is not saved.

      solution

      Remove in JS the ids from the trackchanges when cutting the tags into parts by spellchekcer or termtagger. For TermTagger I assume the same problem, though not tested.

          [TRANSLATE-4549] Segment can not be saved due error 400 Bad Request - invalid Markup provided

          Marc Mittag [Administrator] made changes -
          Link Original: This issue relates to MITTAGQI-351 [ MITTAGQI-351 ]
          Marc Mittag [Administrator] made changes -
          Link New: This issue relates to MITTAGQI-351 [ MITTAGQI-351 ]
          Sylvia Schumacher made changes -
          Link New: This issue relates to TS-4424 [ TS-4424 ]
          Leon Kiz made changes -
          Rank New: Ranked lower
          Leon Kiz made changes -
          Rank New: Ranked higher
          Marc Mittag [Administrator] made changes -
          Status Original: Selected for dev [ 10100 ] New: In Progress [ 3 ]
          Thomas Lauria made changes -
          Status Original: Open [ 10002 ] New: Selected for dev [ 10100 ]
          Thomas Lauria made changes -
          Link New: This issue relates to TRANSLATE-4550 [ TRANSLATE-4550 ]
          Thomas Lauria made changes -
          Description Original: h1.problem

          h1.reproduction

          h2.setup task

          Since track changes and inserts / deletes from a different user is needed, setup a review task with two steps, review and second review:

          !image-2025-03-18-16-03-36-355.png|width=394,height=214!

          h2.change segment in a workflow step (here review)

          replace the previous content with new content which triggers spellcheck at the beginning of the segment (mage spellcheck work) was added.

          !image-2025-03-18-16-04-32-698.png!

          h2.go to next workflow step

          Go to next workflow step, so that the user gets the track changes from the previous user, as seen above.

          Open the segment, make a mouse over to the added and deleted content so that the insert / delete tooltip is shown. This adds a generated id ext-id-NUM to the ins / del dom element.

          !image-2025-03-18-16-08-36-107.png!

          h2.then modify the segment

          delete the word "work" and put it to the beginning - here in same colors since same user used:

          !image-2025-03-18-16-09-50-589.png!

          After the movement of the word the spellchecker runs again, cutting the previous ins tag and producing two ins tags (all fine with that) but keeps the same id for both tags (not fine): 

          Editor DOM:

          !image-2025-03-18-16-16-46-655.png!

           

          This produces then an error on saving:

          !image-2025-03-18-16-11-31-315.png!

          The segment is not saved.

          h1.solution

          Remove in JS the ids from the trackchanges when cutting the tags into parts by spellchekcer or termtagger. For TermTagger I assume the same problem, though not tested.
          New: h1. problem

          Some segment content can not be saved with the following error: 
          {code:java}
          400 Bad Request - invalid Markup provided {code}
          h1. reproduction
          h2. setup task

          Since track changes and inserts / deletes from a different user is needed, setup a review task with two steps, review and second review:

          !image-2025-03-18-16-03-36-355.png|width=394,height=214!
          h2. change segment in a workflow step (here review)

          replace the previous content with new content which triggers spellcheck at the beginning of the segment (mage spellcheck work) was added.

          !image-2025-03-18-16-04-32-698.png!
          h2. go to next workflow step

          Go to next workflow step, so that the user gets the track changes from the previous user, as seen above.

          Open the segment, make a mouse over to the added and deleted content so that the insert / delete tooltip is shown. This adds a generated id ext-id-NUM to the ins / del dom element.

          !image-2025-03-18-16-08-36-107.png!
          h2. then modify the segment

          delete the word "work" and put it to the beginning - here in same colors since same user used:

          !image-2025-03-18-16-09-50-589.png!

          After the movement of the word the spellchecker runs again, cutting the previous ins tag and producing two ins tags (all fine with that) but keeps the same id for both tags (not fine): 

          Editor DOM:

          !image-2025-03-18-16-16-46-655.png!

           

          This produces then an error on saving:

          !image-2025-03-18-16-11-31-315.png!

          The segment is not saved.
          h1. solution

          Remove in JS the ids from the trackchanges when cutting the tags into parts by spellchekcer or termtagger. For TermTagger I assume the same problem, though not tested.
          Thomas Lauria made changes -
          Summary Original: Segment can not be saved due error 400 New: Segment can not be saved due error 400 Bad Request - invalid Markup provided
          Thomas Lauria created issue -

            leonkiz Leon Kiz
            tlauria Thomas Lauria
            Thomas Lauria
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: