Added references field later to the model, not saving the changes

I added references field later to my data model:
Here is the model:

In the data entry, when I pick a reference:

There is no reference there, it does not save it to my model at all.

Why is this happening, and how could I fix this, I think it’s a bug in your site.

Hi @radikris,

I can see that in your userstory data model, for some reason when I choose an entry in the “References” field I cannot publish the update and the changes are not saved. I would suggest the default value in the reference field matches the default value in the object field.

In any case, when I created new entries they didn’t seem to be affected by the bug so you should be ok moving forward. The default references were populating on my end. Can you try creating a new entry and checking? Apologies for any inconvenience!

Yes that’s true, for new instances it will work, but it is not the best user experience that we need to copy our old datas to the new one.
We only have some entries, but what if this would happen after 100 entries, we again need to make custom api update calls, like we had to do ourself with the localization as well.

Hi @radikris,

Yes you will need to copy the old data to new entries. If you’d like to automate it you could write a script that uses our Write API to do so.

That said, thank you for your feedback above. I understand this is not ideal and I’ll share this with the product team at Builder so we can improve the user experience. I’ve also submitted a ticket to our engineering team so we can investigate this bug further.

Best,
AJ

Hi again, just updating here with another workaround which may be easier. It’s possible that your data model originally did not have default values set and model schema changes don’t apply retroactively on content entries. To fix this for old entries you can open the JSON and add and empty references object (see below). Now when you select a reference it should be saved in the JSON and you will be prompted to publish the update.

Screen Shot 2022-08-09 at 6.53.51 PM