Like what we’re doing? Star us on GitHub!

Populate richText internal link with REST API

ElliotYoYo
last month
5

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.

  • jmikrut
    Payload Team
    last month

    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?

  • ElliotYoYo
    last month

    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



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


    https://github.com/payloadcms/payload/issues/2134
Open the post
Continue the discussion in Discord
Can't find what you're looking for?
Get help straight from the Payload team with an Enterprise License.Learn More