Page MenuHomePhabricator

mw.config doesn't expose page existence information about the target of a special page
Closed, ResolvedPublic

Description

For special pages, no information about page existence is exposed to mw.config, which means that VisualEditor is forced to assume it exists regardless.


Version: 1.22.0
Severity: minor
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=66885

Details

Reference
bz53774

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 1:51 AM
bzimport set Reference to bz53774.

Change 82744 had a related patch set uploaded by Jforrester:
Reference core bug 53774 in bug 49000 comment

https://gerrit.wikimedia.org/r/82744

Change 82744 merged by jenkins-bot:
Reference core bug 53774 in bug 49000 comment

https://gerrit.wikimedia.org/r/82744

There is wgCanonicalSpecialPageName set, when you are on a special page.

(In reply to comment #3)

There is wgCanonicalSpecialPageName set, when you are on a special page.

-> WORKSFORME

This bug is about giving existence information for the relevant article (i.e. the article that the special page is working on). See bug 66885

Sounds like you need the js variable 'wgIsProbablyEditable' or 'wgIsArticle' according to page under 'wgRelevantPageName' or a new variable 'wgRelevantIsProbablyEditable'/'wgRelevantIsArticle' to cover this.

'wgRelevantArticleId' => WikiPage::factory( $relevantTitle )->getId() perhaps?

I'm not sure we want to introduce new variables here though...

Change 169639 had a related patch set uploaded by Alex Monk:
Expose ID of relevant page in JS variables

https://gerrit.wikimedia.org/r/169639

Change 169639 merged by jenkins-bot:
Expose ID of relevant page in JS variables

https://gerrit.wikimedia.org/r/169639