Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Metatag needs to support the Dublin Core Basic Element Set meta tags using the DC-HTML specification.
Comment | File | Size | Author |
---|---|---|---|
#59 | metatag-n1491616-59.patch | 13.18 KB | DamienMcKenna |
#58 | metatag-n1491616-58.patch | 0 bytes | DamienMcKenna |
#53 | metatag-n1491616-53.patch | 13.01 KB | DamienMcKenna |
#52 | metatag-n1491616-52.patch | 14.26 KB | manhalt |
#39 | metatag-dublin_core_metatags-1491616-39.patch | 14.02 KB | Devin Carlson |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedI just wanted to note in this issue that Dublin Core has moved towards recommend placing metadata using RDF. If you look at the Dublin Core User Guide and search for 'RDF', that section explains the history. You can also look at their most recent guide to publishing metadata (2011), you'll see that the examples are RDF.
However, some organizations and governments might still rely on the old-school
DC.
style of meta tags, so this support may still be necessary.Comment #2
DamienMcKennaUpdated title.
Comment #3
BarisW CreditAttribution: BarisW commentedGents, attached is the Dublin Core integration of Metatag. Patched again 7.x.1.x-dev.
All credits go to my colleague Marty2081.
The Dublin Core Metatag submodule is developed by LimoenGroen on behalf of Gemeentemuseum Den Haag..
Comment #5
BarisW CreditAttribution: BarisW commentedEat this, test bot..
Comment #6
rooby CreditAttribution: rooby commentedAwesome thanks. I made my own in the meantime but I will test this and convert to using it asap.
I have one point for discussion, which you may have already considered:
For my quick fix solution from #1208366-8: Port to Drupal 7 I used the dcterms namespace.
Should we use the legacy dc namespace, or the dcterms namespace.
There is some information regartding this spread thinly around the dublin core documentation but the most concise information I have found is:
http://wiki.dublincore.org/index.php/FAQ/DC_and_DCTERMS_Namespaces
Comment #7
Marty2081 CreditAttribution: Marty2081 commentedHi Rueben,
I guess you're right and we should use the dcterms namespace, but I'm a bit lost on how to properly populate the DC tag values. I understand the definitions in the dc namespace had no defined domains or ranges and the overlapping ones in the dcterms namespace do have defined ranges.
For instance: the dcterms:creator value must be one of class "Agent". What would one put into dcterms:creator? Can you still just put a String in there like "John Doe"?
Comment #8
yashadev CreditAttribution: yashadev commentedThe patch in #5 applied cleanly and works well
Comment #9
rooby CreditAttribution: rooby commentedSee that there are discussion points in #6 that need to be answered before this gets committed.
I'm not comfortable marking ready for commit until that is sorted because we don't want to have to change it down the track.
Comment #10
Marty2081 CreditAttribution: Marty2081 commentedCan you answer my question in #7 then?
Comment #11
DamienMcKennaRelated issue for Nodewords: #518274: Add more Dublin Core meta tags
Comment #12
RedTop CreditAttribution: RedTop commentedTo further implementation and help along the discussion, here's my two cents.
Perhaps implement the current patch with the legacy namespace and perhaps built on that by later providing an option to allow developers to choose between the two namespaces? It all seems rather fluid now and I would rather stick to something which is already widely accepted, especially with such a conservative audience (info managers are the worst imo. :P)
Comment #13
nick_schuch CreditAttribution: nick_schuch commentedIn response to RedTop in comment #12 I have attached a patch that provides a config form to change between the two metatags.
This is more of a proof of concept, let me know what you think.
Comment #15
nick_schuch CreditAttribution: nick_schuch commentedSecond times the charm.
Comment #16
nick_schuch CreditAttribution: nick_schuch commentedComment #17
miaoulafrite CreditAttribution: miaoulafrite commentedthanks nick_schuch
i found out a little mistake i guess when you set up default value for metatag_dc_prefix.
it is actually set to CD where it should be DC
attached is a patch
Comment #19
miaoulafrite CreditAttribution: miaoulafrite commentedby the way, for date properties for example, schema shouldn't be scheme ?
i also found out that in DC.identifier default values, a "/" is missing after [site:url]
attached is a new patch
Comment #20
miaoulafrite CreditAttribution: miaoulafrite commentedComment #22
rooby CreditAttribution: rooby commented@miaoulafrite:
Your patch needs to include all the changes from #15.
That patch is 26k and yours is only 2k.
Comment #23
sylus CreditAttribution: sylus commentedRerolling the metatag patches with all fixes mentioned above.
Comment #24
sylus CreditAttribution: sylus commentedWhoops that was the original. I patched with recent changes but left out the patch file that was added in #17.
Comment #25
sylus CreditAttribution: sylus commentedSetting to needs review
Comment #26
sylus CreditAttribution: sylus commentedAdding modifications including the patch file included from #17 in case this was intentional.
Comment #27
mgiffordthis patch applies fine to the git repo and really should be part of the next release of this module.
Minor issues when applying this to git:
I also applied this to 7.x-1.0-alpha8, installed the module & went /admin/config/search/metatags/dublin-core
this is a picky point, but don't think the tab needs to say "Dublin Core Configuration" think that just "Dublin Core" would be sufficient & more consistent.
Comment #28
sylus CreditAttribution: sylus commentedRerolled fixing whitespace errors and fixing title suggestion as per #27
Comment #29
mgiffordExcellent. Now in trying to play with this a bit more I wanted to set it up so that I had some default DC metatags here admin/config/search/metatags
Strangely, all the types have become:
Now this might be some unrelated bug, but I had (after applying the patch) gone their previously and seen the normal types:
Gone into "Global: Front page" and tried to add some random metadata so it can appear on the front page.
Even after clearing the cache it all simply said Unknown.
Comment #30
sylus CreditAttribution: sylus commentedHmm I am not quite sure what is going on, can you try a fresh site? I am not able to reproduce this error.
Comment #31
mgiffordSeems to work fine on a test install.
Comment #32
DamienMcKennaI'll review this shortly.
Comment #33
DamienMcKennaI've reviewed this and it looks good so far. I've written to the Dublin Core General Mailing List to ask for clarification on a few items, once I receive a response I'll be happy to help finish this and add it to the stable release.
Comment #34
rooby CreditAttribution: rooby commentedGreat. Their documentation definitely leaves me wanting clarification on things :)
Comment #35
DamienMcKennaPer emails with Stuart Sutton, the Managing Director of the DCMI, some changes are necessary:
Comment #36
Devin Carlson CreditAttribution: Devin Carlson commentedAn updated patch which uses colon separators instead of periods and changes all prefixes and tag names to lowercase.
I'm not sure what should be done to address using both prefixes while defaulting to "dcterms":
Comment #37
DamienMcKennaThanks for the updated patch.
A few further suggestions:
Comment #38
sylus CreditAttribution: sylus commentedAlso one minor thing I noticed with coder review is that:
drupal_set_message("The cache needs to be cleared for this setting to take effect.");
Should be wrapped in t()
Comment #39
Devin Carlson CreditAttribution: Devin Carlson commentedNew patch to incorporate the feedback from #37 and #38.
Changes:
Comment #40
mgifford@sylus & I were chatting offline & wondered if any thought has gone into HTML5 & Dublin Core? There are variations which should be considered at some point, but possibly in a future release:
http://efoundations.typepad.com/efoundations/2010/02/html5-metadata-and-...
http://theroadtojoy.at/cheatsheet/dc-html5/
Comment #41
DamienMcKenna@mgifford: We'll consider that after v1.0 but in a separate issue, thanks for the links.
Comment #42
DamienMcKenna@Devin: thinking on it further, I think we should scrap supporting the "dc:" tags entirely and focus on just "dcterms:" for now, if anyone specifically asks for it we'll do a follow-up issue.
Comment #43
DamienMcKennaComment #44
Anonymous (not verified) CreditAttribution: Anonymous commentedFYI, the explanation in the first link provided by mgifford above actually comes from an incorrect reading of the different specs involved.
For example:
Microdata doesn't make use of the rel attribute at all, so these two parts of the HTML5 spec don't relate to each other.
The second link use the old style DC metadata, which isn't currently advocated by Dublin Core.
Comment #45
colanRe #35: I'm not sure about the colon instead of the period. I'm getting validation failures because things like "dcterms:creator" are being used instead of "dcterms.creator":
Line 6, Column 81: Bad value dc:creator for attribute name on element meta: Keyword dc:creator is not registered.
We should probably stick with the "." as per the W3C, correct? All of the dot attributes are listed there, but no colon ones.
Comment #46
DamienMcKenna@colan: See #35 above. I've had emails with the Dublin Core director who says to use a colon vs period instead as a divider. That said, I've notified them about the WHATWG's incorrect status.
Comment #47
DamienMcKennaI've since found a DCMI document from 2008 that says to use dot notation, so I've requested clarification - I'll let you know what I find out.
Comment #48
rooby CreditAttribution: rooby commentedIn my previous investigations into dublin core it's as clear as mud.
Glad to know I'm not the only one that thinks so :)
Comment #49
DamienMcKennaFurther, on page 18 of the Intro to Dublin Core presentation from the 2011 DCMI Conference it shows both "dc:title" and "dc.date" - both notations. Argh.
Comment #50
DamienMcKennaOne final link: the "Notes on DCMI specifications for Dublin Core metadata in HTML/XHTML meta and link elements" document published in 2008 references "dc:language", but elsewhere says:
I think we should go back to DC-HTML's authoritative statement:
Comment #51
DamienMcKenna@rooby: Yeah, like I said I've asked for clarification from the director, I'll post an update as soon as I know something then we can finish this patch off.
Comment #52
manhalt CreditAttribution: manhalt commentedThis is the same as the patch from #39 but I've improved the description on the main fieldset.
Comment #53
DamienMcKennaA bit of an update:
@linclark: Would you mind taking a look and letting me know if this is ok? Thanks.
Comment #54
Anonymous (not verified) CreditAttribution: Anonymous commented@DamienMcKenna I'm not familiar with the dot-style DC metadata. I only have experience with the RDF style.
Comment #55
scor CreditAttribution: scor commentedAfter discussing this with Thomas Baker, we concluded it was probably best to use the "." notation as default for now. The DCMI does intend to make this notation archaic and move to the RDFa notation in the future, but there is not official documentation on that yet, and thus the consumers currently expecting the "." notation haven't been updated to the ":" notation. So it seems best to go ahead with the latest patch.
In the future for follow up issues, you might want to provide an option to choose which delimiter/notation to use in case some site administrator want to publish DC metadata with the newer ":" notation depending on which consumers they are targeting. In a more extreme case, some might have a need to support both at the same time, hence duplicating each metadata tag.
When using the "." notation, there is no need to publish any xmlns namespace.
Comment #56
DamienMcKennaPer emails with Thomas Baker and others, I've refocused this issue on using the dot-notation format defined in DC-HTML; I'm also going to learn about how to handle RTFa in Drupal and see what Metatag (and Nodewords) can do to better work with it.
Comment #57
DamienMcKennaThe patch needs some updating per @scor's suggestions in #55.
Comment #58
DamienMcKennaI've removed the xmlns definitions per scor's comment, tidied up the README.txt file and removed some unnecessary code that had been previously commented out. I think this should be pretty good to go.
Comment #59
DamienMcKennaOh, it might help if I output the correct patch :-P
Comment #60
DamienMcKennaI've committed the patch from #59, thanks for everyone's help!
Comment #61
rooby CreditAttribution: rooby commentedGreat news! Thanks to all also.
Comment #62
DamienMcKennaLast night saw the release of 7.x-1.0-beta1, so I'm closing all these "fixed" issues in the interest of tidying up the issue queue. Thank you all for your help getting us to this point!
Comment #62.0
DamienMcKennaClarified the issue on the 15 basic tags and DC-HTML.
Comment #63
DamienMcKenna