The ROBOTS tag has an option, called "Use defaults", which allows you to ignore the values that are selected on a given custom page and just use the defaults. This is the only tag this option is available for and its inclusion is extremely confusing when it would be just as useful for the other options. As a result it should be removed entirely, especially in light of the new INDEX,FOLLOW options available via #792218: "Default robots meta tag" Missing.

Comments

mr.j’s picture

This is not just a problem for custom pages - it is a problem on every node edit form.

I am going to quote myself from another thread on this one:
http://drupal.org/node/660746#comment-4190238

I debugged this on a node page and found that the issue is that the robots tag only shows if you check the "Use the default value" under the robots settings on the node edit screen.

Obviously it is unreasonable to expect sites to go through and check this on every single node, not to mention that not all users/editors would even have permission to set it. The reverse should apply - use the default value unless the node has an explicit setting checked to say not to.

This bug is critical for sites like the one I am working on now which does not want google to cache any pages. ATM you can only stop the home page from being cached, or edit every single node and page one at a time.

For now I have added this to page.tpl.php just before the meta tags are normally printed:

// Workaround for nodewords bug
if (stripos($head, '<meta name="robots"') === FALSE) {
  print '<meta name="robots" content="noarchive, noodp, noydir" />';
}
print $head;

Despite that issue being marked closed, the problem I raised still exists in the recommended 6.x-1.13 release. That is, unless you tick the "use defaults" checkbox on every node, the defaults are not output in the page header. In fact there is no robots tag at all. Our defaults are not the standard INDEX,FOLLOW so if they are not output we are not getting a desired result. We have a site with over 10,000 nodes and we should not have to go back and update them all just to have the default settings output. After all that is why they are named "default".

Far more sensible would be a checkbox that says "override the defaults on this node" or something. The same would apply to custom pages.

I realise this is still probably a leftover from the idiot who was wrecking maintaining the module for a while but as it stands it makes no sense and it is forcing us to continue using the hack mentioned in the post above.

damienmckenna’s picture

Assigned: Unassigned » damienmckenna

@mr.j: Please try the current v6.x-1.14-beta2 version, let me know if it handles the defaults any better. I'll look into this before the next beta.

mr.j’s picture

Ah I have found the root of the problem and the good news is that it is not in fact nodewords.

We also have nodewords_nodetype module installed and it allows different default settings for robots, keywords, and description per node type.
http://drupal.org/project/nodewords_nodetype

It appears that if you neglect to set any default robots settings for a node type the global nodewords defaults are not inherited so nothing is output. So its my error. Apologies for the false alarm (although I still agree that the "use default" checkbox is confusing and unnecessary).

damienmckenna’s picture

Assigned: damienmckenna » Unassigned
Issue summary: View changes
Status: Active » Closed (won't fix)