hi

i see thats my google meta tag is not between the head so google cant found it

thanks

Comments

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Can you please copy/paste the output you're getting? Or link to the website so I can see?

eule’s picture

hi dave i try the new 7.x-1.0-rc2

if i add the meta tag nothing is visible..cache cleaned

<head profile="http://www.w3.org/1999/xhtml/vocab">
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="example.com/sites/default/files/pictures/favicon.ico" type="image/vnd.microsoft.icon" />
<meta name="Generator" content="Drupal 7 (http://drupal.org)" />
<link rel="alternate" type="application/rss+xml" title="x RSS" href="http://example.com/rss.xml" />
  <title>xxx</title>
  <link type="text/css" rel="stylesheet" href="example.com/sites/default/files/css/css_G07REVPptjJqgVeNM-ZuxLEKynQayeDR53tt0lJsZvU.css" media="all" />
<link type="text/css" rel="stylesheet" href="example.com/sites/default/files/css/css_s-tbAaa61TPyadGqOqG-LJ0G-qSRA5VW-1sPhY6w35I.css" media="print" />
 
<!--[if lte IE 7]>
<link type="text/css" rel="stylesheet" href="example.com/themes/bartik/css/ie.css?l72073" media="all" />
<![endif]-->
 
<!--[if IE 6]>
<link type="text/css" rel="stylesheet" href="example.com/themes/bartik/css/ie6.css?l72073" media="all" />
<![endif]-->
  <script type="text/javascript"> 
<!--//--><![CDATA[//><!--
window.google_analytics_uacct = "UA-xxx";
//--><!]]>
</script>
<script type="text/javascript" src="example.com/sites/default/files/js/js_esKsa5MPLM68sj-ANjO-EfmZtmMrbGHFUM9DWWS6WFw.js"></script>
<script type="text/javascript"> 
<!--//--><![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/","googleanalytics":{"trackOutgoing":1,"trackMailto":1,"trackDownload":1,"trackDownloadExtensions":"7z|aac|arc|arj|asf|asx|avi|bin|csv|doc|exe|flv|gif|gz|gzip|hqx|jar|jpe?g|js|mp(2|3|4|e?g)|mov(ie)?|msi|msp|pdf|phps|png|ppt|qtm?|ra(m|r)?|sea|sit|tar|tgz|torrent|txt|wav|wma|wmv|wpd|xls|xml|z|zip"}});
//--><!]]>
</script>
</head>

the other think is i try to delete the meta tag under "Operations"
this calls this error

Recoverable fatal error: Argument 2 passed to db_query() must be an array, string given, called in x/sites/all/modules/site_verify/site_verify.admin.inc on line 248 and defined in db_query() (line 2166 of x/includes/database/database.inc).

i upped the meta file and it works

David_Rothstein’s picture

Title: not between the head » Meta tags never get added
Priority: Normal » Critical
Status: Postponed (maintainer needs more info) » Active

Looks to me like meta tags aren't getting added to the page at all, due to this code:

/**
 * Implements hook_init().
 */
function site_verify_init() {
  // Add the verification meta tags to the front page.
  if (drupal_is_front_page()) {
    $meta_tags = db_query("SELECT meta FROM {site_verify} WHERE meta <> ''")->fetchCol();
    foreach ($meta_tags as $meta_tag) {
      drupal_add_html_head($meta_tag);
    }
  }
}

The API for this function is different in Drupal 7: http://api.drupal.org/api/function/drupal_add_html_head/7

dave reid’s picture

Assigned: Unassigned » dave reid

Confirmed and on it.

dave reid’s picture

Status: Active » Fixed

Thanks all for reporting and confirming! This is now fixed in CVS: http://drupal.org/cvs?commit=413190

David_Rothstein’s picture

Status: Fixed » Needs review
StatusFileSize
new1.1 KB

Oops, I should have assigned this to myself then... I was already working on a patch also :( Didn't think you'd respond so quickly, I guess!

In any case, here it is. Hopefully we didn't duplicate any work.

David_Rothstein’s picture

Status: Needs review » Fixed

Ha, almost the same exact patch, oh well :)

Thanks for the incredibly speedy response.

dave reid’s picture

Heh, we're both quick on the draw. Your patch had some improvements to formatting and the query, so I committed those as well and gave you credit. :)

http://drupal.org/cvs?commit=413194

David_Rothstein’s picture

Status: Fixed » Needs review
StatusFileSize
new619 bytes

Cool, thanks. But I just ran CVS up to test it out and I think in the process of merging the two a bug was reintroduced (so now if you have more than one meta tag it doesn't work).

Followup patch attached...

dave reid’s picture

Status: Needs review » Fixed

Sigh, and that's what I get for not testing it the second time...

http://drupal.org/cvs?commit=413196

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.