Extension talk:Advanced Meta/Archive 1

Any users who are using this extension? How do you rate it? Five Stars!

Incompatible with Manual:importImages.php
This module is incompatible with Manual:importImages.php. The error I get is

Auto Write Meta
my article has categories: dvd, category: music. i'd like words "dvd, music" to be automatically placed inside the keywords input field. and description could look like this: static text + categories (static text="comments about") so description would look like this: comments about dvd, music.

no effect
can change a title --PiFi 11:37, 19 June 2010 (UTC)

Hi, I am very happy to see this hook, ..
Hi, I am very happy to see this hook, but I would need some help. Unfortunatelly I am not very profecient with running server or html/php in general. I ma very sorry if I ask some stupid questions, I will learn as much as it can be.

So I tried to follow the instructions as they are on the pages, I created file named MWAdvancedMeta.php and had put there, the code as it is on the extension page.

I added the following 2 lines to the bottom of localSettings.php:



What I got is imediate change of behavior, with this error message:


 * A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was:
 * from within function  MySQL returned error
 * from within function  MySQL returned error

May I ask if somebody would help me? It may be stupid, I am just happy that I was able to let my mediawiki run, there inside the system, I am proficient enaugh, but with the workarounds I am completelly clueless, if I am let on my own. I tried to upload this hook in effort, to not let pages of my db to be indexed.. Most of the content is a bit confidential. I would appreciate any help very much. --Reo On 16:28, 12 July 2010 (UTC)


 * This extension needs to add a new table into your database. Execute the SQL shown in the Installation part BEFORE CHANGING wm_ TO YOUR OWN PREFIX. --Zayoo 08:17, 2 October 2010 (UTC)

A good extension, but some suggestions
It's a very good extension because these informations can be edited only by specific users or usergroups. Here are some suggestions.

1. $1 for $wgTitle

I suggest that if (!empty($meta['keywords'])) { $out->mKeywords = array_merge(str_replace("$1",$wgTitle,$this->globalKeywords), explode(',', $meta['keywords'])); } else { $out->mKeywords = array_merge(str_replace("$1",$wgTitle,$this->globalKeywords), $out->mKeywords); } so that if I put $1 in global keywords, it can be translated to the page title (with its namespace).

2. index? follow?

I can't see the index or follow tag in Mediawiki 1.16.0.
 * If this meta tag is missing, or if there is no content, or the robot terms are not specified, then the robot terms will be assumed to be "index, follow. mediawiki began to comply with this rule. it doesn't emit robots-meta for "index,follow" and emits one for other cases. At least it seems to be true for mediawiki 1.16.0 --Erithion 17:43, 27 November 2010 (UTC)

3. Change the page title

I suggest that add an item to change the title displayed in the browser and in search-engine results. (only influence )

--Zayoo 18:34, 26 September 2010 (UTC)


 * I suggest the function of Extension:TitleAlias can be combined into this extension, which can change the html title, with a likely database table and a input box in edit page. Both in GPL. --Zayoo 16:10, 27 September 2010 (UTC)

A new version with Title Alias, i18n and some bugs fixed
A new version with Title Alias, i18n and some bugs fixed. Code is available at User:Zayoo/Extension:Advanced Meta.

See the difference at here. Because of the differences between space and tab, it is shown not very clearly.

Differences:


 * 8     New SQL field "titlealias".
 * 24   Move $wgExtensionCredits['parserhook'][] into correct position.
 * 31   Use i18n file $wgExtensionMessagesFiles['Advanced Meta'].
 * 32   Put MWAdvancedMeta::setup; inside the extension, so it's not necessary to put it into LocalSettings.php.
 * 62   Fix a bug: private $allowedUsergroups = array('sysops', 'bureaucrats'); to     private $allowedUsergroups = array('sysop', 'bureaucrat');.
 * 87   New hook $wgHooks['BeforePageDisplay'][] = $this;.
 * 191 Use Mediawiki:Globalkeywords instead of $globalKeywords so that sysops can change it conveniently and support UTF-8 charactors. $globalKeywords has been removed.
 * 195 Allow i18n in $replaceWith[], and added TitleAlias input box. Allow $1 for FULLPAGENAME.
 * 335 Still show the global keywords if no meta record for this article.
 * 368 Function for TitleAlias. Recreate the HTML title with Mediawiki:Pagetitle.
 * 406 If the meta information is normal (index, follow, no titlealias, no keywords, no description), DELETE the record instead of INSERT or UPDATE to save space in database.

