Skip to content

Commit

Permalink
Merge pull request #6 from sephyhe/master
Browse files Browse the repository at this point in the history
Make ProductCollection updateCMSFields extendable if there is no Subsite module
  • Loading branch information
leochenftw authored Mar 16, 2024
2 parents 8936ae0 + 68b25ef commit 1e65f85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/model/ProductCollection.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ public function getCMSFields()

$this->add_pagesize_field($fields);

// $this->extend('updateCMSFields', $fields); // This line will cause duplicate fields with subsite module.
if (!class_exists('SilverStripe\Subsites\Extensions\SiteTreeSubsites')) {
// This line will cause duplicate fields with subsite module.
$this->extend('updateCMSFields', $fields);
}

return $fields;
}
Expand Down

0 comments on commit 1e65f85

Please sign in to comment.