Address issue #8038

Within TinyMCE, adding a link to "page on the site" generates an error "Target page not found" under the Anchor field.
This commit is contained in:
Matthew Walker 2018-04-27 15:10:59 +12:00 committed by Daniel Hensby
parent f30cd61cb7
commit 766b2a4947
No known key found for this signature in database
GPG Key ID: D8DEBC4C8E7BC8B9

View File

@ -570,7 +570,7 @@ class HtmlEditorField_Toolbar extends RequestHandler {
$id = (int)$this->getRequest()->getVar('PageID');
$anchors = array();
if (($page = Page::get()->byID($id)) && !empty($page)) {
if (($page = SiteTree::get()->byID($id)) && !empty($page)) {
if (!$page->canView()) {
throw new SS_HTTPResponse_Exception(
_t(