Latest vue sdk not giving data with locale

i was using the v2 of @builder.io/sdk-vue for quite long, which i just recently upgraded to latest v4 & now i see that when i’m passing the locale the data is empty.

i saw the payload & compare it to the previous & found out that it is send the extra userAttribute: {locale: value} along with the locale payload.

when i tried to overwrite the userAttribute: { locale: undefined } it worked. but not sure why it is happening & it only only happening for the fetchEntries, the fetchOneEntry still works.

Hi @zexu_knub,

Welcome to the builder.io forum.

Could you provide more details about the issue? Sharing a screenshot or a screen recording would help us better understand the problem and assist you more effectively.

Looking forward to your response!

sure, this is the video

Hello @zexu_knub,

Thank you for sharing the screen recording. I was able to reproduce the issue on our end. We’re currently discussing whether this is expected behavior or a potential error and will update you as soon as we have more clarity.

In the meantime, you can continue passing userAttribute: { locale: undefined } or use the noTargeting: true option as a workaround.

async function fetchAllContent() {
  try {
    const response = await fetchEntries({
      model,
      apiKey: BUILDER_PUBLIC_API_KEY,
      locale: 'undefined',
      options: { noTargeting: true }
    });

    console.log('Fetched Content:', response); // Log the response
    allContent.value = response;
  } catch (error) {
    console.error('Error fetching content:', error);
  }
}

fetchAllContent();

Let me know if you have any questions.

Thanks,