Skip to content

Tabs: using a function for tab labels breaks versions view #13375

@mikkelwf

Description

@mikkelwf

Describe the Bug

When defining tabs for a collection, use can use either a string or a function (to access i18n) to label a tab.
Using a function breaks the versions view.

Link to the code that reproduces this issue

https://github.com/re-cph/payload/tree/tabs_issues

Reproduction Steps

Start docker (docker compose included in root)

  • Create a post
  • Publish the post
  • Click versions
  • Select a version (latest draft before published version)
  • Frontend breaks

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

area: core, area: ui

Environment Info

Binaries:
  Node: 20.10.0
  npm: 10.2.3
  Yarn: 1.22.22
  pnpm: 10.3.0
Relevant Packages:
  payload: 3.49.1
  next: 15.4.5
  @payloadcms/db-postgres: 3.49.1
  @payloadcms/email-nodemailer: 3.49.1
  @payloadcms/graphql: 3.49.1
  @payloadcms/live-preview: 3.49.1
  @payloadcms/live-preview-react: 3.49.1
  @payloadcms/next/utilities: 3.49.1
  @payloadcms/plugin-form-builder: 3.49.1
  @payloadcms/plugin-search: 3.49.1
  @payloadcms/richtext-lexical: 3.49.1
  @payloadcms/translations: 3.49.1
  @payloadcms/ui/shared: 3.49.1
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:49 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6000
  Available memory (MB): 16384
  Available CPU cores: 8

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions