Skip to content

Heading in amendment leads to crash #6030

@MSoeb

Description

@MSoeb

Describe the bug
Headings in amendments cause crashes. This can occur in different ways.

Scenario 1: A new heading is added as a new line at the end of a paragraph. After saving the amendment, the title of the amendment is no longer visible. If the main motion is now opened, it crashes and errors are displayed in the console.
Scenario 1 seem not to occur every time. Don't know why.

Scenario 2 (likely a consequence of 1): If change recommendations are subsequently entered in the amendment, this causes another crash, but with different error messages. In addition, this causes the main motion and the lists of amendments to fail to load. Working is not really possible anymore.

Scenario 1 - Missing amendment title
Image

Scenario 1 - error after opening the main motion with check mark to see amendments
Image

Scenario 2 - error message:
Image

How to Reproduce

  1. Open a meeting
  2. open motions
  3. create a motion with the motion text below
  4. create an amendment on the second paragraph (line 4-7) with the amendment text below. Save it.
  5. open main motion. open console. activate all amendments -> see the error message and ui problem above line 7
  6. Reload page
  7. open amendment list > open amendment
  8. Add a change recommendation to line 7 and 8 and delete the last word of the heading. Save it -> Crash. Errors in console.
  9. Reload > open main motion > crash
  10. open motions > open amendment list > crash with at least the affected amendment.

Motion text:

<p>Jemand musste Josef K. verleumdet haben, denn ohne dass er etwas Böses getan hätte, wurde er eines Morgens verhaftet. »Wie ein Hund! « sagte er, es war, als sollte die Scham ihn überleben.</p><p>Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte, fand er sich in seinem Bett zu einem ungeheueren Ungeziefer verwandelt. Und es war ihnen wie eine Bestätigung ihrer neuen Träume und guten Absichten, als am Ziele ihrer Fahrt die Tochter als erste sich erhob und ihren jungen Körper dehnte.</p><p>»Es ist ein eigentümlicher Apparat«, sagte der Offizier zu dem Forschungsreisenden und überblickte mit einem gewissermaßen bewundernden Blick den ihm doch wohlbekannten Apparat. Sie hätten noch ins Boot springen können, aber der Reisende hob ein schweres, geknotetes Tau vom Boden, drohte ihnen damit und hielt sie dadurch von dem Sprunge ab.</p>

Amendment text:

<p>Als Gregor Samsa eines Morgens aus unruhigen Träumen erwachte, fand er sich in seinem Bett zu einem ungeheueren Ungeziefer verwandelt. Und es war ihnen wie eine Bestätigung ihrer neuen Träume und guten Absichten, als am Ziele ihrer Fahrt die Tochter als erste sich erhob und ihren jungen Körper dehnte.</p><h3>Diese Überschrift wird Probleme machen</h3>

Expected behavior
It should be possible to add new heading via amendment without errors and additinal it should be possible to create a change reco on added headings in an amendment.

Additional information
This is part of #2956

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions