mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
FIX ensure updateAnchorsOnPage extension is called (#2686)
Currently, if there are no anchors found in the page content, the updateAnchorsOnPage extension is not called. This change will call the updateAnchorsOnPage extension regardless of the page content.
This commit is contained in:
parent
f3a76ccf2d
commit
2bf691f548
@ -3294,13 +3294,12 @@ class SiteTree extends DataObject implements PermissionProvider, i18nEntityProvi
|
||||
$matches
|
||||
);
|
||||
|
||||
if (!$parseSuccess) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$anchors = [];
|
||||
if ($parseSuccess >= 1) {
|
||||
$anchors = array_values(array_unique(array_filter(
|
||||
array_merge($matches[3], $matches[5])
|
||||
)));
|
||||
}
|
||||
|
||||
$this->extend('updateAnchorsOnPage', $anchors);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user