Help talk:ChangeContentModel

About this board

Changing content model for all pages with a given prefix?

6
Evolution and evolvability (talkcontribs)

Is it possible to change the content model for:

  1. All current pages with a given prefix
  2. Any new pages created with that prefix?

The use case is changing from wikitext to Beta feature for talk pages for all wikiversity pages with prefix Talk:WikiJournal of Science/

Emojiwiki (talkcontribs)

Thats per-wiki. You can set a namespace's default content model to Flow, without changing any settings on Flow extension itself, or having any fixes.

If you want to change all current pages, a bot can help you to do so. Note that flow isn't standard text page, you will lost all data inside it if you change the content model in a page between Flow and wikitext!

Diegodlh (talkcontribs)

We have a similar question in the Web2Cit project. We use json configuration files stored in Meta, under Web2Cit/data/ (for example, meta:Web2Cit/data/uy/com/elobservador/www/templates.json). As suggested by @Strainu, it would be nice that they be assigned the "JSON" content model automatically so that (1) we can use the code editor with them, and (2) they are rendered nicely so they are easier to review.

With "thats per-wiki" you mean that this cannot be done?

In Meta, in the "User" namespace, files ending with .json are given the JSON content model (for example, meta:User:Diegodlh/Web2Cit/data/uy/com/elobservador/www/templates.json), whereas those ending with .js are given the JavaScript content model. Is content model automatically assigned in these cases based on a path pattern? Could the same approach be used to automatically assign the JSON content model to files following the Web2Cit/data/**/*.json pattern in the "Main" namespace?

We are also tracking this in phab:T305571.

Thanks!

The wub (talkcontribs)

@Diegodlh I'm not sure, but I think this could be done using Extension:JsonConfig and adding some settings to Wikimedia's configuration. If you search for JsonConfig in CommonSettings.php you can find how it has been done for a few other cases.

(How it works for the User namespace I'm not sure, that doesn't appear to be in the same configuration)

Diegodlh (talkcontribs)

Thank you very much, @The wub. This has been very helpful.

Indeed, the way to go seems to be adding some JsonConfig settings to Wikimedia's configuration.

(Just as a side note, I looked a little more into this and found that automatic content model assignment in the "User" namespace seems to be handled by the getDefaultModel function in Mediawiki's MainSloteRoleHandler.)

This post was hidden by Diegodlh (history)
Reply to "Changing content model for all pages with a given prefix?"
Gustmd7410 (talkcontribs)

I'm making javascript gadget using this page and I need to apply it for my gadget. If you wonder why I don't use API, because it works in wiki where uses captcha for unconfirmed user. So unconfirmed users can't use API for editing with changing content model. And I'm considering to support these users. I need to redirect another page including URL search params when it changes content model like wpExtraQueryRedirect from submit action of index.php. Please let me know parameters to Special:ChangeContentModel.

Reply to "Parameters to Special:ChangeContentModel"

The content model of slots

1
Cavila (talkcontribs)

It should also be possible to change the content model of individual slots on a page, but I couldn't find any documentation. It would be good to let developers know somehow.

Reply to "The content model of slots"

Is it possible to use for many pages?

2
Loman87 (talkcontribs)

I need to do a mass content model change for pages stored in Page nampespace (provided by the ProofreadPage extension).

Thanks,

Lorenzo

Cavila (talkcontribs)
Reply to "Is it possible to use for many pages?"

Just a new avenue for vandalism?

5
Billinghurst (talkcontribs)

ping Quiddity (WMF)

Some of this stuff just seems to be a new ready avenue to have vandals break pages, especially some of our prolific vandals. It seems relatively easy to have a list of pages and individually convert them using the relevant special: page and just hammer away causing problems until someone intervenes. It would take a level of observation and would now seem to require two places to rollback a change, 1) on the page, and 2) via the logs; this is a considerable change, and not one that will be evident to many.

Do we have a ready means through abuse filters to identify AND to prevent the use of this function? For many WMF wikis the pages will be set to be wikitext and should only ever be wikitext. As such the wikis should be able to write an abuse filter to stop pages in certain namespaces from being converted, similarly there needs to be an abuse filter mechanism to simply identify this sort of change. It is a lot easier to be able to watch abuselog for vandalism rather than to now also keep an eye on a very busy special:log

Quiddity (talkcontribs)

(I'm not involved officially, and I meant to use my volunteer account for the documentation assistance (as I did in latter edits). I don't have enough technical understanding yet to have a personal opinion on the issues.)

Legoktm (talkcontribs)

Hi @Billinghurst:)

Yes, it does provide a new place for vandals to do bad things, but that's true of basically any new feature sadly :( This feature is rate limited at the same level as page moves.

To clarify, you only need to revert such a change in one place (rollback, undo, or special page). And I filed phab:T145489 about fixing the AbuseFilter integration - it was about half working currently. I also have an open change to add a change tag to edits that change the content model of a page so you can just watch recent changes instead of needing to follow a separate log.

Billinghurst (talkcontribs)

Apologies Quiddity, I should have known better.

Thanks for that extra information @legoktm and the valuable defences. I think that there is value in noting the additional features (defences) to wikitech-ambassadors so that admins know of these measures rather than have to go hunting. I can see for numbers of sisterwikis may prefer to lock down certain namespaces for wikitext, until they can envision why other content types are determined to be required.

Keyacom (talkcontribs)

No. It's by default available only for autoconfirmed users.

Reply to "Just a new avenue for vandalism?"
There are no older topics