Menu

#530 Can't set page categories with a .wikitext file

workingwiki
open
None
5
2014-06-03
2014-04-07
No

Consider the following example source:

<source-file filename="datapage.mk">
categories.maked.wikitext:
    echo "[[:Category:bar]] [[Category:bar]]" > $@
</source-file>

<project-file filename="categories.maked.wikitext"/>

<source-file filename="categories.wikitext">
[[:Category:foo]] [[Category:foo]]
</source-file>

It seems each of the two files ought to add a category to any page that contains them, but they don't. The category links render fine, but the category assignments don't appear to do anything.

I don't know if this can be done, but it would be helpful.

Discussion

  • Lee Worden

    Lee Worden - 2014-04-07

    Thank you! I'm pretty sure I can do this.

     
  • Lee Worden

    Lee Worden - 2014-04-16

    Should be fixed now. You might have to use action=purge to force pages to be reparsed.

     
  • Lee Worden

    Lee Worden - 2014-04-16
    • status: open --> closed
    • assigned_to: Lee Worden
     
  • Lee Worden

    Lee Worden - 2014-06-03
    • status: closed --> open
     
  • Lee Worden

    Lee Worden - 2014-06-03

    So as I move to a different, asynchronous process for building and retrieving project files, I think this may turn back into a problem.

    It's going to

    • parse the wiki page and give its output to the browser, without handling project files
    • then build the project files, by separate requests to the server, and insert each one into the wiki page's layout, in the browser.
    • So the above categories.maked.wikitext will get made after the page has already been parsed and forgotten by the wiki, which will make it harder to add the category to it.

    I might be able to make it work, but I wonder if it would be easier to have you do it a different way... Can the code that generates the project-file tags to insert in pages also generate category links directly?

     

Anonymous
Anonymous

Add attachments
Cancel