Jump to content

Topic on Project:Support desk

Mass Edit and Save pages to run $wgHooks['EditPage::showEditForm:initial'][]

4
Lucy Tech (talkcontribs)

I have an extension that checks the page text and if a specific text isn't there it will add it. I'm usingthe hooks $wgHooks['ParserFirstCallInit'][] = 'AdsSetup'; $wgHooks['EditPage::showEditForm:initial'][] = 'CheckHasTag'; The extension runs if I go to each page, edit and then click 'save page', however, I have hundreds of pages on my wiki. How do I force an edit page and save on all the pages so the extension will run without me having to go to each page individually?

Ricordisamoa (talkcontribs)

If your hook works as a pre-save transform (but I don't think so) regardless if it's used through the GUI, then pywikibot/touch.py should work.

Lucy Tech (talkcontribs)

I would like to only re-save pages in the 'main' namespace, and not all of them. Is this the best tool for this? It looks quite complex to install and run.

Ricordisamoa (talkcontribs)

You could use JavaScript to load forms and submit them automatically.

Reply to "Mass Edit and Save pages to run $wgHooks['EditPage::showEditForm:initial'][]"