needs to check controller is a ContentController otherwise no AbsoluteLink

This commit is contained in:
priyashantha 2018-06-07 09:51:44 +05:30
parent b76859b194
commit 9ba41a8ca8

View File

@ -1574,6 +1574,7 @@ class Translatable extends DataExtension implements PermissionProvider {
function MetaTags(&$tags) {
if (
($controller = Controller::curr())
&& $controller instanceof ContentController
&& count($controller->getRequest()->getVars())
) {
$tags .= '<link rel="canonical" href="'.$controller->AbsoluteLink().'" />';