Skip to content

Commit

Permalink
ENH Update code to avoid using deprecated API (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Dec 10, 2024
1 parent 9d4ccec commit bf4ac79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Forms/GridFieldSiteTreeAddNewButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function getHTMLFragments($gridField)
{
$state = $gridField->State->GridFieldSiteTreeAddNewButton;

$parent = SiteTree::get()->byId(Controller::curr()->currentPageID());
$parent = SiteTree::get()->byId(Controller::curr()->currentRecordID());

if ($parent) {
$state->currentPageID = $parent->ID;
Expand Down

0 comments on commit bf4ac79

Please sign in to comment.