1

I have created a component and added it in a page and mapped all in my DXA. The problem I'm having is that when I call ContentProvider.GetPageModel(pageUrl, WebRequestContext.Localization, true) to get my page, I get the Region correctly and the entity with my component, but the fields that are ComponentLinks in Tridion only have the Id and the content it's not mapping. The other fields map correctly (for example, a text one, an image...).

My component is built with the schema Header, that has this fields: - logo (Multimedia Link of type Image) - help (Component Link of type HeaderHelp schema) - menu (Component Link of type HeaderMenu schema)

The HeaderHelp schema has: - lit_calls_from (text) - telephone_list (text, allowing multiple values)

The HeaderMenu schema has: - link_list (Embedded schema of type HeaderMenuItem, allowing multiple values)

The HeaderMenuItem schema has: - title (text) - link (text)

All the structure is modeled in the DXA and the classes used are registered.

enter image description here enter image description here enter image description here enter image description here

enter image description here

I've even tried adding a text field to Header and it mapped ok. But something happens with component links as you can see. Any ideas? Thanks a lot, you for your help!

enter image description here

enter image description here

6

2 Answers 2

3

Looks like you have using vocab = "http://schema.org/", but I'm not sure did you create the specifying semantics on those schemas as mentioned in this document reference

Otherwise, you can switch to SDL_CORE or create your own custom vocabularies and prefix.

I hope it helps.

2
  • 1
    Note that the (public) Semantic Entity annotations for schema.org don’t make sense in general; schema.org doesn’t define these semantic types. For CM mapping purposes, the SDL Core vocabulary should indeed be used (but note that explicit Semantic Entity annotations are not needed if your type names correspond to CM Schema root element names). Commented Oct 29, 2018 at 19:48
  • I thought about that we didn't do anything special about the vocabularies, we only have this is the vocabularies json ([{"Prefix":"tri","Vocab":"sdl.com/web/schemas/core"},{"Prefix":"s","Vocab":"schema.org"}]) and because the mapping worked for other fields I thought that shouldn't be a problem
    – Mer
    Commented Oct 30, 2018 at 6:17
0

I had the same problem recently. I can get the information of DXA base components (like images, mapped as MediaItem) but I couldn't take data from custom components mapping them as EntityModel. We doublechecked all SemanticProperties, regions, schema definitions... And we can't to get any component, the json we get from DXA has no information for that node.

1
  • 1
    JohnTP - Welcome to Tridion Stack Exchange, This is not an answer, either raise it as a separate question with details with an error message, please delete your answers and move it to comment and link this ticket as reference on your ticket
    – Velmurugan
    Commented Oct 30, 2018 at 19:37

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.