Tested only for Mediawiki 1.16.0. Please help me test it.

--Zayoo 09:53, 2 October 2010 (UTC)
 * This version is now implemented! Litso 16:00, 25 November 2010 (UTC)

Index/Follow doesn't work as expected in 1.16.0
Action: Expected: html head must contain ...  ... Actual: robots-meta is absent and thus this means the default, i.e. ...  ... Solution: // set robots information $index = ($meta['rindex'] == '1')  ? 'index' : 'noindex'; $follow = ($meta['rfollow'] == '1') ? 'follow' : 'nofollow'; $out->setRobotPolicy($index.', '.$follow); global $wgArticleRobotPolicies; $wgArticleRobotPolicies[$wgTitle->getText] = $index.', '.$follow; Why: Mediawiki sets default robot policy up after parser output was done. This overrides custom policy modifications. Previous versions did this just before. At least it seems to be true for 1.15.4. Details see in Article::view of Article.php
 * Create page
 * Text field: test
 * Robots: Index: checked; Follow: unchecked;
 * Keywords: test
 * Descriptio: test
 * In MWAdvancedMeta.php find onOutputPageBeforeHTML function
 * Find following rows
 * Add these rows just after them

PS: '''Thanks very much for this extension to all its authors. I find it to be the most useful meta tag extension I tried so far. Yet simple due to excellent architecture design decisions.''' --Erithion 18:30, 27 November 2010 (UTC)


 * When I worked on the 2.0 version, I also haven't found index/follow. I NEVER see them even I edited the official files where RobotPolicies happens, as well as it is officially said that some pages are indexed and some not. Only noindex/nofollow are shown in special pages. I don't know why and I just kept it unchanged.-- Zayoo (talk) 08:17, 29 November 2010 (UTC)


 * Hey, thanks for the fix. I modified it a little (the actual wgArticleRobotPolicies uses getPrefixedText ) and I updated the plugin. Good detective work! 87.213.24.66 12:59, 2 March 2011 (UTC)

Request for 2.1.0
I've done several changes to this extension and it is accepted as 2.0.0. Here I want to make a minor upgrade 2.1.0, and request for your voice.

My propose:

1. Restore $globalkeywords and let it work together with Mediawiki:Globalkeywords.
 * I changed $globalkeywords to Mediawiki:Globalkeywords so that UTF-8 charactors can be written. However, it changes the rule and does no help to ANSI users.
 * I suggest that $globalkeywords works prior to Mediawiki:Globalkeywords. If $globalkeywords is not null, use it; otherwise, use Mediawiki:Globalkeywords. It runs quicker for ANSI users. If no global keywords are needed, sysop can set $globalkeywords=',' and system will not request for Mediawiki:Globalkeywords.

2. Remove $mwaMeta.
 * $mwaMeta = MWAdvancedMeta::setup; is unnecessary. Use global variables to avoid it.

3. Robot Policies.
 * It seems that follow/index doesn't work.

Please discuss and write your own issues. -- Zayoo (talk) 08:45, 29 November 2010 (UTC)
 * Regarding to the last issue, I think that MediaWiki doesn't output index/follow because no robots meta tag is exactly the same as index/follow. So yeah, I think we can safely delete it. I agree with the other two ideas too.
 * Another idea I had, I don't believe meta tags move with a page if you rename it. I've seen important pages on my wiki have no tags and description because the article got renamed.. we should definitely add something for that. Litso 09:13, 29 November 2010 (UTC)


 * Hi to all, I have two wishes/proposals for the next version. Hopefully they are somehow easy to implement.
 * * One is regarding the title tag. If you do not set an alternative title your get the name of your wiki, e. g. "Foo" into the title tag, in case you set the alternative Title e. g. "Foo-Wiki - the greatest wiki on the face of the planet" you get "Foo-Wiki - the greatest wiki on the face of the planet - Foo". It would be nice if this extension overrides the standard title an replace it with the alternative title instead of just adding it in front.
 * * Secondly it would be nice to have some action logging for setting and changing the inputs with this extension. It should not be in the normal version history, but a log would be cool.
 * I do not want to forget to say that this extension is already very useful and wish to thank everybody putting effort into its creation. Cheers --kgh 10:06, 29 November 2010 (UTC)


 * Robots... I have no idea. This extension links to page with 'pageid', not its title; I don't know why it doesn't work with title changing; and I don't have time to try it currently, please help check it.
 * The title? It works nice in my own wiki and it only changes the HTML title. In its function, I rebuild the title from Mediawiki:Pagetitle by replacing $1 with $meta['titlealias']. It can be considered to OVERRIDE or REBUILD. Logging... Where to put them? Creating a new table in database, or using an existing table? I have no idea now, but idea will come soon. And

