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

Errors possible in ModelBuilder if linked Multimedia not sufficiently expanded #92

Closed
willprice76 opened this issue Apr 5, 2018 · 4 comments
Labels
Milestone

Comments

@willprice76
Copy link
Contributor

willprice76 commented Apr 5, 2018

I have scenarios where the EntityModelData for a linked binary contains only the component ID. In this case the model builder should not try to create a property object for the linked entity, however currently it continues and then throws an exception for the whole process, when it tries to parse the schema Id from the EntityModelData (which is null) into a Long see the following code line:

https://github.com/sdl/dxa-web-application-java/blob/1610c7be29c038ffebf340bb8c44c5046de607cf/dxa-framework/dxa-tridion-provider/src/main/java/com/sdl/dxa/tridion/mapping/impl/DefaultModelBuilder.java#L106

The scenario where I see this is if I have a component A which has a component link to component B which links to another component C, which contains a multimedia link. I don't care about the media (or any other data for that matter) in component C, but this is causing the mapping of component A to an entity to fail completely.

The JSON from the ModelService for this media field is:

"media": {"$type": "EntityModelData", "Id": "519403", "LinkUrl": ""}

@willprice76 willprice76 changed the title Errors possible in ModelBuilder if linked Entities not sufficiently expanded Errors possible in ModelBuilder if linked Multimedia not sufficiently expanded Apr 5, 2018
willprice76 pushed a commit to willprice76/dxa-web-application-java that referenced this issue Apr 10, 2018
willprice76 pushed a commit to willprice76/dxa-web-application-java that referenced this issue Apr 10, 2018
…Q-9120 to develop

* commit '849ad4fa05df98a976d738e3790d82695f63ef23':
  CRQ-9120 used correct @nullable annotation
  CRQ-9120 Webapp tries to load Model Service URL and retries later if failed
willprice76 added a commit to willprice76/dxa-web-application-java that referenced this issue Apr 14, 2018
…ked entity model as this causes a null pointer exception in the entity builder
@tfinez
Copy link

tfinez commented Jul 31, 2018

Is this solved in the master version?

@fdvalencia
Copy link

Hi,
I have been inform that this issue have been solve and it should be fix for version 2.1, but I can't find this dependency in maven, ¿when is this fix going to be promoted to maven?

thanks

@rpannekoek rpannekoek added the bug label Dec 18, 2018
@rpannekoek rpannekoek added this to the v2.2 milestone Dec 18, 2018
@rpannekoek
Copy link
Contributor

Internal Issue ID (for tracking purposes): CRQ-12818

@rpannekoek rpannekoek added the PR label Dec 18, 2018
@rpannekoek
Copy link
Contributor

Fixed in DXA 2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants