Skip to content

Commit

Permalink
patch updateSummaryFields (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarholt authored Jan 16, 2023
1 parent a601461 commit 0124008
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Model/Extension/SeoPageExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,13 @@ public function updateSettingsFields(FieldList $fields)
public function updateSummaryFields(&$fields)
{
if(Controller::curr() instanceof SEOAdmin) {
Config::modify()->set($this->owner->ClassName, 'summary_fields', $this->getSummaryFields());
if($this->owner->class == null){
return;
}
if(is_object($this->owner->class) && method_exists($this->owner->class, 'remove')) Config::inst()->remove(($this->owner->class), 'summary_fields');
Config::modify()->set(($this->owner->class), 'summary_fields', $this->getSummaryFields());

$fields = Config::inst()->get($this->owner->ClassName, 'summary_fields');
$fields = Config::inst()->get($this->owner->class, 'summary_fields');
}
}

Expand Down

0 comments on commit 0124008

Please sign in to comment.