payloadcms / payloadcms/payload

Broken metadata on custom admin routes

Open
#11,580 2 comments 0 reactions 1 assignee View on GitHub

@jacobsfletch is already working on this.

Since Mar 7, 2025.

created-by: Contributor
Dominant language
TypeScript
Stars
44.8k
Forks
4.2k
Avg merge
2d 21h
Merged PRs (30d)
53

Description

Describe the Bug

When customising admin routes, the page title and favicon present as if we've hit a 404, rather than an expected route.

Broken custom route metadata:
Image

Expected default route metadata:
Image

Link to the code that reproduces this issue

https://github.com/damnsamn/blank-payload-project/tree/issue/custom-route-meta

Reproduction Steps
  1. Customise admin.routes.login
  2. Add a custom favicon via admin.meta.icons
  3. Navigate to payload's login screen, and see the default favicon and "Not Found" page title.
  4. Log in to see the custom favicon and correct page title
Which area(s) are affected? (Select all that apply)

area: core

Environment Info
Binaries:
  Node: 22.12.0
  npm: 10.9.0
  Yarn: N/A
  pnpm: 9.15.6
Relevant Packages:
  payload: 3.27.0
  next: 15.2.0
  @payloadcms/db-mongodb: 3.27.0
  @payloadcms/email-nodemailer: 3.27.0
  @payloadcms/graphql: 3.27.0
  @payloadcms/next/utilities: 3.27.0
  @payloadcms/payload-cloud: 3.27.0
  @payloadcms/richtext-lexical: 3.27.0
  @payloadcms/translations: 3.27.0
  @payloadcms/ui/shared: 3.27.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 24.0.0: Mon Aug 12 20:52:31 PDT 2024; root:xnu-11215.1.10~2/RELEASE_ARM64_T6030
  Available memory (MB): 18432
  Available CPU cores: 12

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.