Page MenuHomePhabricator

Page.content_model returns None pre 1.21
Closed, DeclinedPublic

Description

Page.content_model was only implemented for 1.21+, using the API result.
.css and .js pages, typically used in MediaWiki: and User: namespaces, could return a different content_model pre 1.21

Details

Related Changes in Gerrit:

Event Timeline

jayvdb raised the priority of this task from to Needs Triage.
jayvdb updated the task description. (Show Details)
jayvdb added a project: Pywikibot.
jayvdb subscribed.

Wasn't contentmodel introduced in 1.22 for 'info' and in 1.21 for 'revisions'?
Is it returned in some other way?

ContentHandler did not exist prior to 1.21...

I miss what this means then:
".css and .js pages, typically used in MediaWiki: and User: namespaces, could return a different content_model pre 1.21"

I miss what this means then:
".css and .js pages, typically used in MediaWiki: and User: namespaces, could return a different content_model pre 1.21"

I was hoping that we could detect that Page( enwp, 'User:Foo/common.js' ) on pre 1.21 is 'javascript' instead of 'wikitext'.

Change 291605 had a related patch set uploaded (by xqt):
[pywikibot/core] [IMPR] rewrite Revision class

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

Change 341342 had a related patch set uploaded (by xqt):
[pywikibot/core] [IMPR] rewrite Revision class

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

Xqt triaged this task as Medium priority.Mar 31 2017, 5:42 AM

@Xqt: Hi! This task has been assigned to you a while ago, and related patches have not seen updates recently. Do you still plan to work on this task? Thanks!

@Xqt: Hi! This task has been assigned to you a while ago, and related patches have not seen updates recently. Do you still plan to work on this task? Thanks!

Yes, I do. See related patch.

Change 341342 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] rewrite Revision class

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

MW < 1.23 will be desupported