4. It is supposed to open a new window for Mediawiki:Globalkeywords when clicking on the global keywords, but I failed - I just made a tool tip. I'll move on for a better solution.
 * -- Zayoo (talk) 16:14, 30 November 2010 (UTC)

Error
I think I followed all the steps to install the extension but I'm getting this error:

MediaWiki internal error. Exception caught inside exception handler

Is anybody using this extension with MediaWiki 1.6? --Hoiol 03:47, 23 December 2010 (UTC)


 * Hi Hoiol, this extension requires PHP 5. Thus it will not work with MediaWiki 1.6. I strongly advise to update your software to PHP 5 and MediaWiki 1.16 in case you would like to use this extension. Cheers --&#91;&#91;kgh&#93;&#93; 15:38, 27 December 2010 (UTC)

Hi, I get the same error in MW 1.16 using PHP 5.2. Is there another solution to solve this problem? Thanks+greetings --Filburt 10:07, 10 January 2011 (UTC)

I also get the same error using PHP 5.3.2 and MediaWiki 1.16.1 --Ciovala 23:27, 13 January 2011 (UTC)


 * Strange. I installed this extension with MW 1.16.0 and the upgrade to MW 1.16.1 did not cause any problems at all. Thus I think that it is not a problem with MediaWiki. I am currently using PHP 5.2.13. Perhaps this makes the difference. Sadly, I cannot be of more help with this issue. :( --&#91;&#91;kgh&#93;&#93; 10:35, 14 January 2011 (UTC)
 * I'll try it on my other server which has PHP 5.2.6 and see if it works. Does anyone know some good debugging I could do to help find out why I'm getting the error listed at the top of this section, though? I'd like to help narrow down what is causing it. --Ciovala 19:29, 15 January 2011 (UTC)
 * Did you guys do the database upgrade? If you used 1.3.0 before you will need to modify the database. See the plugin page :) Litso 10:52, 2 March 2011 (UTC)


 * The SQL code creates a table named mw_ext_meta. The code in MWAdvancedMeta.php uses ext_met table. No wonder it doesn't work... The solution is to either change the name in all sql queries in MWADvancedMeta.php or (easier) just execute the SQL code again using ext_met instead of mw_ext_meta. I took the liberty of correcting the sql code (sorry if I wasn't supposed to do that). Advice for MW users: include $wgShowExceptionDetails = true; in your LocalSettings.php to trace exceptions --Dovydasm 20:07, 12 March 2011 (UTC)

Good day! I've install this extension and get an error: "MediaWiki internal error. Exception caught inside exception handler." In particular:
 * Warning: include(/home/p22396/www/wiki.ektip.ru/extensions/AdvancedMeta/MWAdvancedMeta.i18n.php) [function.include]: failed to open stream: No such file or directory in /home/p22396/www/wiki.ektip.ru/includes/LocalisationCache.php on line 405
 * Warning: include [function.include]: Failed opening '/home/p22396/www/wiki.ektip.ru/extensions/AdvancedMeta/MWAdvancedMeta.i18n.php' for inclusion (include_path='/home/p22396/www/wiki.ektip.ru:/home/p22396/www/wiki.ektip.ru/includes:/home/p22396/www/wiki.ektip.ru/languages:.:/usr/local/php52/lib/php') in /home/p22396/www/wiki.ektip.ru/includes/LocalisationCache.php on line 405
 * Warning: include(/home/p22396/www/wiki.ektip.ru/extensions/AdvancedMeta/MWAdvancedMeta.i18n.php) [function.include]: failed to open stream: No such file or directory in /home/p22396/www/wiki.ektip.ru/includes/LocalisationCache.php on line 405
 * Warning: include [function.include]: Failed opening '/home/p22396/www/wiki.ektip.ru/extensions/AdvancedMeta/MWAdvancedMeta.i18n.php' for inclusion (include_path='/home/p22396/www/wiki.ektip.ru:/home/p22396/www/wiki.ektip.ru/includes:/home/p22396/www/wiki.ektip.ru/languages:.:/usr/local/php52/lib/php') in /home/p22396/www/wiki.ektip.ru/includes/LocalisationCache.php on line 405"

