Purging texts can leave orphan version data

Build 1501 on 14/Nov/2017  This topic last edited on: 10/Jun/2016, at 16:50

Purging text in some versions of GN4 can leave orphan version data. This is fixed in build 2055 (GN4-1973).

Navigating an article with max level = 5, the following error occurred:

'There is no object version with id ... and creation date-time ...'.

This was because an article's text was purged but the version data of the purged text was not removed from the database. In the gn_VersionDependencyTable remained records with gn_IsParent = 0 and with gn_DependentId referring text that was purged.

To find such records in the database execute the query:

select * from gn_VersionDependencyTable where gn_DependentId not in (select s_id from s_ObjectTable)

Such records should correspond to the ones returned by:

select * from gn_VersionDependencyTable where gn_DependentTime is not null and gn_DependentTime not in (select gn_Time from gn_VersionTable where gn_VersionTable.gn_ObjectId = gn_VersionDependencyTable.gn_DependentId)

and should all have gs_IsParent = 0.

You can delete such records and article navigation with max=5 should not give errors anymore.