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

Textarea support needed to support payloadcms/plugin-seo #26

Open
thompsonsj opened this issue Jun 8, 2023 · 0 comments
Open

Textarea support needed to support payloadcms/plugin-seo #26

thompsonsj opened this issue Jun 8, 2023 · 0 comments

Comments

@thompsonsj
Copy link
Owner

https://github.com/payloadcms/plugin-seo adds localized: true to SEO collection/global fields as expected.

e.g. for a collection with localized fields, the following is included in the fields array:

{
    "name": "meta",
    "label": "SEO",
    "type": "group",
    "fields": [
      {
        "name": "overview",
        "label": "Overview",
        "type": "ui",
        "admin": {
          "components": {}
        }
      },
      {
        "name": "title",
        "type": "text",
        "localized": true,
        "admin": {
          "components": {}
        }
      },
      {
        "name": "description",
        "type": "textarea",
        "localized": true,
        "admin": {
          "components": {}
        }
      },
      {
        "name": "preview",
        "label": "Preview",
        "type": "ui",
        "admin": {
          "components": {}
        }
      }
    ]
  }

At present, textarea is not a supported field. As a result, getLocalizedFields won't pick this up:

{
    "name": "meta",
    "label": "SEO",
    "type": "group",
    "fields": [
      {
        "name": "title",
        "type": "text",
        "localized": true,
        "admin": {
          "components": {}
        }
      }
    ]
  }

Add textarea support. It should be added anyway, but this is prioritized in order to support SEO fields.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant