Not getting any help in the main forum ( http://drupal.org/node/690982 ), so hopefully someone has an answer here?
We are running a couple of dozen sites off one installation of Drupal. One admin runs all the sites. There is no over-arching metadata. Each site has site-level metadata. Some of the nodes on each site need to have node-specific metadata. Thus, nodewords. It is installed, and indeed I can see a meta description showing up only where it ought. The problem is node-level metadata is being *appended* to site-level metadata, rather than replacing it. I want node-level metadata to replace site-level (or even overarching) metadata.
How do I do that?
I've tried flipping as many different settings on and off, in as many combinations and permutations as possible, and nothing seems to work.
Oh, and turning off the site level metadata -- which does cause the node-level metadata to appear alone, unappended -- is not an option because then every page but the one in question would be meta-less.
Comments
Comment #1
damienmckennaI'll be glad to help :)
Please confirm my reading of your problem: you set the default meta tags and you set some on a specific node, when you view that node it outputs *both* the default meta tags *and* the node's meta tags, leading to duplicate tags?
Comment #2
Preston McMurry commentedEssentially, yes. (Though the node-level tag is different than the site-level tag.)
Thanx for the quick response!
Comment #3
damienmckennaI'm sorry you're running into this bug. I'll try to look into it this weekend and will see what I can find out.
Comment #4
Preston McMurry commentedI don't know if it is a bug, or simple unfamiliarity. I'm trying to learn Drupal, but am finding it very difficult, so it is likely something I am unaware of, rather than a bug. Some flag or something I am not setting, or something like that.
I have description and keywords checked on admin/content/nodewords/settings , both to show on edit forms and in HTML. (The latter being why the node description does show up.)
I also looked at admin/build/domain/conf/{siteID} and node/{nodeID}/edit , but no matter what I try, I cannot get it to work how I want, for all the pages, at the same time.
Comment #5
Preston McMurry commentedHeck, it even inserts a comma between the site and node descriptions:
Everything between content=" and the carriage return actually is part of the site description. Everything after the comma is part of the node description.
-----
edit: Not sure why I was using an alias. switched to real name.
edit 2: This appears to be a different issue than http://drupal.org/node/1293494 and http://drupal.org/node/1331564 in which the complaint was that the site meta was overwriting node meta. My complaint is node meta is appended to site meta, rather than overwriting site meta.
Perhaps there should be some sort of switch to indicate which has precedence (site or node), and how (overwrite, append, or prepend).
Comment #6
damienmckennaCould you please paste in an example of the meta tags that are displayed on a node? Thank you.
Comment #7
damienmckennaI tested the current codebase and this does not seem to be a problem:
I set the defaults to say "not the [tagname]", e.g. "not the og:description", and on the node set them to just say "[tagname]", e.g. "og:description". As you can see, each tag is only output once (except for dc.contributor, and that's a new feature), so either the bug has been fixed or something funny was going on with your setup.
I'll be releasing the next version this week, please try it out :)
Comment #8
Preston McMurry commentedActually, that is the exact clip from the generated HTML. :-) But here is the entire head:
p.s. I will! Thanx for being so quick to respond. :-)
p.p.s. - Set the defaults where? There's over-arching metadata (forget where it is), site-level metadata (i.e. admin/build/domain/conf/{siteID}) and node-level metadata (i.e. node/{nodeID}/edit).
Comment #9
damienmckennaAh, I see what you mean, it's appending the node description onto the end of the site-wide default description.
Please test out the current -dev version, it doesn't exhibit that behavior.
Comment #10
Preston McMurry commentedI am a Drupal n00b, so hang in there ... I downloaded the -dev a few hours ago. I just now finished installing it. (I was trying to following the update module instructions at http://www.youtube.com/watch?v=XkyLke7Uj6I .) Not sure if you've updated the -dev since I grabbed it this morning? In any case, without changing anything else in my setup, or changing the settings on any node (or anything else), I refreshed my test node. Editing out the other head elements, it now looks like this:
In other words, the site description is still there, except now it is as a second meta tag.
I tried putting [tagname] in the node's meta description instead -- I am probably misunderstanding the instruction -- and basically got the same result:
That appears to be the case regardless of browser.
-----
edit: I downloaded -dev again, and did a diff of nodewords_basic.module with no differences, so it appears I have the most recent -dev version.
Comment #11
Preston McMurry commentedNoticed another dev release this morning. Grabbed the "May 29, 2012 - 12:28" .zip file. Went through the module update process. Without doing anything else other than refreshing the public-side test node in question, it seems I am back where I was before the May 28th -dev release:
Comment #12
damienmckennaDo you have any other modules that provide meta tags? Do you have any custom modules that could be using the APIs to modify things?
Comment #13
damienmckennaAs it happens, this is a feature of Domain Meta :)