Extension talk:MetaKeywordsTag

Latest comment: 12 years ago by Darrigan in topic Fatal error: on line 73

This extension is just adding another meta tag for keywords, not replacing the existing one. Does anyone know if this is allowed/supported by search engines?

<meta name="keywords" content="a,b,c,d,e" /> 
<meta name="keywords" content="Test123" /> 
AFAIK, Search engines don't really use meta keywords anymore. But I have no idea whether those that do will acknowledge multiple such tags. --Jimbojw 15:56, 20 March 2007 (UTC)Reply

Multiple Meta Tags

edit

According to this article, there is no problem with multiple meta tags.

http://googlewebmastercentral.blogspot.com/2007/03/using-robots-meta-tag.html

Terrybritton 22:25, 3 April 2007 (UTC)Reply

Replace existing keywords patch

edit

Here is a patch for replacing existing meta keywords tag:

--- MetaKeywordsTag-orig.php	Fri Aug 21 15:04:03 2009
+++ MetaKeywordsTag.php	Fri Aug 21 15:05:33 2009
@@ -118,7 +118,7 @@
     # Merge keyword data into OutputPage as meta tags
     foreach ($data AS $item) {
         $content = @base64_decode($item);
-        if ($content) $out->addMeta( 'keywords', $content );
+		if ($content) $out->mKeywords  = explode(',', $content);
     }
     return true;
 }


How about to add special parameter to tag which will decide what to do with existing keywords?

Possible actions:

  • add duplicate meta keywords tag (default, for compatibility)
  • append new keywords to existing
  • replace existing

--Nettroll 11:13, 21 August 2009 (UTC)Reply

This extension seems to be broken for MW 1.16. Any suggestions on a patch or other fix? -- Prodoom 13:48, 15 December 2010 (UTC)Reply

Where <keywords insert content="ListOfKeywords" /> insert?

edit

Complete download and installation. Where and how now inserts <keywords content="ListOfKeywords" />? Within the text on the main page I've added the line, but now it appears below the text! The source code is not, however! What do I do now?

-- klengelwood 17:15, 14 February 2011 (UTC)Reply

Fatal error: on line 73

edit

The error occurred right after the installation of the extention: "Fatal error: Call to a member function addMessage() on a non-object in [myservername]/wiki/extensions/MetaKeywordsTag.php on line 73"

Help, please!

Info:

  • PHP Version 5.2.17
  • MediaWiki Version 1.18.0

-- Zoid 23:55, 29 December 2011 (UTC)

Try the unofficial version 0.3 I posted at the bottom of the main article. It works with 1.18.0 -Brted 16:20, 15 January 2012 (UTC)Reply


Hi! I've the same problem (MediaWiki 1.19.2). Edit MetaKeywordsTag.php file and comment lines 73 to 76 like this :
 /*  $wgMessageCache->addMessage(
        'metakeywordstag-missing-content', 
        'Error: <keywords> tag must contain a "content" attribute.'
    ); */

It seems to fix the bug... Check code source of a page containing <keywords content="something" /> tag. Darrigan (talk) 10:28, 24 September 2012 (UTC)Reply

Does not work with Lucene

edit

This extension works great with SphinxSearch, but does NOT work with Lucene. I found this out the hard way after upgrading from Sphinx to Lucene. Luckily, there is another way:

Extension_talk:Lucene-search#Meta_tag_Indexing_11130

--Jlemley 15:08, 20 January 2012 (UTC)Reply

Does not work well with templates

edit

This doesn't take care of the values provided by any templates like

Return to "MetaKeywordsTag" page.