How do i disable the preview?
Also why is this 2/3
Bump
Hey
@890486507872342027I'll try to get someone's eyes on this today. Not sure off the bat why the valditation wouldn't be passing if you've filled out all three fields.
thanks, btw any idea about removing the preview thing?
I'm not sure if there is a programatic way to turn that on/off, could always hide it with CSS if you don't want to see it.
Hey
@890486507872342027- I am not seeing a meta image in your screenshot, have you made any changes to your code to hide or try to disable that?
and what version of plugin-seo are you using?
Yea I didn't put the media collection option
Lemme show code one sec
That is the problem - it's looking for that, so it will never pass that way
But isn't it optional?
plugins: [
addAuthorFields({
excludedCollections: ["users"],
}),
seoPlugin({
collections: ["article"],
}),
],How are you hiding the meta image field atm?
with CSS?
however you are hiding it, the reason the checks are not passing is that there is still js logic that is looking for that field, so this sounds like a feature request, a good one at that.
not hidding it at all lol
this is all i do with the seo plugin
import { lexicalHTML } from "@payloadcms/richtext-lexical";
import { AfterReadHook } from "payload/dist/globals/config/types";
import { CollectionConfig } from "payload/types";
export const Articles: CollectionConfig = {
slug: "article",
access: {
read: ({ req }) => req.user && req.user.role,
create: ({ req }) =>
req.user && ["admin", "editor"].includes(req.user.role),
update: ({ req }) =>
req.user && ["admin", "editor"].includes(req.user.role),
delete: ({ req }) =>
req.user && ["admin", "editor"].includes(req.user.role),
},
admin: {
useAsTitle: "title",
},
fields: [
{
name: "title",
type: "text",
required: true,
admin: {
placeholder: "Title of the article",
},
},
{
name: "link",
type: "text",
required: true,
admin: {
placeholder: "Link to the article",
},
},
{
name: "Category",
type: "relationship",
relationTo: "category",
required: true,
},
{
name: "SubCategory",
type: "relationship",
relationTo: "sub-category",
},
{
name: "ShortTitle",
type: "text",
admin: {
placeholder:
"Short Title of the article, required if title is > 3 words (Optional)",
},
},
{
name: "content",
type: "richText",
{
name: "author",
type: "relationship",
relationTo: "users",
defaultValue: ({ user }) => `${user.id}`,
required: true,
},
],
};This is my articles collection
what version of plugin-seo are you using in your project?
by default, you should have a field that looks like this for meta image
but to your statement above about media collection - you would need that in order for this field to work
it is stopping you from saving the page? if not, and you are planning to render a static OG image for this page, or all pages, since this is not an optional field atm you'd just ignore the warnings
apologies, i forgot to reply
Version is 2.2.1
Yes i have an OG image for my metadata i generate on the frontend so i dont need the media collection
no worries
this sounds like a scenario we just haven't accounted for, specifically, wanting SEO plugin, but not the meta image, and also not having a media collection. We could adjust the checks in the logic, and if you want to open up a PR I can make sure we assign some priority to it for the future.
sure, one moment
wait an issue or a pr?
well, I would open it up as a discussion actually, that way when Jake is freed up (the artist behind the SEO plugin) we can talk about the best path forward
my mistake
Thanks for talking through this! This is a good feature request, appreiciate it.
No worries :D
the discussion seems to be pretty inactive.. is this because of payload 3.0 beta?
Hello! Yes and no. Opening the discussion is a first step to getting something like this on our radar. We evaluate feature requests fairly often and assign them a roadmap priority or just simply assign them to an engineer. We haven't done that yet for this month as we're working towards the 3.0 beta, but we do address every single one.
Star
Discord
online
Get dedicated engineering support directly from the Payload team.