Silverstripe Version: 4.3
Question:
I have a link set up between a dataobject (“HomePageListing”) to SiteTree. In the past where I’ve used this, even on v4, the field has been generated without any issues. However, this time the field is appearing as read only and fixed on “Home”.
I’ve even replaced the field through getCMSFields()
, but this hasn’t fixed it, it’s still showing as read only.
It’s likely that I’m missing something completely obvious, but any help appreciated.
Here’s an extract of the DataObject file:
private static $has_one = [
'Link' => SiteTree::class
];
// I've tried it both with, and without this here
public function getCMSFields()
{
$fields = parent::getCMSFields();
$fields->replaceField("Link", TreeDropdownField::create("LinkID", "Link to", SiteTree::class));
return $fields;
}