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.

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

              Created:
              Updated: