Last modified: 2014-04-15 13:56:32 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T65278, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 63278 - Merging pages via API sometimes broken
Merging pages via API sometimes broken
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataClient (Other open bugs)
unspecified
All All
: High normal (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=0
:
: 63567 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-03-30 14:32 UTC by Matěj Suchánek
Modified: 2014-04-15 13:56 UTC (History)
6 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Matěj Suchánek 2014-03-30 14:32:22 UTC
I am working on merging pages (categories) these days. Sometimes when I try to merge two pages via 'Edit links' from ptwiki, I get an error message: "$number needs to be integer". I don't know why.
Comment 1 Lydia Pintscher 2014-03-31 16:09:33 UTC
Do you have pages where this happened?
Comment 2 Matěj Suchánek 2014-03-31 17:14:28 UTC
Few examples: Q9435762, Q9436054; more you can find in the contributions of Matěj Suchánek, offset 20143103000000 but I don't know how it can help you as the pages are already merged.

If you want examples of pages which haven't been merged yet, I can find them for you and you can test the merge.
Comment 3 Matěj Suchánek 2014-03-31 17:19:05 UTC
Even though the offset is not necessary here, I wrote it wrong. It should be 20140331000000.
Comment 4 hawkeye7 2014-04-02 20:54:29 UTC
I can confirm this bug. I am trying to link [[en:Mareike Adermann]] with [[de:Mareike Adermann]]. I get an error: "An unexpected error occurred"  and the details say "$number needs to be an integer"
Comment 5 Addshore 2014-04-02 23:12:15 UTC
Is the error exactly "$number needs to be an integer" ? 
I don't seem to be able to find this anywhere in the entire codebase. :/
Comment 6 Addshore 2014-04-02 23:15:22 UTC
Reproduced:

The call is:
action=wbmergeitems&format=json&fromid=Q6758785&toid=Q1804120&ignoreconflicts=label%7Cdescription&origin=https%3A%2F%2Fen%2Ewikipedia%2Eorg&bot=1&token=eba222f0d9f056938338c3d64fc0b7ff%2B%5C

The error is:
{"servedby":"mw1192","error":{"code":"param-invalid","info":"$number needs to be a integer"}}

Odd how I cant find the error string anywhere in the code base but I will keep digging...
Comment 7 Marius Hoch 2014-04-02 23:19:37 UTC
(In reply to Addshore from comment #6)
> Odd how I cant find the error string anywhere in the code base but I will
> keep digging...

With the power of grep (on master):

$ grep -ri 'needs to be a integer' .
./vendor/wikibase/data-model/src/Entity/PropertyId.php:			throw new InvalidArgumentException( '$number needs to be a integer' );
./vendor/wikibase/data-model/src/Entity/ItemId.php:			throw new InvalidArgumentException( '$number needs to be a integer' );
Comment 8 Addshore 2014-04-02 23:23:40 UTC
Hah, thanks hoo :P

Oddly when trying to run the same prams through the API sandbox it complains saying the APi Sandbox and wbmergeitems needs POST... I thought the sandbox did this? odd...
Comment 9 Gerrit Notification Bot 2014-04-02 23:26:55 UTC
Change 123477 had a related patch set uploaded by Addshore:
Fix call to ItemId::newFromNumber with ID object

https://gerrit.wikimedia.org/r/123477
Comment 10 Gerrit Notification Bot 2014-04-04 11:27:20 UTC
Change 123477 merged by Jeroen De Dauw:
Stop calling newFromNumber using an EntityId in ChangeOpsMerge

https://gerrit.wikimedia.org/r/123477
Comment 11 Marius Hoch 2014-04-07 18:27:22 UTC
*** Bug 63567 has been marked as a duplicate of this bug. ***
Comment 12 Bene* 2014-04-10 16:08:48 UTC
*** Bug 63567 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links