Page MenuHomePhabricator

category list not updated upon file import
Closed, ResolvedPublic

Description

Author: till

Description:
Upload a file with [[category:foo]] through the action=import API.

Actual result: The respective category page does not get updated.

Expected result: The respective category page gets updated.


Version: 1.16.x
Severity: normal

Details

Reference
bz28666

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:37 PM
bzimport set Reference to bz28666.
bzimport added a subscriber: Unknown Object (MLST).

Where are you seeing this?

It's probably an importer bug rather than an API one...

Bryan.TongMinh wrote:

A quick look reveals that WikiImporter does not run a LinksUpdate.

Seemingly the same on trunk

Recategorising

till wrote:

Thanks for recategorizing ... my first bug report.

Actually, when the XML file contains several <page>s, the first <page> does show up in the appropriate category, the remaining ones don't.

TTO claimed this task.
TTO subscribed.

This problem doesn't happen anymore for uploading via Special:Import. API file upload is a pain, so I can't be bothered to script that up just to test this bug, but I can see that WikiImporter does call into WikiPage::doEditUpdates. In this function, a LinksUpdate is one of the secondary data updates in this block:

			$updates = $content->getSecondaryDataUpdates(
				$this->getTitle(), null, $recursive, $editInfo->output );
			foreach ( $updates as $update ) {
				DeferredUpdates::addUpdate( $update );
			}

So I am reasonably confident that this will now work in all cases.