1

In my Tridion Reference Implementation website, I have defined a model with a set of properties, which map to fields of my published components. The TRI code is able to map these fields nicely to my model class, so in my component, i have a name and description. In my model class, these two properties nicely take the value of those fields in my component. This is something that the TRI does out of the box, using a class named DD4TModelBuilder.

Now, I added a couple of extra fields to my component's schema, added some values, and published these components.

I also added extra properties to my model class. Unfortunately, these fields stay null, so somehow, the Model Builder seems to ignore my new fields (old fields still work as before).

1 Answer 1

3

This problem is easy to solve. It's described in the documentation as well (http://docs.sdl.com/LiveContent/content/en-US/SDL%20Tridion%20Reference%20Implementation-v1/GUID-7EA7470E-1592-4734-B824-8F23FF3BD526).

After each schema change, you should always refresh the application settings. You can do this with these steps

Refresh the Web application settings:

  • Go to the Home/_System Structure Group.
  • Select the Publish Settings Page and click Publishing > Publish.
  • Go to your Web application and enter the URL /admin/refresh refresh the cache and reload the settings in the Web application.

Once I did that, my newly added component fields were properly mapped to my model properties.

What happens during this publish action is that a number of json files are being republished. These json files contain the information of the available fields of each schema (and other useful information). These json files are used by the model builder.

So, if you add or modify schema fields (both regular content fields and metadata fields), make sure to republish these settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.