Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.0.0-beta.34] Error with Payload config validation on field "admin.meta" #6425

Open
nvti opened this issue May 19, 2024 · 0 comments
Open
Assignees
Labels
status: needs-triage Possible bug which hasn't been reproduced yet v3

Comments

@nvti
Copy link

nvti commented May 19, 2024

Link to reproduction

No response

Describe the Bug

I see you guys change the type of field admin.meta in version 3.0.0-beta.34 (or 3.0.0-beta.33) but you do not change that in validation task. The validation task still check old type, so it throw errors:

[11:29:13] ERROR: There were 2 errors validating your Payload config
[11:29:13] ERROR: 1: "admin.meta.icons" must be an array
[11:29:13] ERROR: 2: "admin.meta.openGraph.images" must be one of [array]
[11:29:14] ERROR: There were 2 errors validating your Payload config
[11:29:14] ERROR: 1: "admin.meta.icons" must be an array
[11:29:14] ERROR: 2: "admin.meta.openGraph.images" must be one of [array]

New type is defined:

export type OpenGraphConfig = {
  description?: string
  images?: OGImageConfig | OGImageConfig[]
  siteName?: string
  title?: string
}

export type IconConfig = {
  color?: string
  /**
   * @see https://developer.mozilla.org/docs/Web/API/HTMLImageElement/fetchPriority
   */
  fetchPriority?: 'auto' | 'high' | 'low'
  media?: string
  /** defaults to rel="icon" */
  rel?: string
  sizes?: string
  type?: string
  url: string
}

To Reproduce

Instal payload version 3.0.0-beta.34, add this config to payload config file:

admin: {
  meta: {
    openGraph: {
      images: {
        url: `${serverUrl}/logo.svg`
      }
    },
    icons: {
      url: `${serverUrl}/favicon.ico`
    }
  }
// others config
}

Payload Version

3.0.0-beta.34

Adapters and Plugins

No response

@nvti nvti added the status: needs-triage Possible bug which hasn't been reproduced yet label May 19, 2024
@denolfe denolfe added the v3 label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet v3
Projects
None yet
Development

No branches or pull requests

3 participants