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

SubsitesVirtualPage contains overrides for non-standard fields #480

Open
davejtoews opened this issue Jun 1, 2022 · 1 comment
Open

Comments

@davejtoews
Copy link

davejtoews commented Jun 1, 2022

SubsitesVirtualPage defines the following fields:

  • CustomMetaTitle
  • CustomMetaKeywords

In an onBeforeWrite() call these values will save into:

  • MetaTitle
  • MetaKewords

Additionally the getCMSFields() call attempts to place these new fields next to the corresponding field they will override. The problem is, however, MetaTitle and MetaKeywords are not standard fields. They do not exist on VirtualPage or SiteTree and it cannot be assumed that they will exist in Page.

The result is fields that get dumped out at the bottom of the editor view, and which do not have the stated effect of overriding existing fields.

Is this a carryover from SilverStripe 3? An unstated dependency on another module which adds these fields?

@michalkleiner
Copy link
Contributor

I think they used to be a part of CMS 3.x, then they got removed or moved to a module.
The MetaTitle can come from https://github.com/kinglozzer/silverstripe-metatitle, the MetaKeywords I can't find.

It's probably safe to say there should be a check for the existence of those fields.

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

No branches or pull requests

3 participants