Extension talk:Auto Create Category Pages

About this board

Previous discussion was archived at Extension talk:Auto Create Category Pages/Archive 1 on 2016-08-08.

Auto create category page as MW default behavior?

2
Douginamug (talkcontribs)

Hello and thanks for your work on this!

Has there been any discussion so far about integrating the behavior of the extension into MediwaWiki core? I'm sure there are many reasons why it's not happened, but from my position it would be much more intuitive.

FreedomFighterSparrow (talkcontribs)

I never even asked. I'm not sure this is the wanted default, really - even I stopped using this extension, as at some point the number of wrong category names just piled up.

Reply to "Auto create category page as MW default behavior?"

Using parserfunctions in created pages

5
2001:9E8:E3F5:EC00:589E:8FD1:40CE:FAA3 (talkcontribs)

Hi everyone,

i'm trying to use a parserfunction from Extension:CategoryTests for my Autocreatecategorypages-stub template and it's not working in auto created pages, but it does work if i insert the template manually.

The idea is that i have a template which adds a specific category to newly created pages. When these categories are created, i want to check if the creating page (page name == category name in this specific case) is inside another specific category and, if so, add a specific parent category to the created category page:

This is the category {{{page}}}.

<includeonly>{{#switchcategory:#page={{{page}}}|Cat1=[[Category:ParentCat1]]|Cat2=[[Category:ParentCat2]]|Cat3=[[Category:ParentCat3]]}}</includeonly>

The text part is working as expected, but the categories are not. Are the tags a problem? Do i have to escape the category names inside of the function somehow?

Thank you all in advance!

2001:9E8:E3F5:EC00:589E:8FD1:40CE:FAA3 (talkcontribs)

Hi, me again, I don't know what happened to the "tags" up there, it looked fine in the preview. I meant if the tags are a a problem.

And i should have mentioned, this is what MediaWiki:Autocreatecategorypages-stub looks like:

{{Autocreatecategorypages-stub|page=$1}}

FreedomFighterSparrow (talkcontribs)

The documentation says "Parameters: $1 - page title", but the actual code actually inserts the title of the category page. I have no idea why that is - as you could just use {{pagename}} instead of hard-wiring the page name, but it looks to be like that in the original code, way before I started maintaining it. Not my fault, I tell you! :-) But seriously, I'm not sure what's the right thing to do here - while I could add a second parameter with the originating page's title, your use case doesn't sound very common and obscure features are almost never a good idea.

2001:9E8:E3F9:5C00:948A:EC39:2F98:BD32 (talkcontribs)

So it actually inserts "Category:CategoryName", did i get that right? If so i may be able to work around that, don't know how yet, but knowing the exact ouput of $1 is definitely helpful. Maybe consider adding it to the documentation? :)

Thanks a lot!

FreedomFighterSparrow (talkcontribs)

It actually just inserts "CategoryName", without the category prefix. I updated the on-page documentation to reflect that.

Reply to "Using parserfunctions in created pages"

Compatible with Mediawiki 1.34 ?

6
Summary by Varlin

Yes it is

Varlin (talkcontribs)

Hi, is this extension compatible with MW 1.34 ? I installed it, it is present in Special:Version, but it has no effect.

I also tried in vain Extension:CategoryBlueLinks

FreedomFighterSparrow (talkcontribs)

Hi Varlin, my own wiki fell behind and stayed with MW 1.29, so I never tested it with a newer version. I will try to test (and fix it, if necessary) in the next couple of days

FreedomFighterSparrow (talkcontribs)

Hi, I just tested it with both MW 1.34 and MW master branch (1.35), and it worked with both (it uses some deprecated functions, but ones that are not yet removed).

My understanding is that you don't see any errors, simply that category pages aren't created. Can you try enabling the logs, and see if any errors pop up?

Varlin (talkcontribs)

After I turned on the logs, I did not see any message related to Auto Create extension, at least among messages directly displayed on screen. Is one particular file that needs to be checked? Question: if the extension was to work, would the existing redlink categories be created immediately or only when editing a page linking to one redlink category? (Sorry if the answer is on the extension page, I did not see it). Here is my wiki, in case it helps.

FreedomFighterSparrow (talkcontribs)

Hi Varlin, it only works on save. Feel free to improve the wording on the extension page - it might not be clear enough.

I looked at your wiki, and saw that the version of this extension is 1.0.0, instead of the latest 1.0.3, which fixes a few bugs. It seems the branch REL1_34 for the extension was not updated when MediaWiki 1.34 was release, but I updated it now.

Please either pull that branch again, or switch to the master branch - then see if the problems persist.

Varlin (talkcontribs)

I updated to master branch, and now it works ! Thanks a lot for your help !

There are no older topics
Return to "Auto Create Category Pages" page.