Unable to retrieve reference data in Builder visual editor

Hey everyone,

I am currently using the second generation of the SDK for Builder. The tech stack that I am currently using for my project is NextJS 13, React along with the app directory. My intention is to query the page content using the content api (getContent) and get all the content, including the data in all the references. For some reason, when I do this, I am only able to retrieve the reference data of my custom blocks locally, not in the Builder visual editor. I’ve tried adding “includeRefs” on both getContent and the RenderContent component, as well as adding an options:{includeRefs: true}; on both. No matter what I do, includeRef’s data is always empty when I query the page model and need to do an additional check to see if it is in an iFrame so I can manually query it which is not the best solution.

I have included screenshots showing my page component querying for all the blocks in a specific url path which passes all the content into the RenderContent component. I was wondering, how can I get all the reference data in my individual custom components when querying for a page’s content or is it intended for me to need to manually render each and every component? I did not have this issue with the first generation of the SDK for Builder.


Hello @LestW,

You can try using enrich:true option

   options: {
      enrich: true,
    },

Let us know how that works for you. Thank you!