Content access and retention for custom modules

I have not been able to find any documentation on the content system that backs custom modules. I probably don’t know where to look. Considering the custom module below…

I noticed yesterday that some of the content that my colleagues created disappeared. I am guessing that it is becuase I updated the module a few times via `hs project upload`. But I don’t know exactly what change wiped the data.

Outstanding questions:

  • What changes can I make to the module without losing the content that my team has added?
    • For example, can I rename `prepend text` and `append text`?
    • Or does that wipe out the content and reset it to the default?
    • Is there an ID that I can use to retain it across renames?
  • If I remove a field and then add it back later, is the content still available?
    I am using the new CMS React tools to build these things if it matters.

Hi @DonDenton ,

This is probably related to the serverside rendering beta (React). Updating the label of a field shouldn’t cause the content to be wiped, if you would update the name of the field, that would cause an issue with the content.

You can retrieve the ID of a module by fetching the meta.json from HubSpot after uploading your module. However, it shouldn’t be necessary to store that ID for the content to be preserved.
I have had many times where I would accidentally remove a field, and restoring it would restore the content as well, but this was always in a small timeframe, so I am not sure if that is always the case.

Thanks! We ran some experiments that seem to support what you’ve said. I just wish I knew the exact details instead of just guessing about how it works based on poking it.