Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The administration users should be allowed to edit the global value for each meta tag that is set to be edited.
Comment | File | Size | Author |
---|---|---|---|
#5 | Voila_Capture_11.png | 48.31 KB | apaderno |
#5 | Voila_Capture_12.png | 54.18 KB | apaderno |
Comments
Comment #1
apadernoThe code has been changed, and committed in CVS.
Comment #2
apadernoComment #4
AlexisWilke CreditAttribution: AlexisWilke commentedI have got the version of Jul 21, 2009 and it looks like I can only change the Description and Keywords... even though everything is selected (including Extras.)
Am I missing something else?
Thank you.
Alexis Wilke
Comment #5
apadernoAs you can see in the screenshots, I am able to edit more than the two meta tags you reported.
You will notice that some meta tags are not visible in some pages because it doesn't make sense to have them in those pages. To make an example, the canonical URL meta tags doesn't appear in the "Default values" page (there isn't a default value for that meta tag); also, the site verification meta tags appear only in the "Front page" settings page (those meta tags are not searched in pages other than the front page).
All the meta tags have a permission associated. It can be you are using a rule that doesn't have the permission to edit some specific meta tags; also, the meta tags you want to edit must be selected in "Tags to show on edit form".
Comment #6
AlexisWilke CreditAttribution: AlexisWilke commentedKiamLaLuno,
Okay... well... I really thought I tried that way. But to my point of view that is incorrect. i suppose the PICS do not appear in the globals... even though I can very well generate a PICS for all my pages as long as my entire site is pretty much all about the same thing.
Now, say I do this:
1. Mark the Copyright field as required in my Meta Tags, but not as edit (because I do not foresee anyone, including myself, editing the Copyright in a per node basis--that's the case for most of my websites!)
2. Go to Global Tags and enter a Copyright [but does not work right, I have to mark it Editable first, then "hide" it again]
3. Go to a node and click on Meta Tags, cannot see the Copyright, great! I don't want to change it for each page, only one copyright for the whole site!
I guess your concept was to use the permissions. Unfortunately, for the Admin, the permissions are such that I see either everything or only what I checked as editable. In any event, if I check a flag in Tags to output in HTML head it should appear in the default setup (unless it is nonsensical as you mentioned for the URL, etc.) otherwise, how do I ever define the default for those values?
What do you think?
Thank you.
Alexis Wilke
Comment #7
AlexisWilke CreditAttribution: AlexisWilke commentedAnother thing I noticed (and that may be another bug, but it is in the same area.)
If I leave, say, Robots selected under Tags to show on edit form, whether it is also checked under Tags to output in HTML head does not matter! It will appear in your forms. I would suggest to hide entries that are not marked for HTML output since it is pointless to define them...
Thank you.
Alexis Wilke
Comment #8
apadernoThat is also true for other rules, who see only what has been checked as editable, even if they have the permission to edit the meta tag. The first user is always a special case for Drupal; there are no wonders the first user has the permission to do everything.
The permissions have been added because in some cases there could be the need to allow only specific roles to edit particular meta tags; you could have, in example, a role to edit the PICS meta tag, which should not edit by any authenticated user (probably because you don't want they use a value for the PICS meta tag that doesn't match the content of the node).
I removed the "Tags to show on edit form" fieldset, but then I put it back. The reason is that you could allow the users to set a meta tag, but you want to temporary remove it from the HTML (maybe because the meta tag is causing some problems with the search engines).
Comment #9
AlexisWilke CreditAttribution: AlexisWilke commentedOkay, since I can make it work the way I want, that's fine. I'd prefer to have two layers, but it is not required.
Now I have one PICS for my entire site and want to put it in my Globals but that field does not appear in the Globals settings... Since I'm the only one writing on my site (and controlling all the comments) I know the content is always the same and thus I don't need to change or generate a new PICS for each page... but since it does not appear in the Globals, I cannot set it once for the entire site...
It looks like the hook_nodewords_list_alter() is not implemented for the extra meta tags. Is that correct?
Thank you.
Alexis Wilke
Comment #10
apadernoI changed the code, and the PICS meta tag appears in the default values settings page (see commit #241266).
The hook used to alter the list of meta tags is
hook_nodewords_tags_list_alter()
.With the latest development snapshot is not even necessary to create a module, if you want to add new meta tags; it's enough you create a file in "extra_metatags/tags" that contains a function which returns an array describing the supported meta tags. The returned array can override the array of the already defined meta tags, and it's then possible to alter the meta tags the other modules define (that is the reason extra_metatags.module has a weight higher than the other modules included with Meta tags).
To understand better how to write a file to define new meta tags, see the content of the files whose name ends in ".metatags.inc".
If you have other questions, please open a new report. We have been a little off topic, in this thread.