Last modified: 2014-06-13 12:33:49 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 T49136, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 47136 - Create tests for subpage support
Create tests for subpage support
Status: REOPENED
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Low normal
: ---
Assigned To: Marc Ordinas i Llopis
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-11 20:29 UTC by C. Scott Ananian
Modified: 2014-06-13 12:33 UTC (History)
6 users (show)

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


Attachments

Description C. Scott Ananian 2013-04-11 20:29:05 UTC
The 'subpage' option in parserTests is supposed to turn on subpage support.
(which is a wiki config thing?)

But parsoid always enables subpage support; that is, [[/foo]] will always
link to [[Parent/foo]], not an article titled '/foo'.

We should make that a wiki config option, fetch it via the API, and only resolve subpages if it is turned on.  [We could also make the 'subpage' option in parserTests work properly then.]
Comment 1 Gerrit Notification Bot 2013-04-11 20:50:43 UTC
Related URL: https://gerrit.wikimedia.org/r/58813 (Gerrit Change Ia6a72c05e9aafb14753271bcdb1fab023cf9e3ca)
Comment 2 Gerrit Notification Bot 2013-04-11 22:27:37 UTC
https://gerrit.wikimedia.org/r/58813 (Gerrit Change Ia6a72c05e9aafb14753271bcdb1fab023cf9e3ca) | change APPROVED and MERGED [by GWicke]
Comment 3 Mark Holmquist 2013-04-15 21:43:27 UTC
Confirming, keywording ('easy' on a whim)
Comment 4 Gabriel Wicke 2013-04-16 23:52:02 UTC
It seems that the API does not expose this configuration option yet in the 'general' section, so we'll have to add it in MediaWiki core. The Parsoid side of the implementation should be fairly straightforward once the configuration information is in env.conf.wiki. See comment in the patch linked above.
Comment 5 Gabriel Wicke 2013-04-17 00:00:27 UTC
The PHP implementation of the 'general' section is in includes/api/ApiQuerySiteinfo.php. The config variable to expose is http://www.mediawiki.org/wiki/Manual:$wgNamespacesWithSubpages#Enabling_for_a_namespace. Subpages can be enabled or disabled per namespace, so an array of numeric namespace ids for which subpages are enabled probably makes most sense for the API. There are some other arrays in ApiQuerySiteinfo (see appendFileExtensions for example) that can be used as a template.
Comment 6 Gabriel Wicke 2013-04-17 00:14:18 UTC
Example general section for the English Wikipedia (hit 'Make request' and scroll down to see the JSON):
https://en.wikipedia.org/wiki/Special:ApiSandbox#action=query&meta=siteinfo&format=json&siprop=general
Comment 7 Gerrit Notification Bot 2013-04-17 16:58:47 UTC
Related URL: https://gerrit.wikimedia.org/r/59649 (Gerrit Change If34d272b45cf986265a6d3d2d67d465d84ae117a)
Comment 8 Marc Ordinas i Llopis 2013-04-17 18:19:59 UTC
Namespaces with subpages enabled already appear in the API, for example:
https://en.wikipedia.org//w/api.php?action=query&meta=siteinfo&format=jsonfm&siprop=namespaces
Comment 9 Gerrit Notification Bot 2013-04-17 20:47:18 UTC
Related URL: https://gerrit.wikimedia.org/r/59719 (Gerrit Change Ibf7110fb934e2219210abf2351b17d68e55f296e)
Comment 10 Gerrit Notification Bot 2013-04-18 20:09:08 UTC
Related URL: https://gerrit.wikimedia.org/r/59929 (Gerrit Change I055c451685d98f3951472677e745b9e077970c21)
Comment 11 C. Scott Ananian 2013-04-18 20:39:52 UTC
The patch landed, but I think support for the 'subpage' option in parserTests did not, as no additional tests pass with Gerrit change #59929.

See the section flagged with "### Subpages" in tests/parserTests.txt.
Comment 12 Gabriel Wicke 2013-06-21 02:40:48 UTC
Changed the subject to reflect that only the tests are missing.
Comment 13 Andre Klapper 2013-07-04 10:34:50 UTC
[Parsoid component reorg by merging JS/General and General. See bug 50685 for more information. Filter bugmail on this comment. parsoidreorg20130704]

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


Navigation
Links