Title header is changed, but not DC.Title

svdoord - September 29, 2008 - 13:52
Project:Page Title
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Also from my side many thanks for the essential page title module!

I just noticed that the tag is correctly handled by the page title module, but the tag is not changed. Is this intentional? I would expect that the two should have the same content.

#1

svdoord - September 29, 2008 - 13:54

Sorry about the missing tags. It seems I cannot edit my post, so as a comment a retry:

I just noticed that the <title> tag is correctly handled by the page title module, but the <meta name="DC.title"> tag is not changed. Is this intentional? I would expect that the two should have the same content.

#2

nicholasThompson - October 1, 2008 - 09:24
Status:active» postponed (maintainer needs more info)

What is the Meta DC.title? I've never seen this one... I suppose its something that could be added to the head by Page Title? What puts it there for you - are you using NodeWords?

#3

svdoord - October 1, 2008 - 11:04

Yes, I'm indeed using nodewords. Is that where the tag comes from? I just assumed it to be always there. Still, it would be nice if page_title could handle it as well, if it's there...

For background information on this tag, refer to http://dublincore.org/documents/dc-html/.

#4

nicholasThompson - October 1, 2008 - 11:11

I believe it is provided by NodeWords... Will investigate.

#5

svdoord - October 2, 2008 - 06:27

Great, thanks!

#6

jenlampton - October 21, 2008 - 03:18
Project:Page Title» Nodewords
Version:6.x-2.x-dev» 5.x-1.12
Status:postponed (maintainer needs more info)» needs review

svdoord,

I found a bug in the NodeWords / meta tags module that caused DC.Title to never be printed...
here is my fix: http://drupal.org/node/323230
Please review my patch.
Jen

#7

svdoord - October 31, 2008 - 09:07

Hi Jen,

Unfortunately I'm running Drupal 6, so I'm unable to test your patch.

However, I doubt that we're referring to the same issue here. You say that DC.Title is never printed, but that is not my issue. DC.Title _is_ printed, but the value that is printed is not the correct one. It prints the title from the node, not the one I configured as "page title" using nodewords.

For example:

Title = "The title I see in my document"
Page title = "The title displayed in the title bar of the web browser" (<- nodewords)

Now both the and should be "The title displayed in the title bar of the web browser", but only the is, and is "The title I see in my document".

Do you agree that these are two different issues? If so, could you please change the issue properties back to project Page Title and version 6.x-2.x-dev?

Thanks,
Stefan

#8

jenlampton - November 5, 2008 - 17:40

Stephan,

"The title displayed in the title bar of the web browser" has nothing to do with this module. That title tag is the responsibility of the Page Title module (http://www.drupal.org/project/page_title). And as you stated above, is working as expected, so let's ignore that for now and focus on what's NOT working.

My issue was a meta tag DC.title that was only printed out in the 5.x branch, when no data was entered into the DC.title field.

I haven't looked at the 6.x branch, but I expect there might be similar problems in the code.

Jen

#9

svdoord - November 10, 2008 - 15:21

As I said before, for information on DC.title, please refer to http://dublincore.org/documents/dc-html/ and Your Favorite Internet Search Engine. As I understand it, the Dublin Core project (of which DC.title is a part) is an effort to standardize meta data information. The DC.title meta tag is very similar to the HTML tag, so I would expect that they should always be the same.

I finally dove into the source code and the matter of how patches are supposed to be created and all, and I created a patch that fixes my problem. Again, this patch causes the DC.title tag to have the same value as the tag, even when page_title is enabled and a different document title and page title are set.

Patch attached; please review.

Oh, by the way: the existing nodewords code mentions that drupal_get_title() cannot be used, referring to http://drupal.org/node/103399. I don't quite understand in what situations drupal_get_title() may or may not be used, but the method I call in page_title (namely page_title_get_title()) may call drupal_get_title() as well. So I would ask reviewers to also pay respect to this aspect. Thanks!

AttachmentSize
use_page_title_for_dc_title.patch 997 bytes

#10

sedmi - November 14, 2008 - 17:11

I have the same problem, I want dc title to be same as title generated by page_title module, I guess that's what this patch is solving, but I'm new to drupal and don't know what to do with this patch? where to place that code?

#11

jenlampton - November 16, 2008 - 21:15

@sedmi,
please review http://drupal.org/patch/apply on how to apply patches.
Jen

#12

sedmi - December 12, 2008 - 14:33
Title:Title header is changed, but not DC.title» different results

Hi, now almost a month after I installed that patch I see that I don't have desired result on taxonomy pages. On story and page nodes it works great, but on taxonomy pages where the page title is generated by taxonomy module, I still have different dc title and page title. Any patch for that? Or maybe for complete removal of dc title?

#13

jenlampton - December 12, 2008 - 17:12

@ sedmi -
the page_title module still does not play nicely with taxonomy, so if you are using a patch that is expecting a page_title value for the DC.title field, it might not fail gracefully if there is no page_title value created, even if that module is installed. That's a good place to start looking.
Jen

#14

mgifford - April 20, 2009 - 19:12

Having the title there is good, but there are other DC elements that are also worth including.

I just wrote this up - http://openconcept.ca/blog/mgifford/adding_dublin_core_metadata_to_drupal

But there is also this code that is very relevant - http://drupal.org/node/356711

#15

KiamLaLuno - July 2, 2009 - 16:12
Title:different results» Title header is changed, but not DC.Title
Status:needs review» won't fix

As the Drupal 5 version is not supported anymore, I am changing the status of this report.

#16

svdoord - July 3, 2009 - 13:47
Project:Nodewords» Page Title
Version:5.x-1.12» 6.x-1.x-dev
Status:won't fix» active

This issue was confused. I'm now setting the issue settings correctly, hoping that people will understand. If not, we should probably close the issue and create a new one, but I'll try this first.

 
 

Drupal is a registered trademark of Dries Buytaert.