SQL Table ext_meta has been created. Please advice what's the problem. Ektip 19:03, 17 December 2011 (UTC)
 * MediaWiki	1.16.4
 * PHP	5.2.17 (litespeed)
 * MySQL	5.0.92-50-log

Bug Reports in Bugzilla
There has bee a component added to bugzilla for Extension Advanced Meta. Authors, please consider having yourselves added there as possible receivers of bug reports and/or ones who can deal with reports by fixing them.

Please, also consider these bug reports: Thank you. --Purodha Blissenbach 17:15, 18 July 2011 (UTC)
 * bug 29948 - 	Extension AdvancedMeta should create needed data base table automatically,
 * bug 29949 - 	Extension AdvancedMeta should not try to look metadata up for special pages.

Please fix display of "" and "" in display
Gotta fix this: Line 23 of AdvancedMeta.php reads "$wgExtensionMessagesFiles['MWAdvancedMeta'] = dirname( __FILE__ ) . '/wgAdvancedMeta.i18n.php';" it should read "$wgExtensionMessagesFiles['MWAdvancedMeta'] = dirname( __FILE__ ) . '/AdvancedMeta.i18n.php';"

The symptom of this bug is that on the editing page, instead of Title Alias, it says , next to keywords it says  and so on. Please fix!


 * Still a problem in svn r115095 (2012-04-30). The above fix works for me in 1.19.0. Djbclark (talk) 15:57, 7 May 2012 (UTC)


 * In my Wiki (MW 1.19.2) I see still the wrong error, but your fix is wrong because the row 23 reads (at the end) '/MWAdvancedMeta.i18n.php';" and not '/wgAdvancedMeta.i18n.php';". However, after the fix also me see correctly the titles. --WhiteTigerItaly (talk) 06:46, 2 October 2012 (UTC)

Request for ability to add into templates
hello, there this is a must have extension for SEO. Thanks a lot. I have a request that may be of importance for many people. So far advanced meta allows modification of html title manually at the bottom of each page. Is there a way that in addition to that we can also have a keyword ...... or of some sort of your liking that can be used within pages to automate this by adding it into a template. I think the old titlealias used to do this, but this is the future of titlealias and it'd be great to have that old functionality added into Advanced Meta.

Thank you. Wikimanz talk page

chg to beta
Hi, every time I run some automated script on the wiki the meta information gets deleted. I think that even update.php causes this. Cheers --&#91;&#91;kgh&#93;&#93; 23:10, 9 November 2011 (UTC)

Request for Mediawiki:Globaldescription
Google has openly said that they ignore the meta keywords tag for page rank, but that they do look at the meta description tag.

Currently, there is a way to set a Global keyword tag by editing Mediawiki:Globalkeywords, but there (afaik) is no way to edit a global applicable (and more important) meta description tag. I request the functionality to edit a page "Mediawiki:Globaldescription" to do this.

Internal Error?
After install I get this error message. I want this extension bad...Any idea how to fix? MediaWiki 1.18.0 with Semantic Bundle PHP 5.2.17 (cgi-fcgi)MySQL 5.0.91-log Thanks Dave88008 18:07, 28 December 2011 (UTC)

