I just had a couple of problems installing the Drupal Nodewords module (aka, the "Drupal meta tags" module) on my One Man's Alaska website, so I thought I'd share my Nodewords installation notes here.
Before going on, I have to say wow, the Nodewords module has grown up a lot since I last looked at it. The concept has changed from "Let me add meta keywords and meta description" tags to my Drupal pages to "Let me add all sorts of tags to my Drupal pages."
Installing the Drupal Nodewords (meta tags) module
I just installed the Drupal Nodewords module into a Drupal 6.16 website. As far as I know, all the other modules on the website were working fine when I started, though I need to say that I recently updated to Drupal 6.16, and I may not have tested everything thoroughly.
I installed the Drupal Nodewords module like any other module, copying it into my Drupal sites/all/modules
directory. After doing that, I went to the admin/build/modules
page, where I enabled the "Nodewords" and "Nodewords - basic meta tags" module components.
When I pressed the "Save Configuration" button, the system chugged away for a little while, and then spit out this nasty error message:
Fatal error: Only variables can be passed by reference in sites/all/modules/admin_menu/admin_menu.inc on line 521
As you can see, this error message actually refers to the Drupal Admin Menu module. I didn't know (and still don't know) if this was some sort of collision between the two modules, or a problem with the Admin Menu module that came about with the Drupal 6.16 upgrade. I only know for sure that I didn't have this problem several days ago.
After trying to decide what to do next, I decided that the Admin Menu module probably didn't have a database behind it, so there shouldn't be much harm in just deleting it, so I deleted the admin_menu
folder in my sites/all/modules
directory, and refreshed the page. Fortunately the admin/build/modules
page refreshed properly this time, and the new Nodewords modules showed up properly. I de-selected and the re-selected the Nodeword components I wanted, and when I didn't get any more error messages, I began using the Nodewords module.
(I haven't yet found the root cause of this problem yet, though I will try reinstalling the Admin Menu module again soon.)
Configuring the Nodewords (meta tags) module
As usual, you have to configure the permissions for the Nodewords module, so I did that, giving Authenticated Users the ability to edit Meta Keywords and Meta Description tags.
I then created a test page, adding both Meta Keywords and Meta Description tags. However, when I looked at the resulting blog entry in the browser, the Meta Keywords and Meta Description did not show up (when I looked at the page source code with the browser's "View Source" option).
Fixing the Drupal/Nodewords "meta tags don't show up" problem
To fix this problem I went to the admin/content/nodewords
URI. The form that shows up here lets you select which meta tags you want to be able to edit, and which meta tags you want to be displayed in the browser. I enabled "Meta Description" and "Meta Keywords" in both the Edit and Output areas of the form, saved my changes, and presto, the meta keywords and meta description both showed up in the browser source code.
I have to say, this is all covered in the Drupal Nodewords module README.txt file. For some reason I just skipped over the Nodewords settings page (admin/content/nodewords
).
Part of me wants to say that the Meta Description and Meta Keywords should obviously be defaulted to "on" in the Edit and Output forms, but by not enabling these by default, it does force the Drupal administrator (me) to go to these pages, which is probably a good thing, especially when it is covered in the README/Installation docs, lol.
Problem with Nodewords editing fields
The only problem I'm currently having with the Drupal Nodewords module is with the editing fields. No matter which fields I say I want to be editable (as in the Abstract, Canonical URL, Copyright, Description, Keywords, Revisit After, and Robots fields), all the fields show up when I go to edit a blog page (node/add/blog
). This is certainly annoying, but not a show-stopper. I haven't looked on the Nodewords issue page yet, but this may be a new bug, a known bug, or it may have to do with me being logged in as the Drupal admin user.
Drupal Nodewords installation summary
Other than the problems mentioned here, if you're looking to add meta tags to your Drupal installation, the Drupal Nodewords module is the way to go.