Deletion of segment does not lead to deletion of segment specific calculations or overrides

When deleting a segment, calculations that are part of that segment remain in the print model, even though they have no use anymore.

When path changes happen in the document model, printing fails due to now faulty path references in those calculations, even though they aren’t used at all anymore. Overrides from bounding boxes which were only relevent for the now-deleted segment still occur as well. I managed to dig through the json to delete the faulty code and made it work again, but this seems like an issue to fix more generally.

How can we make sure that everything that was uniquely part of a deleted segment is also deleted from the print model, so that there are no leftovers which can cause problems later?

Hey @jasper-silent-root,
deleting a segment should also delete the nested calculations.
Is it possible that you provide the original Print Model and which segment you deleted?

Hi @felix-blazing-river, attached is the print model. The very first segment has a DIN-Template and calculations, like AdresseFinanzamtCalculation (indicated by arrow in screenshot). Deleting the first from four segments does not get rid of that calculation (and potentially others) from the json and the overrrides which is associated with only that first segment remain as well.

InvStG51Feststellung_Aenderungsbescheid_Fond_3.json (352.4 KB)

I reported the issue as a bug (A12PE-2278).

The bugfix is going to be deployed with Print Engine version 2.0.3