Jump to content

Topic on Project:Support desk

Category page not updating or created when adding a page to it

4
Summary by Rduke79

This happens when the DB updates are not yet started/done. Look at Manual:Job queue

To speed up job execution, look at Manual:$wgJobRunRate, Manual:$wgRunJobsAsync, and Manual:$wgUpdateRowsPerJob

Rduke79 (talkcontribs)

Hi all,

I ported a wiki (from to mediawiki 1.27) with 3000+ pages to an ubuntu server. When I create a new page and add it to a category, the category page will not list it. E.g. I add the new page 'Testdon' and add it to the category 'Doncat'. The page is created and accessible. However, when I visit the page Category:Doncat, the page 'Testdon' is not listed there. When I check the mysql db, I see the following:

The page is there: select * from page where page_title="Testdon";

+---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+-------------+----------+--------------------+--------------------+-----------+ | page_id | page_namespace | page_title | page_restrictions | page_is_redirect | page_is_new | page_random | page_touched | page_latest | page_len | page_content_model | page_links_updated | page_lang | +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+-------------+----------+--------------------+--------------------+-----------+ | 3317 | 0 | Testdon | | 0 | 0 | 0.558504201002 | 20160809120213 | 18890 | 79 | wikitext | NULL | NULL | +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+-------------+----------+--------------------+--------------------+-----------+I.e.

BUT page_links_updated is NONE! (I found here https://www.mediawiki.org/wiki/Manual:Page_table#page_links_updated that: "Set to the default value of NULL when the page is created by WikiPage::insertOn()." but don't know what to make of it).

Also, the 'Doncat' category is not in the category table:

select * from category where cat_title="Doncat";

Empty set (0.00 sec)

The categorylinks table also doesn't register anything.

select * from categorylinks where cl_from=3317;

Empty set (0.00 sec)

and

select * from categorylinks where cl_to="Doncat";

Empty set (0.00 sec)

HOWEVER, if I manually run the refreshLinks.php maintenance script, the issue is resolved. Hence, it seems that the new category and the pages in it are not registering in the DB when a new page / category is created, but refreshLinks.php is doing that.

I checked on another smaller wiki (also 1.27) and could not reproduce the error. When I create a page and add a category, page_links_updated is not NONE: +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+ | page_id | page_namespace | page_title | page_restrictions | page_is_redirect | page_is_new | page_random | page_touched | page_links_updated | page_latest | page_len | page_content_model | page_lang | +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+ | 10 | 0 | Einfach | | 0 | 1 | 0.555771995564 | 20160809121827 | 20160809121827 | 63 | 26 | wikitext | NULL | +---------+----------------+------------+-------------------+------------------+-------------+----------------+----------------+--------------------+-------------+----------+--------------------+-----------+

Is it possible that the updating of the category tables depends on the wiki size? What do I need to configure so that the tables category and categorylinks are updated immediatly (i.e. whatever refreshLinks.php does is run)? Is there an option to force the db update of the category tables when new page are created or changes are made?

Thanks!

87.123.57.53 (talkcontribs)

We really need an entry on Manual:Errors and symptoms for this problem. This is like the tenth report here after MW 1.27 got out...

Rduke79 (talkcontribs)

Ok, but how is the issue resolved? Running refreshLinks.php manually (or as a cron job) does not seem to be a good solution? I'll gladly write an entry in Manual:Errors and symptoms if there's a solution!

Rduke79 (talkcontribs)