I made a script, based on importTextFile.inc, to automatically create or
edits pages. The core function is this:
function editPage(&$title, $text, $comment)
{
$article=new Article($title);
$article->doEdit($text, $comment);
return "OK";
}
Almost everything is working well. The pages are created, they appear on
Recent Changes, they can be read and edited, and so on.
The problem is that templates don't seem to work very well.
If the page contains a template like {{test}}, and the template "test"
contains a category definition, what happens is that the category is shown
on the footer of the new page. But when I open the category page, the new
page is not listed there. It only will be listed if I edit and save the page
on the browser.
This doesn't seem to be cache related because caching is disabled on my wiki
and because I used action=purge and cleared the browser cache as well... And
even if I edit and save the category page, the new page is not shown there
until I edit and save the new page...
I searched the MediaWiki site and the list archive but could not find
anything on this except for the solved "Bug 2483: Special:Import needs to
run link updates on created pages", that is similar.
I'd be very grateful if someone could point me to some information on how to
solve this problem.