Closed (duplicate)
Project:
Metatag
Version:
8.x-1.x-dev
Component:
Documentation
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2015 at 17:37 UTC
Updated:
5 Dec 2018 at 17:38 UTC
Jump to comment: Most recent
Comments
Comment #2
damienmckennaThose are provided by core, not Metatag. I'll see if I can work out a way of doing that.
Comment #3
koddr commentedDamienMcKenna, what hook do this? May be I can write alter function for that? For example,
hook_page_attachments_alter()?Comment #4
damienmckennaGive it a try, and also try hook_preprocess_html() too.
Comment #5
flocondetoileRelated issue #2406533 edit-form, delete-form etc.
tags added on /node/{node} are invalid according to W3C Validator about these metatags added by core
Until this issue land, you can remove these metatags for Node using hook_entity_view_alter() and for Taxonomy Term using hook_page_attachments_alter(). For term your module's implementation must be after the taxonomy implementation
Comment #6
Anonymous (not verified) commentedComment #7
Anonymous (not verified) commentedActually..
Comment #8
damienmckenna.. and that seemed to be a duplicate of #2406533: edit-form, delete-form etc. <link> tags added on /node/{node} are invalid according to W3C Validator.
Comment #9
sachbearbeiter commented#2406533: edit-form, delete-form etc. <link> tags added on /node/{node} are invalid according to W3C Validator
Comment #10
sachbearbeiter commentedA lot of bots are filling my log, calling this links ...
The previous example is not working for me ... maybe wrongly placed in the theme file by me ...
Can someone help or has an alternative script?
Thanks and regards
SB
Comment #11
koddr commentedWorking solution: module Unset HTML head link and small article with instructions (RU).
Comment #12
fomenkoandrey commentedActually
Comment #13
Anonymous (not verified) commentedHello Vikky,
thank you very much for this module!
Your current version removed most of these
tags.
But not all.
were still present.
So I changed in unset_html_head_link.module file the $unset_html_head_link array to:
Comment #14
Jean Lavialle commentedThis code work fine for me
Comment #15
kingjimza commentedHi All,
My Content types pages (that are stock Drupal/bootstrap) and Taxonomy pages work fine and by that I mean the following is removed by this awesome Module;
My problems is that when I use Panels i.e."Panelize this view mode", the above meta's reappear.
Any ideas on what I would need to adjust or add on the "unset_html_head_link.module" file for this module to work happily with Panels?
Thanks
James
Comment #16
darkstartom commentedI've tried #14 and it works fine on a content page. However I need to use it on profile page created with the profile module, trying it here doesn't removed the links. Is there a way to do this for profiles? Thanks!
Comment #17
AndersNielsen commentedAs said in #15, this does not seem to work for panel pages or panelized nodes. It seems like panels is adding the tags after the hook_page_attachments_alter() has been run somehow. But maybe this should go into a panels issue instead if it's something general for that module?
Comment #18
dpagini commentedFYI - just added this guy b/c I couldn't find anything else like this... https://www.drupal.org/project/panelizer/issues/2951038
Comment #19
Diane Bryan commented@Jean Lavialle, I would love to implement your code, since my site isn't using panels or panelizer and I would like to be able to validate the site. But I don't know where the code goes. Any chance you can append some instructions for newbs? TAI!!!
Comment #20
gngn commented@Diane Bryan :
you need to create a custom module - see Creating custom modules - and put the code in the .module file.
You need to replace
my_modulewith the name of your module.Enabled your module and that's it.