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

FIX Update CMS fields now that they're being scaffolded #589

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Aug 8, 2024

Relies on changes to SiteTree and VirtualPage in silverstripe/silverstripe-cms#2983

Issue

Comment on lines -103 to -134
$fields->addFieldToTab(
'Root.Main',
TextField::create(
'CustomMetaTitle',
$this->fieldLabel('CustomMetaTitle')
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')),
'MetaTitle'
);
$fields->addFieldToTab(
'Root.Main',
TextareaField::create(
'CustomMetaKeywords',
$this->fieldLabel('CustomMetaKeywords')
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')),
'MetaKeywords'
);
$fields->addFieldToTab(
'Root.Main',
TextareaField::create(
'CustomMetaDescription',
$this->fieldLabel('CustomMetaDescription')
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')),
'MetaDescription'
);
$fields->addFieldToTab(
'Root.Main',
TextField::create(
'CustomExtraMeta',
$this->fieldLabel('CustomExtraMeta')
)->setDescription(_t(__CLASS__ . '.OverrideNote', 'Overrides inherited value from the source')),
'ExtraMeta'
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved the relevant ones to VirtualPage (see silverstripe/silverstripe-cms#2983)

Removed CustomMetaTitle and CustomMetaKeywords because the fields they're intended to override were long-since removed from SiteTree.

Comment on lines +52 to +58
$pageSelectionField = SubsitesTreeDropdownField::create(
'CopyContentFromID',
_t('SilverStripe\\CMS\\Model\\VirtualPage.CHOOSE', 'Linked Page'),
SiteTree::class,
'ID',
'MenuTitle'
);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This field is moved to the top which is right next to the subsite selector field and matches where it sits in the normal virtual page.

@GuySartorelli GuySartorelli force-pushed the pulls/4/scaffold-sitetree branch from 467ccb8 to 16b890f Compare August 12, 2024 02:16
@GuySartorelli
Copy link
Member Author

CI failures should go green when other PRs are merged (see kitchen sink CI run)

@GuySartorelli GuySartorelli marked this pull request as ready for review August 12, 2024 02:31
Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have merged other PRs and re-run CI, there are failures

@GuySartorelli
Copy link
Member Author

Fingers crossed it just needs a rebase.

@GuySartorelli GuySartorelli force-pushed the pulls/4/scaffold-sitetree branch from 16b890f to 21ad49a Compare August 15, 2024 03:12
@emteknetnz emteknetnz merged commit 3a6f722 into silverstripe:4 Aug 15, 2024
11 checks passed
@emteknetnz emteknetnz deleted the pulls/4/scaffold-sitetree branch August 15, 2024 05:17
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

Successfully merging this pull request may close these issues.

2 participants