Subramanya Sastry has uploaded a new change for review.
https://gerrit.wikimedia.org/r/242716
Change subject: [WIP]: Set default page name for API requests to Main_Page
......................................................................
[WIP]: Set default page name for API requests to Main_Page
The debugging helper forms in /_wikitext/ and /_html/ etc.
do not have a page name set. Batching API seems to require
a title for fulfilling preprocessor requests and throws
errors (logged in Kibana).
Change-Id: I209d597672ddcf61ae0ef5983e769baa2db199ac
---
M api/routes.js
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid
refs/changes/16/242716/1
diff --git a/api/routes.js b/api/routes.js
index 03280c2..abf5c09 100644
--- a/api/routes.js
+++ b/api/routes.js
@@ -39,7 +39,7 @@
routes.v1Middle = function(req, res, next) {
res.locals.apiVersion = 1;
res.locals.iwp = req.params[0] || parsoidConfig.defaultWiki ||
'';
- res.locals.pageName = req.params[1] || '';
+ res.locals.pageName = req.params[1] || 'Main_Page';
res.locals.oldid = req.body.oldid || req.query.oldid || null;
// "body" flag to return just the body (instead of the entire
HTML doc)
res.locals.bodyOnly = !!(req.query.body || req.body.body);
--
To view, visit https://gerrit.wikimedia.org/r/242716
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I209d597672ddcf61ae0ef5983e769baa2db199ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits