GridFieldComponents packaged with silverstripe/framework are injectable as of 4.11.0
Explicitly invoking the injector here instead of using `create()` allows backwards compatability with framework < 4.11.0 while ensuring dependency injection is still used from 4.11.0 onwards.
Currently, the SiteTreeLinkTracking_Parser only checks the page's content for anchors.
As a result, any anchors that have been added or modified by the updateAnchorsOnPage extension in the getAnchorsOnPage method are marked ss-broken.
This change updates SiteTreeLinkTracking_Parser to get the anchors from the getAnchorsOnPage function on SiteTree. This will allow for more consistent RegEx matching and allow the updateAnchorsOnPage extension to be used when checking for broken links.
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.
Fixes#2580
The call to `Director::makeRelative` transforms absolute links into relative links. Previously, this meant that you could pass in "https://example.co.nz/about-us" or "about-us" and get the same result, but passing in "https://example.co.nz/" and "/" would give _different_ results.
This commit performs the transformation to a relative link _before_ checking if the path should be for the home page, which leads to more consistent results.
This replaces using the `MetaTags` method as replacing or removing a canonical requires string manipulation vs unsetting an array key, and is preferred.
Warnings are triggered when:
* Changing the URL Segment
* Unpublishing
* Unpublishing & Archiving
* Moving the homepage to another parent in the tree view
Also add `SiteTree->isHomePage()`
Content blocks and other DataObjects that contain HTMLText fields are
also used in the 'Dependent pages' report for each page in the CMS,
however these objects may have neither a Title field, nor a name to
describe them. Instead of showing an empty field in the Title column for
this table, we can instead show "Untitled " with the localised singular
name appended.