0

We have an instance where a portal that should have been using ghosted content types was not. Is it possible now that there is data records for these various content types to change to the ghosted content type and map to the master?

It does not seem right now there is option to change scope to Ghosted unless "other" is the option to select and then you have to know what to type in which maybe?

Perhaps this isn't possible. Is there a best method to handle this in that case.

1 Answers1

1

Ghost types are actually placeholder entries in the ToSIC_EAV_AttributeSets table. They usually have the same name as the original and have the original type ID in the column UsesConfigurationOfAttributeSet.

In addition to this, there are no entries in ToSIC_EAV_AttributesInSets for the ghost, as all attributes are inherited so the ghost doesn't have these entries. But a normal type has this, because the ToSIC_EAV_Values table uses the IDs to map a value to a specific attribute.

To "migrate" to such a setup is a bit messy but I guess you can do it. In the end you would need to have done all this:

  1. Changed your ToSIC_EAV_AttributeSets to specify they are ghosts
  2. Removed all entries in ToSIC_EAV_AttributesInSets for these types
  3. fixed all ToSIC_EAV_Values to use the AttributeId of the correct field in the master

This is probably quite difficult. My guess is that it would be easier to do ca. this:

  1. Export the list of one content-type
  2. Make the changes on the ...AttributeSets and ...AttributesInSets
  3. Restart DNN - it will then probably assume all the items exist, but are empty
  4. Then re-import the data you exported before

This is just guess work, it's probably rarely done so there is no full guide on this.

iJungleBoy
  • 5,325
  • 1
  • 9
  • 21