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

The "story" object data does not appear in the multilink in SSR response. #68

Open
dmytrokravch opened this issue Oct 29, 2022 · 2 comments

Comments

@dmytrokravch
Copy link

Hello,

I don't know if is this a problem with my config or a general problem with the SDK, because I didn't find the solution in your documentation and issues.

I want to use the "story" object data from "fieldtype": "multilink" for a multilanguage setup. And I saw that the "story" object does not appear on the server-side calls, I can see it only on the client-side.

Here is the example of storyblokApi response for both sides:
server side response:

{
  id: 'c2aa9ba3-572e-4aab-b9f1-90e7fb9e2bf6',
  url: '',
  linktype: 'story',
  fieldtype: 'multilink',
  cached_url: 'oferta/'
}

client-side response

{
    "id": "c2aa9ba3-572e-4aab-b9f1-90e7fb9e2bf6",
    "url": "",
    "linktype": "story",
    "fieldtype": "multilink",
    "cached_url": "oferta/",
    "story": {
        "name": "Oferta",
        "id": 206177576,
        "uuid": "c2aa9ba3-572e-4aab-b9f1-90e7fb9e2bf6",
        "slug": "oferta",
        "url": "oferta/",
        "full_slug": "oferta/",
        "_stopResolving": true
    }
}

nuxt.config.js:

buildModules: [
    ['@storyblok/nuxt-2/module', {
      accessToken: '***'
    }],
    '@nuxtjs/pwa',
    '@nuxtjs/composition-api/module',
    '@nuxt/typescript-build',
    'nuxt-lazy-load',
    '@nuxtjs/sitemap'
  ],

package.json

  "dependencies": {
    "@nuxtjs/axios": "^5.13.6",
    "@nuxtjs/composition-api": "^0.33.1",
    "@nuxtjs/i18n": "^7.3.0",
    "@nuxtjs/pwa": "^3.3.5",
    "@nuxtjs/sitemap": "^2.4.0",
    "@storyblok/nuxt-2": "^1.2.1",
    "core-js": "^3.25.3",
    "nuxt": "^2.15.8",
    "nuxt-lazy-load": "^1.2.9",
    "sass": "^1.55.0",
    "sass-loader": "10.1.1",
    "vue": "^2.7.10",
    "vue-server-renderer": "^2.7.10",
    "vue-slick-carousel": "^1.0.6",
    "vue-template-compiler": "^2.7.10"
  },

Thanks in advance!

@Dawntraoz
Copy link
Contributor

Hi, @dmytrokravch,
It's possible to see your code, or can you please provide the code that you're using for calling the API in your Nuxt application?
Are you using asyncData to encapsulate the call?

PS: If you think it will be easier to show me in a call, we can plan one and check it together, then I can make a summary here.

@egrossnickle
Copy link

egrossnickle commented Mar 7, 2023

@dmytrokravch @Dawntraoz Did you ever figure this out? I'm seeing the same issue after updating to 1.2.x — never saw the issue with <= 1.1.0.

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

No branches or pull requests

3 participants