Meta keywords from content are not being added to the sitemap; is this a bug or is this just not implemented?
I know it is not a required field per the google specs...

Thanks!

CommentFileSizeAuthor
#3 keywords.patch2.32 KByan
#2 keywords.patch2.28 KByan

Comments

dave reid’s picture

Status: Active » Closed (won't fix)

It's not implemented and not planned to be implemented until after this has been merged with XML sitemap.

yan’s picture

Status: Closed (won't fix) » Needs review
StatusFileSize
new2.28 KB

As a temporary fix until the modules have been merged:

Here's a patch against 6.x-1.4 that adds the possibility to select vocabularies whose terms will be included as keywords. Additionally, it adds the possibility to define "constant" keywords that will be used for all nodes.

yan’s picture

StatusFileSize
new2.32 KB

oops, added one more if-clause to avoid error messages when no vocab is selected.

kentr’s picture

Awesome, thanks for the patch.

I think this feature will be valuable to my client, so hopefully I can provide beta testing.

kentr’s picture

[duplicate deleted]

Ravi.J’s picture

I have tested patch #3 and it seems to work. However support for additional fields should be done via drupal_alter.

Advantages over #3 patch above are as follows
1. The above patch only addresses "keywords", there are other fields such as stock_ticker, genres, access etc that the patch does not solve and googlenews does not deal with them correctly.

2. Other SEO modules such as nodewords for D6 and Metatags for D7 provide comprehensive mechanism for editors to provide keywords per site, per page etc, googlenews can use keywords provided by these modules without having to define them separately as designed in the above patch.

A better way for providing support would be by allowing other modules to add additional fields

while ($node = db_fetch_object($query)) {
     // Allow other modules to alter fields, and add new fields
       $extra_fields = array();
       drupal_alter('googlenews_additinal_fields, $extra_fields);

       $content .= '<url>';
        ...
       $content .= '<n:publication_date>' . gmdate(DATE_W3C, $node->created) . '</n:publication_date>';
     
       // Add in extra fields
       if (!empty($extra_fields)) {
         foreach($extra_fields as $field => $value) {
           $content .= sprintf('<n:%s>%s</n:%s>', $field, $value, $field);
         }
       }     
       $content .= '</n:news>';
       $content .= '</url>';
     }

You can then quite easily write

 hook_googlenews_additinal_fields_alter($fields) {
     -- Custom logic to add additional fields
  }
Andy Behlen’s picture

We use Drupal 7 to publish the online edition of our small town newspaper. This module is extremely helpful to us, but I'd like to recommend a feature that would make it even better for our purposes and I'm sure others' as well.

I've defined three basic node types for the various kinds of content we post: articles, classified ads, and events. Googlenews sitemap already allows me to filter out the later two, so only news articles are entered into the sitemap. This part is great.

However, most of the article nodes do not need to go into the sitemap either. There are wedding announcements, obits, meeting notices, and all kinds of other stuff that google news does not need to know about. I want to post only our actual hard news articles to the googlenews sitemap. I imagine that I could define a taxonomy term that gets tagged to the node whenever the author clicks a checkbox that says "Post to googlenews" or something like that. The module could then only post these nodes to the sitemap.

Just a suggestion.

(I'm a reporter, not a web developer, by the way.)

damienmckenna’s picture

Status: Needs review » Closed (duplicate)

Lets deprecate this issue in favor of adding all of the normal tags in #832440: Numerous tags missing from Google News Sitemap.