Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Populate richText internal link with REST API

default discord avatar
elliotyoyo2 years ago
2

Found a similar question for graphql :

https://discord.com/channels/967097582721572934/1037832607292989580

Adding the parameter

?depth=5

doesn't populate the internal link with the linked post, I get this in the response :


{
  "type": "link",
  "linkType": "internal",
  "doc": {
    "value": "63bb4f907576e702327e1c29",
    "relationTo": "post"
  },
  "newTab": true,
  "children": [
    {
      "text": "My great text"
    }
  ]
}


Don't know if it's relevant but my

WYSIWYG

is inside a

tabs

field.

  • discord user avatar
    jmikrut
    2 years ago

    do you have open access control to your

    post

    collection?



    depth should work out of the box, and it might be access control that's tripping you up?

  • default discord avatar
    elliotyoyo2 years ago

    Everything is public for the read operation.


    Btw, I'm using the latest payload version.



    If it should work I will try to make a reproduction



    @364124941832159242

    I think it's a bug from payload, made a ticket on github.


    https://github.com/payloadcms/payload/issues/2134
Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.