Hi,
where is option to change Front Page Meta Tags and Decription ?
I can change meta in every content of my site, but i dont know whow to add meta in the first page..
Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

SteX’s picture

Anyone?

dolilmao’s picture

The admin page is not available just yet...

Dave Reid’s picture

Status: Active » Fixed

Admin UIs are now available in unstable 3.

khan2ims’s picture

I am not sure how to use this module. And how to set front page meta tags. There is no readme file in latest version.

Can you please write a quick writeup?

Dave Reid’s picture

1. If you had a previous version of the module installed, disable, uninstall it, remove the old module directory, copy in the new unstable3 release and enable both the Meta tag and Meta tag UI modules.
2. Go to admin/config/search/metatags/config/global:frontpage/edit
3. Edit front page tags with the desired text and available tokens and press 'Save'.
4. Done!

khan2ims’s picture

Hi,

Yes, I tried that. But the meta tags don't show on the home page.

minus’s picture

same goes for me, fresh install, using 7.x-1.0-unstable3 (Meta tag API, UI and Open Graph meta tags )

added configuration to front-page and content type

meta data shown:

 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Generator" content="Drupal 7 (http://drupal.org)" />

maybe I have forgotten something?

Dave Reid’s picture

Status: Fixed » Postponed (maintainer needs more info)

Please screenshot your metatag config for frontpage and also confirm what is the actual front page path on admin/config/system/site-information.

minus’s picture

FileSize
70.42 KB

Thank you for such a quick respons!

I use page--front.tpl.php

On admin/config/system/site-information/ "Default front page" is blank

joydivfac10’s picture

Thanks for the update, Dave.
Previously I had updated, but was not seeing metatags on my frontpage or blog container pages.
(Individual nodes were showing up fine.)
I went back and uninstalled previous module, then deleted existing metatags directory on server.
After reinstalling, I configured some automated metatags in the config UI.
Our new blog (www.shottotheheart.com) now has metatags on every page, blog, node, etc.
Keep up the great work, and thank you for all your time and effort.
Cheers!

Dave Reid’s picture

@minus: Try setting your default front page to 'node'? If that field is blank, then that would mean the drupal_is_front_page() function fails which would prevent the front page meta tags from being displayed.

SteX’s picture

Thanks..

mgifford’s picture

This seems to work for me:
admin/config/search/metatags/config/global:frontpage/edit

But how would I know to go here (other than by reading through this post)?

Also, is there somewhere that I can find what precedes what? Does the
admin/config/search/metatags/config/global

override or supplement the front or individual node pages?

Yuri’s picture

Installed the latest dev version, and the front page title tag is not showing up at all. Front page settings show title: [site:name]
Also, i cant see where set page title for a views page. Hm..not ready for production, that's for sure, but does look very promising.
Oh, by the way: I don't use 'node' as front page, but a custom page 'home'

agoradesign’s picture

Hi,
I have a similar (the same?) problem: I don't use the generic /node front page as front page. Instead the front page is targeting a specific node (node/2 -> /home). I do have meta tags on my front page, but incorrect ones.

I've set [site:url] for OG url and canonical url for the front page and [current-page:url] for the node pages. The behaviour I expected, is, that the front page settings have precedence over the node settings, but as it seems, it is exactly the other way round. The node settings seem to override the front page settings.

As a consequence I now get "www.mydomain.com/home" as value for the two meta tags instead of "www.mydomain.com", which is a big problem because the Facebook linter detects a circular redirection (-> calls '/home', gets redirected to '/',...)

Dave mentioned the drupal_is_front_page() function. I debugged into the "if (drupal_is_front_page()) {" in line 663 of metatag.module and had a look into the results of the metatag_metatags_view('global:frontpage', array()) call. At this point everything's ok. The value of the url is correctly set to the site url. So it must be overwritten anywhere at a later stage by the node settings.

Is this the intented behaviour or is it a bug? If it's intented, it would be really, really nice having the possibility to change the priorities.

Thanks, Andi

Update

I solved my problem with a little hack by adding the following code after line 337 (-> $instance = "{$entity_type}:{$bundle}"; )

if (drupal_is_front_page()) {
  $instance = 'global:frontpage';
}

In other words, I force to override the instance type to "global:frontpage"

Danny Englander’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.0-unstable1
FileSize
92.18 KB

I am also having a similar problem with 7.x-1.0-alpha4 from December 22. I see the page title but no keywords or description within my home page. (Screen capture attached). Metatags work fine within nodes though.

Here is what I have tried so far:

  • Try setting your default front page to 'node'

    -- this did not work, I save the Site information page and "node" is not saved in that field.

  • I tried the code in #15 but that did not work either. -
    if (drupal_is_front_page()) {
      $instance = 'global:frontpage';
    } 
  • I am not using page--front.tpl.php
agoradesign’s picture

Hi, I don't want to disappoint you, but I don't believe that search engines will incorporate your jQuery-inserted meta tags.

claes nilsson’s picture

I have the same issue as #16 and am using bartik template.

skruf’s picture

Here is a patch for #15

essenceofginger’s picture

Just to add some weight to this issue. We can't change meta tags on homepage either, using page--front.tpl.php.

a_drupalist’s picture

#11 did it for me!
I am using D7 and page--front.tpl.php and had to do a two step process:

  1. add the word 'node' to configuration/site information/Default Front Page
  2. set the meta tags for 'node' in configuration/search/meta tags quick/path based meta tags

As Dave said above in #11, cheers dave!

Funny thing is that when I go to configuration/site information now the word 'node' doesnt appear in the Default Front Page but the meta tags show up!

anyway, thanx again

remkovdz’s picture

Version: 7.x-1.0-unstable1 » 7.x-1.x-dev

Same problem: no Meta Description showing up here at the front page... Will this be fixed soon?

TCPIP6’s picture

It worked before but after the update no Meta Description. hmph!
I'd really appreciate a fix for my site… It’s sliding down the rankings!
http://highperformance.net.au

remkovdz’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha5

I would like this module to replace my other (several) modules for Meta Description, Open Graph tags etc.

However, when I seen the amount of issues concerning basic stuff, I'm not so sure..

agoradesign’s picture

@TCPIP6:
if you use alpha5, you're for sure also concerned by this very small bug here: http://drupal.org/node/1506676

@remkovdz:
it's not that bad. I'd give it a try in your next project or a test env. You don't lose much time if you decide to exchange it, if it doesn't suit you. Despite of these small and easy-to-fix issues, it really works good. Only disadvantage is the lacking Views support so far. But there's already a sandbox project to support Views also...

remkovdz’s picture

@agoradesign, I might.. Does anyone have any update on the front page bug?

FrancescoUK’s picture

Same issue here, no meta in the front page and I cannot neither set node as home page.

However if I try Page Title I can set the correct page title for the front page.

FrancescoUK’s picture

Category: bug » support

As I have page--front.tpl.php, I've added render($page['content']) as first line and I now can see the meta tags rendered.

However the page title is still not right, but I manually added a suffix in html.tpl.php. Not ideal but that will do, unless I use Page Title.
That was due to the fact that override parent groups are not used by child, so I needed to override the child too.

Remember to do Clear All Cache in Home » Administration » Configuration » Development, otherwise you might not see anything.

Danny Englander’s picture

Version: 7.x-1.0-unstable1 » 7.x-1.0-alpha5

I tried the patch in #19 against the latest alpha (metatag 7.x-1.0-alpha5) and it did not work. Note that I had previously tried some JQuery but as @agoradesign pointed out the search engine does not pick that up. However, this does work in html.tpl.php in my theme folder:

<!-- this goes in the <head> area -->
<?php if (drupal_is_front_page()) { ?>
<meta name='description" content="My meta description here...' />
<?php } ?>

... but it seems pretty hackish and I also have a multilingual site but at this point it would be nice to at least get something working. I am not sure if this is a good temporary solution. Also of note, I cannot see the rendered metatag description with Chrome web inspector, only if I view source whereas I can see interior page metatag descriptions with simply using web inspector.

Shaltay’s picture

Category: support » bug

Same problem here.
Any suggestion here is useles for me.

beauz’s picture

Category: support » bug

Same problem. Description not showing. Using alpha5 / Omega theme.

Danny Englander’s picture

I am wondering if the status of this issue should be changed? I think there's enough info now to change it to "needs work" perhaps?

remkovdz’s picture

I agree, still can't move forward with this one.

Which made me think: what if I need to uninstall this module later, to install the new version: would I lose all my data like Meta Descriptions?

markosaurus’s picture

I've already tried this and this works fine for the forntpage when you are logged in. I then get to see the content I would expect for the meta data which is great.

When I log out and become an anonymouse user again, it vanishes.

I did some digging and found that because I had a views content block on the frontpage, I neededd to enable the standard "content" block for the front page in order for this to render. Probably specific to my setup as I have a complicated views setup running which precludes me from showing ths tandrd "content" block everywhere, but thought I'd share in case anyone else ran into this.

j_ten_man’s picture

Same issue here. Nothing new to add other than 19 doesn't fix the issue for me and I debugged several levels. Things are there in the page array to render but I can't seem to find anything that was causing the description to not show up.

remkovdz’s picture

Are there any good alternatives to this module? It's taking to long to even get any feedback so I have to move on...

chris_h’s picture

Confirming #28 and #34 - the homepage meta tags don't appear if render($page['content']) is not in the homepage .tpl or if the main content block is set to not be visible. As not rendering the main content block is quite a common use case for the home page, is there a simple workaround to force meta tags to display?

j_ten_man’s picture

Thanks to #37 I realized that I didn't have it in the front page either. Fixed it for me as well.

markosaurus’s picture

@chris_h yeah, I forced mine through my template php file by checking if it was the homepage or not and assigning it manually. It was a hacky fix, but since it's done through template.php per theme and not the core, at least it will persist when you enxt update :)

lordbucanero’s picture

#28 worked for me

Thanks

red_eye’s picture

Hate to add a me too with no other info but I am up to date on everything and cannot get meta to show on front page, the node trick in #11 doesnt work for me.

Any other thoughts or suggestions?

bzsim’s picture

Was having the same problem as well with page--front.tpl.php. Once I added the code from #28, the meta description tag showed up!

Setting the default home page to 'node' as suggested above, did not work for me. It didn't even stick in the settings.

I also noticed that leaving the default node: summary for the Nodes was not working. I had to override and type in my own description for the meta description tag to show up.

red_eye’s picture

Tried the steps in #28 got content to show on my page at the very top but still no valid keyword or description meta tags.

chichio9000’s picture

I success with #39

Thanks markosaurus

middlenewman’s picture

#28 worked for me also.

DamienMcKenna’s picture

Version: 7.x-1.0-alpha5 » 7.x-1.x-dev

Rather than hacking away trying to get this working, and ultimately building work-arounds for an existing work-around in Metatag, the output logic has been re-written thanks to jenlampton and I'm hoping it works better now. Please try the latest -dev release and please let me know if it works as-is, and re-open the issue if it's still not working.

That said, please be aware that right now it doesn't let you override tags for taxonomy term pages due to a core bug, please keep an eye on #1700160: Support taxonomy term pages until taxonomy supports hook_entity_view() for further updates.

DamienMcKenna’s picture

Related and honestly a higher priority: #1708718: Ensure Meta tags work OOTB with Drupal core

I'm going to fix that and then see how to resolve this issue.

mooey’s picture

I've updated to the dev version but I still can't get it to put metatags on my front page.

DamienMcKenna’s picture

@mooey: Please describe how your homepage is built - default 'node' page, custom node, custom Panels page, something else, etc.

mooey’s picture

Hi

The front page is built using Views blocks set to show only on <front>. I have a custom page.tpl.php with this:

 if (!$is_front) { 
                print render($page['content']);
} 

I've tried changing this to

 if (!$is_front) {
            print render($page['content']);
        } else {
            render($page['content']);
} 

but this does nothing. I've tried setting the Default front page value to node, but it doesn't take (the field gets reverted to blank).

Mooey

mooey’s picture

I've got it! I've created another node (hompage), set the meta tags there, and then set that as the Default front page value. I tried this before changing to dev, and it didn't work, but it does now, as long as I also have render($page['content']) in my page.tpl.php.

mlusher’s picture

Priority: Normal » Critical

Same issue. Not showing on front page. I have set a front page node and using a page--front.tpl.php.

Seems this should have been fixed long ago.

Any work arounds?

nyleve101’s picture

I'm also experiencing this issue, any suggested workarounds?

couturier’s picture

Version: 7.x-1.x-dev » 7.x-1.0-alpha8

@nyleve101 I am assuming you are using the most current 7.x-1.0-alpha8 release? All the comments preceding yours were for a much earlier version. Have you double-checked to make sure your Metatag module settings are correct for the front page, and have you cleared all the caches for both your site and your browser?

Also note this issue describing how many people have a front page that isn't a node, complicating Metatag support: http://drupal.org/node/1146018#comment-4446604

There is a discussion to use Context to help assign metatags to specific URLs here: http://drupal.org/node/1151926

Slown’s picture

#28 worked for me also. THX!

extrememanoj’s picture

@FrancescoUK Thanx a lot... ur solution #28 helped me to get front page title tag. I was getting default title for home page also. I'm using a node- page template for home page. Now its fine.. Thanx again :)

DamienMcKenna’s picture

Status: Postponed (maintainer needs more info) » Fixed

This should have been resolved by #1784896: Overriding meta tags fall back to parent default tag value. If you are still having the problem then it is a theming issue, please get involved with / follow #1800658: Front page settings don't work on some themes (e.g. TopHit).

DamienMcKenna’s picture

Status: Fixed » Closed (fixed)
mustafa.ata’s picture

markosaurus’s picture

You're welcome!

quirogapj’s picture

#28 wokrs great! I am using Chique theme and had to add that piece of code in sites/all/themes/chique/page.tpl.php

Thanks,

Pablo.

berenddeboer’s picture

For those using Omega (and not DS) and nothing working, here's my fix: in your templates/preprocess-html.inc.tpl put this:

  $is_front = $vars['is_front'];
  if ($is_front)
    $vars['metatag'] = render (metatag_metatags_view('global:frontpage', array()));

You don't need to do anything with $metatag in your html.tpl.php, the process of rendering it here sets the meta tags already.

omzo’s picture

Issue summary: View changes
FileSize
153.34 KB

I had the same problem but I resolved it by editing this following file: sites/all/themes/mytheme_name/template/page-front.tpl.php
And I added :<? print render($page['content']); ?>
All is going right now.

javedakhter’s picture

Use the Meta Description & Meta Keywords for Front/Home Page if it doesn't come from Drupal NODE section:
For Drupal Version 7.52
Open file "page.tpl.php" and use this code in head section.

if (drupal_is_front_page()) {


}

It is tested and perfectly works at our end.

DamienMcKenna’s picture

Assigned: SteX » Unassigned