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.
This Module don`t remove Generator META tag. Using Drupal 7.12.
To fix this problem, replace $head_elements['system_metatag_generator']
with $head_elements['metatag_generator']
in function remove_generator_html_head_alter()
Complete function after replacing:
function remove_generator_html_head_alter(&$head_elements) {
// Remove Generator META tag.
if (isset($head_elements['metatag_generator'])) {
unset($head_elements['metatag_generator']);
}
}
Comment | File | Size | Author |
---|---|---|---|
#4 | dsm.png | 59.82 KB | seandunaway |
Comments
Comment #1
seandunaway CreditAttribution: seandunaway commentedThe tests are still passing for me locally and also on the testbots (http://qa.drupal.org/pifr/test/193234).
I just upgraded to 7.12 and still it's removing the tag... Please advise?
Comment #2
seandunaway CreditAttribution: seandunaway commentedPlease reopen if you continue to have issues with this or my assessment is not correct! Thank you for taking the time dimasikov!
Comment #3
dstorozhukHere is
print_r()
of my$head_elements
in module implementation ofhook_html_head_alter()
My site http://kranio.pp.ua.
Comment #4
seandunaway CreditAttribution: seandunaway commentedThis is mine for the latest versions of d7 and Remove Generator META tag.
I can't figure out why yours is different than mine.
Comment #5
seandunaway CreditAttribution: seandunaway commentedI see - It's because you have the Metatag module installed. For some reason it remove the default generator tag and renames it.
Comment #6
seandunaway CreditAttribution: seandunaway commentedIf you have the Metatag module enabled then you can disable the Generator in the advanced options at:
Comment #7
dstorozhukYes, thanks, am realy have instaled Metatag module. Problem fixed.
Comment #8
klonos...so that people don't get puzzled by this "bug".
Also, if people install Metatag long after they install this module, the fact that the Generator tag is back may go unnoticed for quite a long time (that's what personally happened to me).
PS: sorry, for hijacking this issue but I didn't want to risk having a new one closed as duplicate of this. Let me know if you feel I should file a separate one.
Comment #9
seandunaway CreditAttribution: seandunaway commentedI dont think its super critical because when people install Metatags and go through the options the Generator settings are there and easily configurable. It's not like Metatags breaks this module, it just adds its own generator.
Comment #10
ashawley CreditAttribution: ashawley commentedPerhaps change this module's homepage to mention that this module is deprecated by the Metatag module in Drupal 7.