?
avatar 810
810
11 Aug 2016

Steps to reproduce the issue

on some pages I want to have noindex and nofollow, but when I set it on the controller ,then the meta is still seeing the global setting option.

Other meta's are working fine: description, keywords, title

$document = JFactory::getDocument();
$document->setMetaData('robots', 'noindex, nofollow');

Expected result

<meta name="robots" content="noindex, nofollow" />

Actual result

<meta name="robots" content="index, follow" />

System information (as much as possible)

Additional comments

J3.6.2

avatar 810 810 - open - 11 Aug 2016
avatar 810 810 - change - 11 Aug 2016
The description was changed
avatar 810 810 - edited - 11 Aug 2016
avatar 810
810 - comment - 11 Aug 2016

ok all pages are:

<meta name="robots" content="index, follow" />

even i set to other option, on the global and on the menu item

avatar brianteeman
brianteeman - comment - 11 Aug 2016

I am not sure I understand you. I tested this by adding
$document = JFactory::getDocument();
$document->setMetaData('robots', 'noindex, nofollow');

to
components/com_content/views/article/tmpl/default.php

and the output now looks like

    <meta name="author" content="Joomla" />
    <meta name="robots" content="noindex, nofollow" />
    <meta name="generator" content="Joomla! - Open Source Content Management" />
avatar brianteeman brianteeman - close - 11 Aug 2016
avatar 810
810 - comment - 11 Aug 2016

Ok, my bad, its was a option on a third-party plugin, closing this issue

avatar 810 810 - change - 11 Aug 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-08-11 19:07:49
Closed_By 810
avatar 810 810 - close - 11 Aug 2016
avatar brianteeman
brianteeman - comment - 11 Aug 2016

what a surprise

On 11 August 2016 at 20:08, Jelle Kok notifications@github.com wrote:

Ok, my bad, its was a option on a third-party plugin, closing this issue


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#11563 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABPH8RscGgzXJ9PLQ5o6DDWax59c3ZU7ks5qe3MRgaJpZM4JiaG6
.

Brian Teeman
Co-founder Joomla! and OpenSourceMatters Inc.
http://brian.teeman.net/

avatar brianteeman brianteeman - change - 15 Aug 2016
Labels Added: ?

Add a Comment

Login with GitHub to post a comment