Issue Bug New Orphaned

#72962Avoid garbage upon failed import

Bernhard Kraft 01/27/16, 12:47 updated 01/17/18, 15:40

Description

When importing a large page structure any exception which could possibly get thrown will result in an abort of the import. All records which got inserted into the database until then could end up on a wrong page, link to wrong elements, etc. as relations between records are only updated after all records got inserted. The same is true for an import which got aborted because of a PHP script timeout.

This bugfix resolves the problem by introduction DB transactions via the DatabaseConnection class. In the case of a failed import all statements are rolled back and newly created files will get removed.

Reviews 1

Fix this issue

Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch

Commit message
[BUGFIX] Avoid garbage upon failed import Resolves: #72962 Releases: main