mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
needs to check controller is a ContentController otherwise no AbsoluteLink
This commit is contained in:
parent
b76859b194
commit
9ba41a8ca8
@ -1574,6 +1574,7 @@ class Translatable extends DataExtension implements PermissionProvider {
|
|||||||
function MetaTags(&$tags) {
|
function MetaTags(&$tags) {
|
||||||
if (
|
if (
|
||||||
($controller = Controller::curr())
|
($controller = Controller::curr())
|
||||||
|
&& $controller instanceof ContentController
|
||||||
&& count($controller->getRequest()->getVars())
|
&& count($controller->getRequest()->getVars())
|
||||||
) {
|
) {
|
||||||
$tags .= '<link rel="canonical" href="'.$controller->AbsoluteLink().'" />';
|
$tags .= '<link rel="canonical" href="'.$controller->AbsoluteLink().'" />';
|
||||||
|
Loading…
Reference in New Issue
Block a user