Re:Internal Error?
I get a similar message when I installed this extension. Have you figured out how to fix it? I am using Mediawiki 1.18.
 * nope, and no guidance here :(   Dave88008

MediaWiki messages
What text should "MediaWiki:Ameta-metasettings", "MediaWiki:Ameta-titlealias", and "MediaWiki:Ameta-keywordsadd" display? These messages weren't on the wiki when my colleague installed the extension. Can someone please update File:AdvancedMeta-screenshot.png as well. --Michaeldsuarez 15:09, 29 December 2011 (UTC)

Just downloaded/installed and realized same problem with message files. the problem is in AsvancedMeta.php line: $wgExtensionMessagesFiles['MWAdvancedMeta'] = dirname( __FILE__ ). '/MWAdvancedMeta.i18n.php'; need to be: $wgExtensionMessagesFiles['AdvancedMeta'] = dirname( __FILE__ ). '/AdvancedMeta.i18n.php';

Product	Version

 * MediaWiki	1.16.5
 * PHP	5.1.6 (apache2handler)
 * MySQL	5.0.77-log

''My wicki has plenlty of other hacks that I have added that might be interfering with Advanced meta but I think this problem is directly related to this module. I apologise if not.''

Problem: If I include a single quote char in title, it truncates any text after and including the quote, so quotes (and others?) probably need to be escaped to prevent this behaviour. Pretty sure this behaviour is repeated with keywords and description too.

Eg:

Meta Title entered: "What is the parson's nose"

Meta title shown in title edit box on the next edit: "What is the parson"

--CookipediaChef 15:46, 13 February 2012 (UTC)

bug
the "AdvancedMeta.i18n.php" file not work and text in "mediawiki:Globalkeywords‏" show in one button and not work. i see this:"Keywords: text1, text2,". i have mediawiki 1.18.1Hamed.n (talk) 18:26, 5 March 2012 (UTC)

upgrade to MediaWiki 1.19.0 fails
I just upgraded to MediaWiki 1.19.0, but initially had problems with the upgrade. Running update.php from the command line fails silently. Running /mw-config/index.php in a browser gives the following error. I have substituted my actual webroot with (webroot) below. An error occured: Detected bug in an extension! Hook efAdvancedMetaSchemaUpdates failed to return a value; should return true to continue hook processing or false to abort. Backtrace:
 * 1) 0 (webroot)/w/includes/GlobalFunctions.php(3847): Hooks::run('LoadExtensionSc...', Array)
 * 2) 1 (webroot)/w/includes/installer/DatabaseUpdater.php(69): wfRunHooks('LoadExtensionSc...', Array)
 * 3) 2 (webroot)/w/includes/installer/DatabaseUpdater.php(120): DatabaseUpdater->__construct(Object(DatabaseMysql), false, NULL)
 * 4) 3 (webroot)/w/includes/installer/DatabaseInstaller.php(256): DatabaseUpdater::newForDB(Object(DatabaseMysql))
 * 5) 4 (webroot)/w/includes/installer/WebInstallerPage.php(525): DatabaseInstaller->doUpgrade
 * 6) 5 (webroot)/w/includes/installer/WebInstaller.php(254): WebInstaller_Upgrade->execute
 * 7) 6 (webroot)/w/mw-config/index.php(50): WebInstaller->execute(Array)
 * 8) 7 (webroot)/w/mw-config/index.php(18): wfInstallerMain
 * 9) 8 {main}

Upgrade runs successfully after commenting out the require_once( "$IP/extensions/AdvancedMeta/AdvancedMeta.php" ); From LocalSettings.php. After upgrade, re-enabling the extension seems to work fine.

-- Rwh86 (talk) 16:52, 2 May 2012 (UTC)

Internal Error
After installation on MW 1.16.4 I got this error:

Warning: include(/home/p22396/www/wiki.ektip.ru/extensions/AdvancedMeta/MWAdvancedMeta.i18n.php) [function.include]: failed to open stream: No such file or directory in /home/p22396/www/wiki.ektip.ru/includes/LocalisationCache.php on line 405

Pls advice

Ektip (talk) 04:32, 16 June 2012 (UTC)

Meta Keywords Wrong
Hi,

In the editor I see  and below Keywords: 

I write the category "as400, ibm, power, common, rpg, php", but then in the source I see:



Is there a fix for this?

Thanks in advance

(MW: 1.19.2 - AdvanceMeta:2.0.1)

=
I solved the first problem with the fix in a previous messages while the second problem was related to a my mistake. I'm sorry.