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.
On 30/01/07, Fernando Correia fernandoacorreia@gmail.com wrote:
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.
The job queue should be taking care of this; have a look and see what jobs are in the table awaiting processing. If not, run maintenance/refreshLinks.php to do a link table update.
Rob Church
Rob, thank you very much for trying to help me.
1. The "job" table is empty after importing the new page.
2. After executing refreshLinks.php, the category doesn't list ANY pages. Even the pages that were listed before disappeared. After editing a page, it apears on the category page again...
If you can think of something else, I'd be grateful.
2007/1/30, Rob Church robchur@gmail.com:
On 30/01/07, Fernando Correia fernandoacorreia@gmail.com wrote:
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.
The job queue should be taking care of this; have a look and see what jobs are in the table awaiting processing. If not, run maintenance/refreshLinks.php to do a link table update.
Some additional information: this problem happens even using the standard importTextFile.php utility and even after disabling all extensions on the wiki.
2007/1/30, Fernando Correia fernandoacorreia@gmail.com:
Rob, thank you very much for trying to help me.
The "job" table is empty after importing the new page.
After executing refreshLinks.php, the category doesn't list ANY pages.
Even the pages that were listed before disappeared. After editing a page, it apears on the category page again...
If you can think of something else, I'd be grateful.
2007/1/30, Rob Church robchur@gmail.com:
On 30/01/07, Fernando Correia fernandoacorreia@gmail.com wrote:
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.
The job queue should be taking care of this; have a look and see what jobs are in the table awaiting processing. If not, run maintenance/refreshLinks.php to do a link table update.
mediawiki-l@lists.wikimedia.org