You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Draft parameter isn't accepted by or cascaded into the rich text field #6643
Links that are relationships inside a rich text field links do not return drafts if the parent query has the draft parameter. The specific rich text field doesn't provide a draft parameter to GraphQL either.
This solves unexpected behavior like broken rich text relationship links in our frontend if the linked document location changed since the linked document was last published (or since the first draft if no published version exists).
Similar functionality was added to first class relationship fields as part of: #4985
To Reproduce
Create a collection with drafts, a slug field, and a rich text field
Create two documents in the collection with unique slugs, then publish them
For one of the documents (let's call it document A), change the slug and save as a draft
In the rich text field for document B, link to document A using the internal link type
Save draft and preview document B
Note that the link to document A on document B points to the slug of the published version, which isn't found in draft mode
Hey @evelynhathaway I'm not able to reproduce this issue.
In draft mode, doc b links to doc a with slug a2 and in non-draft mode, doc b links to doc a with slug a. a2 coming from the draft version, and a coming from the published version. So this works as expected:
CleanShot.2024-06-19.at.14.40.22.mp4
I did test this on payload v2.21.0 and @payloadcms/richtext-slate 1.5.2. Could you upgrade to these versions and see if that fixes it for you? If it does not, could you provide me with a repository which reproduces this, optimally with a small int test?
Activity
AlessioGr commentedon Jun 19, 2024
Hey @evelynhathaway I'm not able to reproduce this issue.
In draft mode, doc b links to doc a with slug
a2and in non-draft mode, doc b links to doc a with sluga.a2coming from the draft version, andacoming from the published version. So this works as expected:CleanShot.2024-06-19.at.14.40.22.mp4
I did test this on payload v2.21.0 and @payloadcms/richtext-slate 1.5.2. Could you upgrade to these versions and see if that fixes it for you? If it does not, could you provide me with a repository which reproduces this, optimally with a small int test?
AlessioGr commentedon Nov 12, 2024
Closing as not reproducible (likely already fixed). If you still experience this issue in the latest v3 of payload, please open up a new issue
github-actions commentedon Nov 14, 2024
This issue has been automatically locked.
Please open a new issue if this issue persists with any additional detail.