Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Service (R2) ComponentTemplate missing from DCP(s) #69

Closed
Vouzamo opened this issue Jul 23, 2018 · 3 comments
Closed

Model Service (R2) ComponentTemplate missing from DCP(s) #69

Vouzamo opened this issue Jul 23, 2018 · 3 comments

Comments

@Vouzamo
Copy link

Vouzamo commented Jul 23, 2018

When you have a DCP on a page, the preview just has an id reference in the EntityModelData in the form "[component item id]-[template item id]".

This makes sense and I understand the purpose of normalizing the model.

However, when I get the published Page from the model service it replaces the reference with EntityModelData to save me a round trip to the database but doesn't include the ComponentTemplate so I can't access the template metadata.

Is this by design or a bug? I would have thought the model service should have assigned ComponentTemplate before returning the model as it would for an embedded Component Template.

@Vouzamo
Copy link
Author

Vouzamo commented Jul 23, 2018

Potentially related to this but I can log as a separate issue if necessary.

ExtensionData for Target Group Conditions is not present when a Component Template is flagged as a DCP even when checked to be embedded on a Page using a dynamic assembly.

This prevents Target Group Conditions being evaluated at presentation time as there is no way to retrieve them.

It seems as if an EntityModelData should still expose ComponentTemplate and ExtensionData regardless of whether the associated Component Template is a DCP or not. It is only really the Content property I would have anticipated being omitted for a DCP.

@rpannekoek
Copy link
Contributor

Hi Vouzamo. Thanks for reporting these issues.

Please note that Tridion Stack Exchange should be used for Q&A. If you're not sure if something is a defect, it is better to start a Q&A thread on Tridion Stack Exchange before reporting the issues on GitHub.

Furthermore, as you mentioned, these seem to be issues with the Model Service. There is a separate GitHub repository for the Model Service and Model Service issues should be reported here: https://github.com/sdl/dxa-model-service/issues

@Vouzamo
Copy link
Author

Vouzamo commented Jul 24, 2018

Moved issue to RWS/dxa-model-service#3 and closing this as a result.

Thank you @rpannekoek

@Vouzamo Vouzamo closed this as completed Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants