diff --git a/code/forms/SiteTreeURLSegmentField.php b/code/forms/SiteTreeURLSegmentField.php index d89519bb..9c7329ad 100644 --- a/code/forms/SiteTreeURLSegmentField.php +++ b/code/forms/SiteTreeURLSegmentField.php @@ -44,7 +44,7 @@ class SiteTreeURLSegmentField extends TextField { * @return SiteTree */ function getPage() { - $idField = $this->getForm()->dataFieldByName('ID'); + $idField = $this->getForm()->Fields()->dataFieldByName('ID'); return ($idField && $idField->Value()) ? DataObject::get_by_id('SiteTree', $idField->Value()) : singleton('SiteTree'); }