Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing old versions of node results in SQL exception #6259

Closed
remkovb opened this issue Sep 2, 2019 · 1 comment
Closed

Removing old versions of node results in SQL exception #6259

remkovb opened this issue Sep 2, 2019 · 1 comment

Comments

@remkovb
Copy link

remkovb commented Sep 2, 2019

When wanting to remove old versions of a certain node, it results in a SQL exceptio:

System.Data.SqlClient.SqlException (0x80131904): The DELETE statement conflicted with the REFERENCE constraint "FK_umbracoDocumentVersion_umbracoContentVersion_id". The conflict occurred in database "korzo_nl", table "dbo.umbracoDocumentVersion", column 'id'.
The statement has been terminated.

Reproduction

Steps to reproduce

Just by doing this in code:

var cs = Current.Services.ContentService;
cs?.DeleteVersions(id, DateTime.Now);

the actual exception occures.

In Umbraco 8.0 to 8.1.3

Expected result

Expecting the method just to execute without any errors/exceptions and the versions being removed from database.

Actual result

Versions are not removed, exception occures and is shown in log.

@nul800sebastiaan
Copy link
Member

Thanks, this duplicates #5919

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants