payload icon indicating copy to clipboard operation
payload copied to clipboard

Nested Docs Plugin causing error with versions

Open DesignyourCode opened this issue 11 months ago • 0 comments

Describe the Bug

I am using the website template on the latest version (3.9.0) and when trying to access the "Versions" against a collection (in my case categories or pages) I get the following error:

Error: "oldValue" and "newValue" should be strings

I believe this is because both collections are set to be nested using the nested docs plugin. If I remove nesting from each in turn the versions work again. But in my case I need pages to be nested.

Link to the code that reproduces this issue

https://github.com/DesignyourCode/payload-nested-version-bug

Reproduction Steps

  1. Clone website template
  2. Add pages to nested plugin options
  3. Create a document and modify to create versions
  4. Try to access the versions

Which area(s) are affected? (Select all that apply)

plugin: nested-docs

Environment Info

Binaries:
  Node: 22.7.0
  npm: 10.8.2
  Yarn: 1.22.19
  pnpm: 9.15.0
Relevant Packages:
  payload: 3.9.0
  next: 15.0.4
  @payloadcms/db-postgres: 3.9.0
  @payloadcms/email-nodemailer: 3.9.0
  @payloadcms/graphql: 3.9.0
  @payloadcms/live-preview: 3.9.0
  @payloadcms/live-preview-react: 3.9.0
  @payloadcms/next/utilities: 3.9.0
  @payloadcms/payload-cloud: 3.9.0
  @payloadcms/plugin-cloud-storage: 3.9.0
  @payloadcms/plugin-form-builder: 3.9.0
  @payloadcms/plugin-nested-docs: 3.9.0
  @payloadcms/plugin-redirects: 3.9.0
  @payloadcms/plugin-search: 3.9.0
  @payloadcms/plugin-seo: 3.9.0
  @payloadcms/richtext-lexical: 3.9.0
  @payloadcms/storage-vercel-blob: 3.9.0
  @payloadcms/translations: 3.9.0
  @payloadcms/ui/shared: 3.9.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: x64
  Version: Darwin Kernel Version 24.1.0: Thu Oct 10 21:02:27 PDT 2024; root:xnu-11215.41.3~2/RELEASE_X86_64
  Available memory (MB): 16384
  Available CPU cores: 12

DesignyourCode avatar Dec 19 '24 10:12 DesignyourCode