Menu

FillAllFromCategory no longer working

Help
Kbdank71
2008-03-20
2013-05-13
  • Kbdank71

    Kbdank71 - 2008-03-20

    My bot, which uses FillAllFromCategory, is not working as of this morning.  Yesterday things were fine, I made no changes, now it doesn't.

    My code runs, but when it gets to the FillAllFromCategory line, nothing happens.  The pagelist is not loaded with anything. 

    I'm not sure if the wiki software was updated to break something, but this morning I noticed if you view a category with more than 200 articles, it now says "The following 199 pages are in this category, out of 498 total."

    I'm not sure where to go to with this.  Any help would be greatly appreciated.

     
    • Kbdank71

      Kbdank71 - 2008-03-20

      Apparently a mediawiki change occurred which may have broken the bot.  I was pointed to this from wikipedia:
      http://lists.wikimedia.org/pipermail/mediawiki-api/2008-February/000353.html

      Should I mark this as a bug?

       
      • CodeDriller

        CodeDriller - 2008-03-21

        There really was a change in ApiQueryCategoryMembers.php file of MediaWiki bots interface, that has broken FillAllFromCategoryEx function.

        Immediate solution will be to replace the following 3 lines of FillAllFromCategoryEx function:

        categoryName = site.RemoveNSPrefix(categoryName, 14);
        FillFromCustomBotQueryList("categorymembers", "cmcategory=" +
            HttpUtility.UrlEncode(categoryName), int.MaxValue);

        With the following 2 lines:

        FillFromCustomBotQueryList("categorymembers", "cmtitle=" +
            HttpUtility.UrlEncode(categoryName), int.MaxValue);

        That's it.

        Alternatively, you can completely disable bot interface usage by setting "site.botQuery = false;" in your code. It will force bot to use common user interface, that is working fine.

        The framework update will be released soon.

         
    • Kbdank71

      Kbdank71 - 2008-03-21

      Excellent!  Works like a charm.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.