1

I am using SXA Json Content to create API. In the JSON Variant, I used Reference Field to display Drop Link Field in the data.

But when the DropLink field is empty, the API returns error. So I need to know where the code related to render the Reference Items in JSON Variant to check it.

1 Answer 1

0

The JSON Variants just like normal Rendering Variants are using RenderVariantField pipeline to define processors. Each processor is responsible for rendering the different type of a variant item.

The reference is rendered using RenderJsonReference.cs. I would need to double-check, but it seems to me that a potential null check is missing in the code. But have fun and check it on your side. I'm looking forward to your investigation!

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.