BUGFIX: fixing URL suggestion when changing the name of a page

This commit is contained in:
Julian Seidenberg 2012-04-05 16:39:56 +12:00
parent 8f5ec545ae
commit ea377b6012

View File

@ -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');
}