Hi,
I have upgraded to 1.12-beta9 because of requirement of http://drupal.org/project/nodewords_pagetitle.
Everything is working fine, except the following.
My Robots metatag is staying noindex, nofollow, while I changed this in admin.
Can you please show how you changed this please in code?
I tried upgrading to latest .dev, but then different problems arose, see: http://drupal.org/node/835158
So right now, I am ok, if I could save latest default settings for robots index/follow?

Thanks a lot in advance for your support!
greetings, Martijn

Comments

powery’s picture

subscribing

summit’s picture

Hi, I think this is duplicate of: http://drupal.org/node/774652.

Will try tonight (thanks to Druppy :):

To change the default robot tag for all pages to "index, follow", you can go to

nodewords/nodewords_basic/includes/nodewords_basic.nodewords.tags.inc

line 255

and change

'#default_value' => empty($content['index_follow']) ? 'noindex,nofollow' : $content['index_follow'],

to

'#default_value' => empty($content['index_follow']) ? 'index,follow' : $content['index_follow'],

But it would be great to have a structural solution!
greetings, Martijn

powery’s picture

This solution #3 did not solve the same problem for me

summit’s picture

Hi Kiam, as stated on: http://drupal.org/node/786270#comment-2929824 you "attacked" a different function to get this working.
Was this the change you referred to: http://drupalcode.org/viewvc/drupal/contributions/modules/nodewords/node... ?

I can't go to latest .dev of nodewords, because I did this yesterday, and then no metatags are shown on my node-pages anymore (off course did update.php). So I would very much like the 90% working 1.12-beta9 to improve with only this issue.

Thanks a lot for all your support so far!
greetings, Martijn

summit’s picture

Powery, can you check whether this solution works? I am not behind a pc on which I can change code.
Thanks! greetings, Martijn

powery’s picture

And shall I try patch from #3 and patch from #5? Or from #5 only?

powery’s picture

I think, that only #5 works. But "Meta tag ROBOTS for lists" can not be saved to others then INDEX, FOLLOW.

summit’s picture

For me sufficient! Thanks. Will try patch #5 also when I am home.
EDIT: Yes patch #5 worked for this issue!
greetings,
Martijn

powery’s picture

And can you change "Meta tag ROBOTS for lists"?

summit’s picture

Why should I use that please?

powery’s picture

As is written as help under Meta tag ROBOTS for lists:

The value to use for the meta tag ROBOTS for the pages that use a pager; this setting is not used for the first page of the list, or when the option to repeat the meta tags for all the pages in the same list is selected.

If you don't want to index pages with url like example.com/something?page=4, you can choose NOINDEX, FOLLOW for these pages a index only page example.com/something.

summit’s picture

Hi,
And that is not working with patch #5?
greetings, Martijn

powery’s picture

Yes. I can not save other value.

summit’s picture

I think would be best to search through the commits, or place a new issue for this, right?
greetings, Martijn

powery’s picture

ok

Mike Kennedy’s picture

Honestly this was driving me absolutely crazy, I couldnt get the metatags to say robots "index,follow" which I feel is an important part of metatags. I even thought about switching back to the old node words. After a week of searching I finally found this "hack". I dont know if it is the correct way to fix this problem, as I am not a php guy but it was simple to do and worked for me. Here is the link good luck http://www.answerflip.com/how-fix-missing-metatags-robots-index-follow-n...

czeky’s picture

Hi, on my instalation, robots changed in node edit are not saved..

wheelercreek’s picture

I was able to correct the issue partially by using #3 and #5 above, but I found that the string was output as "indexfollow" without the comma.. I tried searching up the code stream to see how this was happening, but in the end I just added an if statement to correct that line and rewrite it. It's at line 297, in the function "nodewords_basic_robots_prepare":

if (!empty($value)) {
     $tags['robots'] = implode(',', $value);
     if($tags['robots'] == 'indexfollow'){ 
         $tags['robots'] = 'index,follow'; 
     }		
}

I did find that the value, by the time it gets to this implode statement, is already a string instead of an array.

trentharlem’s picture

"How to write a Robots Meta Tag
Where to put it

Like any tag it should be placed in the HEAD section of an HTML page, as in the example above. You should put it in every page on your site, because a robot can encounter a deep link to any page on your site.
What to put into it

The "NAME" attribute must be "ROBOTS".

Valid values for the "CONTENT" attribute are: "INDEX", "NOINDEX", "FOLLOW", "NOFOLLOW". Multiple comma-separated values are allowed, but obviously only some combinations make sense. If there is no robots tag, the default is "INDEX,FOLLOW", so there's no need to spell that out. That leaves:

<META NAME="ROBOTS" CONTENT="NOINDEX, FOLLOW">
<META NAME="ROBOTS" CONTENT="INDEX, NOFOLLOW">
<META NAME="ROBOTS" CONTENT="NOINDEX, NOFOLLOW">

"

-From: http://www.robotstxt.org/meta.html

If I'm reading this right, if i want my page to be "INDEX,FOLLOW", I should uncheck the "ROBOTS" meta tag in the "meta tags to output" section at /admin/content/nodewords...
YES?

wiredescape’s picture

The 'no comma' problem is a different issue.

See #785654: Commas missing in ROBOTS tag for previously created nodes for more info.

laura s’s picture

Just had a friendly reader report to me that "NOINDEX,NOFOLLOW" was on all of my blog posts, even though the module is set for INDEX,FOLLOW. I disabled the field in the module. Rather unfortunate SEO impact on an SEO module.

AlexisWilke’s picture

Assigned: Unassigned » AlexisWilke
Priority: Normal » Critical
Status: Active » Needs review
StatusFileSize
new1 KB
new1.13 KB

HI guys,

This is a really bad one! Making all those websites NOINDEX and NOFOLLOW. You should have fixed that the day it was reported!!!

There are two patches.

#3 was not sufficient since you had another place with the same wrong defaults.

There is a patch for #20 although that's much less important to not issue the tag if just and only "index,follow". Up to you whether you want to apply that one.

Thank you.
Alexis

mjohnq3’s picture

Are the patches in #23 against 6.x-1.12-beta9 or the latest dev version? I'm assuming beta9.

**Applied to 6.x-1.12-beta9, seems to fix the problems.**

AlexisWilke’s picture

mjohnq3,

I have 6.x-1.x-dev. So not beta9, but the line numbers should be very close and from what they are describing it feels like it is the same.

Thank you.
Alexis

danny englander’s picture

Subscribing

dave reid’s picture

Assigned: AlexisWilke » dave reid

On it, committing tonight.

damienmckenna’s picture

Issue tags: +v6.x-1.12 blocker

Tagging this so we can ensure it gets fixed before the next release.

dave reid’s picture

Version: 6.x-1.12-beta9 » 6.x-1.x-dev
dave reid’s picture

Status: Needs review » Fixed

Had a good chance to review, test and commit this to CVS. Thanks everyone!
http://drupal.org/cvs?commit=443992

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

damienmckenna’s picture

Does this need to be re-examined, given the 6.x-1.x code shakeup?