Last modified: 2010-10-27 15:42:54 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 T27463, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25463 - Export header should not be shown if no pages were requested, to reduce confusion
Export header should not be shown if no pages were requested, to reduce confu...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Roan Kattouw
http://de.wikipedia.org/w/api.php?act...
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-08 18:45 UTC by Umherirrender
Modified: 2010-10-27 15:42 UTC (History)
5 users (show)

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


Attachments
no export header, when no titles to export (2.37 KB, patch)
2010-10-23 19:34 UTC, Umherirrender
Details
no export header, when no titles to export - 2 (2.37 KB, patch)
2010-10-27 15:26 UTC, Umherirrender
Details

Description Umherirrender 2010-10-08 18:45:21 UTC
When I call the url I get only the header of the export, but no page content. The pages are in a list.

I am not sure, should that query give a full export of the pages or is the export header added wrongly to the output?

Works fine with generator=allpages: http://de.wikipedia.org/w/api.php?action=query&generator=allpages&gaplimit=5&gapprefix=User&gapnamespace=10&export

Thanks.
Comment 1 Roan Kattouw 2010-10-09 18:55:03 UTC
This is expected behavior: the export parameter only operates on pages specified in &titles/&pageids/&revids or pages generated by a generator. It can't operate on 'normal' module results, because modules in non-generator mode don't return Title objects to the query module, like they do in generator mode.

If this isn't documented clearly, I guess the docs should be improved.
Comment 2 Umherirrender 2010-10-09 21:30:27 UTC
Thanks for the explanation.

But is is a good idea to add the export header in this case? I do not think so, because it assume there is something wrong, and a export is possible.
Comment 3 Roan Kattouw 2010-10-11 11:41:13 UTC
(In reply to comment #2)
> Thanks for the explanation.
> 
> But is is a good idea to add the export header in this case? I do not think so,
> because it assume there is something wrong, and a export is possible.
You're right about that one. Reopening and repurposing bug.
Comment 4 Umherirrender 2010-10-23 19:34:23 UTC
Created attachment 7752 [details]
no export header, when no titles to export

A condition which count the titles to export is missing, I have added a condition in the attachment

Feel free to modify the patch or create a new one.
Comment 5 Sam Reed (reedy) 2010-10-24 18:47:08 UTC
I can't get this to apply cleanly on SVN Head.

Not sure if it's my computer at fault
Comment 6 Umherirrender 2010-10-27 13:06:48 UTC
(In reply to comment #5)
> I can't get this to apply cleanly on SVN Head.
> Not sure if it's my computer at fault

Works fine for me, when apply to trunk/phase3. Maybe remove folder from Index and apply to the parent of ApiQuery.php.
Comment 7 Sam Reed (reedy) 2010-10-27 13:09:53 UTC
reedy@reedy-laptop:~/mediawiki/trunk/phase3$ patch -p0 -i bug25463.patch 
(Stripping trailing CRs from patch.)
patching file includes/api/ApiQuery.php
Hunk #1 FAILED at 457.
1 out of 1 hunk FAILED -- saving rejects to file includes/api/ApiQuery.php.rej
reedy@reedy-laptop:~/mediawiki/trunk/phase3$ 


Any chance you could just run me another copy of the patch as is?

I'll also try it on Windows when I get gome in a few
Comment 8 Umherirrender 2010-10-27 15:26:33 UTC
Created attachment 7760 [details]
no export header, when no titles to export - 2

maybe r75308 broke the patch, I have create a new one
Comment 9 Sam Reed (reedy) 2010-10-27 15:42:54 UTC
Cheers, that applies cleanly and looks good

r75554

Minor tweak, but just about the same :)


Thanks!

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


Navigation
Links