Closed (fixed)
Project:
Nodewords: D6 Meta Tags
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Sep 2009 at 17:53 UTC
Updated:
19 Sep 2009 at 01:30 UTC
Hi,
I have the nodewords module configured to use the teaser of a node for the Description meta tag.
This works fine for the Page content type. I can see the <meta name="description" content=....."> in the source of the page.
However in my CCK content type this tag does not work. Nor in my FAQ content type, but that is not so important.
I have tried to search the issues and there was a similar issue a year+ ago, but it seems to have been resolved.
Having the description meta tag for my CCK content type is very important for my site's SEO, so any and all help would be very much appreciated.
Thanks in advance for any help....
[Edited by KiamLaLuno to show the HTML tag meta that was not appearing]
Comments
Comment #1
drupaloo-1 commentedHi KiamLaLuno,
Thanks for clarifying my post.
I would appreciate any feedback you may have on my question as well.
This issue is also being reported in:
http://drupal.org/node/561368
I would be happy to work with you in any way to try and resolve this - please let me know if you would like any info like my config, etc.
Comment #2
avpadernoI am changing the title to make it more generic to include also the other issue.
Comment #3
avpadernoI have marked #561368: Description does not show up as duplicate of this report.
Until further information, I will treat this report as a bug report.
What is the difference between your CCK content type (which I guess it is a custom content type which uses at least one CCK field), and the FAQ content type?
Comment #4
drupaloo-1 commentedHi KiamLaLuno,
You are correct, my CCK content type is custom, and it has about 20 -30 fields.
The FAQ content type is automatically installed as part of the FAQ module. This content type is quite simple, just a few fields, much like a Page content type.
I do not use the Drupal core Story content type.
Also, I have just noticed that this problem is only occurring on my local test site, not on my production site.
My test site is a copy of the production site.
My test site is XAMPP running on Windows XP.
Comment #5
avpadernoWhat is the difference between the local test site, and the production site? Are there any modules installed in the local site that are not installed in the other site? Is there a site using a multi-site settings?
Comment #6
drupaloo-1 commentedDear KiamLaLuno,
Thank you for pointing me in the right direction.
There were several modules I had installed on the local site, in order to test them out, that were not on the production site, including the HTML Purifier module.
Before I posted this initial issue, I suspected it was the HTML Purifier module, and so I disabled this module, and uninstalled it, but the Description meta tag still did not show. I tried many other things, but they did not help, and so then I posted this issue.
However, I still suspected this module after you asked what the differences were between my local site, and my production site.
So I deleted my local site and reinstalled it from a backup from my production site. This backup did not contain the HTML Purifier module at all, installed or uninstalled.
After restoring the local site from the production site, the Description meta tag did show, and it is properly generated from the teaser of the node.
Then I installed the HTML Purifier module, and the tag still showed ok.
But when I added the HTML Purifier module to the Filtered HTML input filter, (this is part of the configuration of this module) then the Description meta tag disappeared from my CCK content type.
So this issue was caused by the HTML Purifier module, but even if the HTML Purifier module is disabled and uninstalled, the Description meta tag still does not show.
Thanks for your time and attention.
I will let the HTML Purifier module developer know about this issue. Created an issue at http://drupal.org/node/568810.
Comment #7
avpadernoI am not sure if you already said that, but is the meta tag description created from the node teaser? That would explain why the filter is causing the meta tag to not appear (if the meta tag content is an empty string, then Nodewords doesn't show it).
Comment #8
drupaloo-1 commentedThat is correct, the Meta tags module is set up to generate the Description meta tag from the teaser. I simply have checked the "Use the teaser of the page if the meta description is not set." option in the Meta tags module.
I am sorry, but I don't understand why the filter would cause the meta tag not to appear. Could you explain why? I don't see the contents of the Description meta tag as being malicious html.
Comment #9
avpadernoThe system used by version 6.x-1.0 to generate the node teaser causes some problems with third-party modules (there are some reports about problems with Ubercart); rather than saying that the problem is caused by third-party modules, I would say that the problem is caused by the way the node teaser is generated by Nodewords. That is the reason I have changed the way the node teaser is generated in the development snapshot; in the near future I will remove that option.
Obtaining a valid description text from the node teaser is not easily done, especially because the meta tag description content is supposed to be shorter than the node teaser.
Comment #10
drupaloo-1 commentedOk, once again thanks for your response.
I can imagine that generating the Description tag from the teaser is not an easy thing.
But please do keep this option in the module because it contributes greatly to the success of my site.
I have nodes created by users and this is a great way to show the teaser of a node in the "Description" Meta tag, which in turn means I can get Google to show the teaser in Google search results.
Comment #11
avpadernoThe problem is that the meta tag description should be a short description that doesn't contain any HTML tags, as the description for the meta tag says (). Differently, the node teaser doesn't have those limits, and creating the meta tag description content from the node teaser is tricky.
Comment #12
drupaloo-1 commentedThanks for explaining further, now I see what you mean.
For my CCK content type, the description meta tag generated from the teaser is:
<meta name="description" content="Overview Description:&nbsp; Our recently renovated, 1600 sq. ft. home.......So this does have some html in it and so now I can see why the HTML purifier takes it out.
The "Overview" part is actually the label from an image field, and Description is the label of a CCK textarea field, and "Our recently renovated, 1600 sq. ft. home........" is the contents of the Description CCK textarea field.
So in a way, in my case, the description meta tag is generated from certain fields and these fields are represented by Tokens.
That leads me to a possible suggestion:
Could you code it so that the description meta tag is generated from a field or from tokens?
I have seen some other modules use tokens.
E.g. The Page title module can generate the title of a page from tokens.....
Comment #13
avpadernoHTML Purifier is a filter module; this means it does filter the node body content, but it is not able to filter the tags added by Nodewords in the HTML HEAD tag.
The problem is simply in how the node teaser is generated from Nodewords, which doesn't use the function made available from Drupal because if it would do it, you would see a link after the node teaser; that is not desired, and it would be to add HTML tags where they should not appear.
About the integration with token.module, I have already planned to do that (see #508496: Support for tokens). I will implement it when I will change the code to make it use the correct revision of a node.
I am marking this report as fixed, because the problem should not be anymore present in the development snapshot, which is the base for the next official release.
Comment #14
drupaloo-1 commentedThanks for explaining more.
That's great that you were already planning to use Tokens.
If I can be of help in testing the next revision, please let me know.
I can work without the HTML Purifier module for now, until your next rev comes out. So having this issue set to Fixed is fine with me.
I really appreciate your time and effort in having helped me.