Open main menu

Extension talk:ArticleToCategory2

Contents

Error >> Solved version 0.2Edit

I get the error:

Notice:  Undefined variable: wgarticletocategory2Config_blacklist in ..\extensions\ArticleToCategory2\ArticleToCategory2.php on line 132. What to do?

Ploegvde 08:41, 2 September 2010 (UTC)

Hi! I have uploaded a new version that should work better. Note that the name of the parameters changed. Thanks for the Dutch text! I have Google translated some extra text that I would be happy if you had a look at (it's the articletocategory2-desc). /MikaelLindmark 17:20, 2 September 2010 (UTC)

Thankt a lot. Error is solved. The translation of Google is good, I think this is better. "Plaatst een invoerveld op elke categoriepagina. Dit maakt het mogelijk om direct een nieuwe pagina in de categorie aan te maken" Good luck! Erwin van der Ploeg 07:36, 7 September 2010 (UTC)

Difference?Edit

What is the difference between this extension and "ArticleToCategory" (the original)? Ed March12, 2011

First of all, I try to keep it alive since the original code isn't supported anymore. I listen to sugested changes and try to fix bugs found. If you look at the Extension:ArticleToCategory2#What can this extension do? section you see that I added some sugested features from the Extension_talk:Add_Article_to_Category page. It's also translated in more than 50 languages. /MikaelLindmark 13:18, 13 March 2011 (UTC)

ErrorEdit

When using the blacklist with a german wiki, I get the following error: Notice: Uninitialized string offset: 0 in D:\xampp\htdocs\wiki\extensions\ArticleToCategory2\ArticleToCategory2.php on line 117

It looks like it's in a Windows environment, but what version of Windows and Mediawiki are you using? Does it work if you use other categories? /MikaelLindmark 21:41, 19 August 2011 (UTC)
I had the same problem and solved it by looking at the MediaWiki special page which is used to exclude categories. I added a header (e.g. "Excluded Categories from "Add To Article 2" Extension") above the excluded categories (which worked with MediaWiki 1.65). Now with 1.70 there seems to be a problem with the header. Anyway just make sure that your special page just contains the excluded categories and it should work again! - 30.10.2011
Thanks for the response! I'll have to test it my self and then I'll update the instructions. /MikaelLindmark 06:15, 31 October 2011 (UTC)

Extension only shown for administratorsEdit

Problem: the extension is only shown for users with the right "administrator" in the wiki. wggrouppermissions in localsettings.php is set (with wildcard * for all users) and the specialpage userrights also shows : (all) Artikel zu einer Kategorie hinzufügen (ArticleToCategory2) Please help ... — Preceding unsigned comment added by 62.154.222.235 (talkcontribs) 21 oct 2011 07:57 (UTC)

In LocalSettings.php, check that the following lines are there and the "require_once" line is in front of the others. Also check for missplaced lines with ArticleToCategory2 settings (other place in LocalSettings.php, other php files, etc).
require_once("$IP/extensions/ArticleToCategory2/ArticleToCategory2.php");
$wgarticletocategory2ConfigBlacklist=false;
$wgGroupPermissions['*']['ArticleToCategory2'] = true;
$wgGroupPermissions['*']['ArticleToCategory2AddCat'] = false;
/MikaelLindmark 10:20, 21 October 2011 (UTC)

Need for suggestionEdit

I think that for this extension is need the suggestion of existing pages and categories.

--WhiteTigerItaly (talk) 14:08, 3 October 2012 (UTC)

With FacebookConnect ?Edit

Excuse me for my bad english (( Can I add ? \$wgGroupPermissions['fb-groupie']['ArticleToCategory2'] = true; Is it possible ?

Thanx — Preceding unsigned comment added by 2a01:e35:2f6e:9f10:fc7e:12bd:ceca:ecf1 (talkcontribs) 13 apr 2013 08:12 (UTC)

Yes, if you have a group 'fb-groupie' and you only want that group to have the ArticleToCategory2 functionality. Place it somewhere after the line require_once("$IP/extensions/ArticleToCategory2/ArticleToCategory2.php"); /MikaelLindmark (talk) 21:01, 13 April 2013 (UTC)

Page Already Exists?Edit

I haven't attempted to implement this yet, so I was wondering if, when users hit the "Create" button, will they get an error message if the page has already been created?

This would potentially include any inconsistencies in capitalization and space.

For example: I go to create a page called "Article to category". Will this extension say something along the lines of, the following pages already exist:

  • "Article To Category"
  • "Article to Category"
  • "ArticleToCategory"
  • "Articletocategory"
  • etc....

Thanks in advance.

--Technomensch (talk) 14:32, 24 July 2013 (UTC)
Sorry about the late answer. It will behave the same way as if the page or category was created in the "normal" way, i.e. they will all be unique (new) names. /MikaelLindmark (talk) 23:25, 17 July 2016 (UTC)

wfMsg is deprecated in 1.27Edit

After update to 1.27 version.

Fatal error: Call to undefined function wfMsg() in /extensions/ArticleToCategory2/ArticleToCategory2.php on line 156

It's can be fixed by replace to wfMessage( 'key' )->text();

--UksusoFF (talk) 14:32, 15 July 2016 (UTC)

Thanks! I'll fix it when I switch to git. /MikaelLindmark (talk) 23:34, 17 July 2016 (UTC)
Is the switch to git going to happen any time soon? I've had a Miraheze user request this extension, we're using a git workflow and 1.28.0. BrentLaabs (talk) 00:22, 5 February 2017 (UTC)
It's done now. /MikaelLindmark (talk) 05:08, 14 August 2017 (UTC)

MW1.29Edit

When I go to any category page I get:

[3724dcfcab8637e407e2b142] /Category:XYZ Error from line 156 of /var/www/extensions/ArticleToCategory2/ArticleToCategory2.php: Call to undefined function wfMsg()
Backtrace:
#0 /var/www/includes/Hooks.php(186): wfCategoryChange(CategoryTreeCategoryPage)
#1 /var/www/includes/page/CategoryPage.php(60): Hooks::run(string, array)
#2 /var/www/includes/actions/ViewAction.php(68): CategoryPage->view()
#3 /var/www/includes/MediaWiki.php(499): ViewAction->show()
#4 /var/www/includes/MediaWiki.php(293): MediaWiki->performAction(CategoryTreeCategoryPage, Title)
#5 /var/www/includes/MediaWiki.php(862): MediaWiki->performRequest()
#6 /var/www/includes/MediaWiki.php(523): MediaWiki->main()
#7 /var/www/index.php(43): MediaWiki->run()
#8 {main}

— Preceding unsigned comment added by CalNation (talkcontribs) 2 nov 2017 03:35 (UTC)

It was fixed 14 August 2017, so I guess your version of ArticleToCategory2 is old. The extension got updated today to ver 1.2. Please upgrade and read the instructions at the Extension:ArticleToCategory2 page. /MikaelLindmark (talk) 11:41, 2 November 2017 (UTC)

Excluded categories not workingEdit

Variable $wgarticletocategory2ConfigBlacklist in config file and in extension files is used as camel cased and not camel cased, so excluded categories does not working. $rev->getText not woring properly: ArticleToCategory2.hooks.php: Call to undefined method Revision::getText().

Is it possible to get a version for 1.27.4 LTS?Edit

I search for a snapshot for MediaWiki 1.27.4 LTS ... or maybe an older version wich works on this LTS Version ... Can anybody help?

Kind regards Gerd

Try the 2012 version. See the 2012 documents for installation. I think it will work with Mediawiki 1.27. /MikaelLindmark (talk) 13:33, 8 May 2018 (UTC) Sorry. No MediaWiki 1.27 version. /MikaelLindmark (talk) 13:37, 8 May 2018 (UTC)

Adding categories to an article.Edit

And the opposite, CategoryToArticle? (adding a category box on each article?)

Return to "ArticleToCategory2" page.