Extension talk:MassEditRegex

Jump to navigation Jump to search

About this board

Can i create Pages with this tool?

2
Schockocraft (talkcontribs)

In my new wiki i want to bulk create sub-categories (to be filled later) and a list of pages that we need with a custom "to-do" template, but i just get a "Edit failed: <Page Name> does not exist" from the tool... can i change this beahavior (and make the tool create pages that don't exist instead of just giving up), or is there a tool that allows me to do that?

Kghbln (talkcontribs)
Reply to "Can i create Pages with this tool?"
Johnywhy (talkcontribs)

Should i go to the category page (to edit all pages in the old category), and do a text replace?

[[Category: Old Category Name]]

with:

[[Category: New Category Name]]

What about spaces (which get converted to underscore in some cases)?

Johnywhy (talkcontribs)

My rename failed. First i went to the category page https://MyUrl/Category:Delete_Me, which lists one page called Deleteme

Next, i clicked `Edit All`, and got the Mass Edit page with the category pre-loaded.

So far, so good. Then i enter my desired find-replace text:

find: \[\[Category:Delete Me\]\]

replace: [[Category: New Category Name]]

But when i submit, i get an error, saying the page (the page that's in the old category) doesn't exist:

Reply to "How to rename a category?"

Add code to all pages with less than x characters

1
Rbirmann (talkcontribs)

I want to add a template to the top of pages with very short text (say, less than 150 characters) to tag them as a draft, inviting users to expand it. Similar to https://www.mediawiki.org/wiki/Template:Expand

Would this be the right regex? ^.{0,150}$

Will this affect redirects?

Thanks

Reply to "Add code to all pages with less than x characters"

Adding content to the very top of every page

1
Kghbln (talkcontribs)

The extension provides examples for adding content to the very bottom of a page, but not to the top. Thus I fiddled with regexes a bit and found this solution, e.g.:

Detect any first character at the beginning of a page:

→ Search for: /^(.)/

Prepend my content to the char found a the beginning of a page including a line break:

→ Replace with: MyContent\n$1

Reply to "Adding content to the very top of every page"

Doc could use some "supported Regex features" part/info.

1
MvGulik (talkcontribs)

Based on the current documentation page I could not help but feel completely mystified about MassEditRegex supported Regex features or its used Regex flavor(fully or partial supported, unclear).

The global Regex feature range (and flavours) is pretty extensive ... => https://www.regular-expressions.info/tutorial.html

(ps: With the Replace_Text Extension one at least knows what Regex features one gets based on the documentation page)

Reply to "Doc could use some "supported Regex features" part/info."

MassEditRegex changes page content model

4
Summary by Kghbln
Loman87 (talkcontribs)

Hi,

I was trying to add a category to a group of pages stored in the Page namespace (provided by Extension:Proofread_Page). The operation would have been successful if it hadn't caused the change of the pages content model too. As matter of fact pages in Page namespace have a specific content model named 'proofread-page'. MassEditRegex has changed it from 'proofread-page' to 'wikitext'. This causes a major issue in the extension functioning.

Is there a way to block this beahaviour? Anyway, I guess it should be presented to the extension users.

Thanks,

Lorenzo

Kghbln (talkcontribs)

Thanks for sharing this important information with us. I think it will be best to create a phabricator task to make the developers aware of it.

Loman87 (talkcontribs)

Hi,

I created the bug report T184982. I couldn't find a tag to identify the extension. Please edit the task to make it visible to developers. It's my first bug report :)

Kghbln (talkcontribs)

Thanks a lot. André was faster than me. I commented at the task and will keep fingers crossed.

Edits don't appear as "bot" and possibility to check "minor edit"

5
Stefahn (talkcontribs)

First of all thanks for this great extension!

The description says that edits appear as "bot", but in my case (MediaWiki 1.27.4, MassEditRegex 8.0.3 ca4642e) they only do if I'm logged in as a bot. If I'm logged in as admin, all edits appear under my usual username.

Besides it would be great if we had the possibility to mark all edits as "minor edits" (like you can do in Extension:ReplaceText).

Kghbln (talkcontribs)

I cannot confirm this for 8.3.0 so I suggest to upgrade the extension and test again. Did mass editing on <s-mw.o> lately which everything marked as bot though I am not in the bot group.

I guess it is best to create a task on Phabricator and add @Malvineous: as a subscriber for your feature request.

The more I think about it the more I believe that it will be cool if one could select if it should be marked as bot edit and/or minor edit prior to hitting "Go!".

Stefahn (talkcontribs)

Sorry, my fault. Edits appear as bot edits in both 8.0.3 and 8.3.0. I didn't know that the "B" (for "bot") is only shown under Special:RecentChanges and not under the version history of the edited page (at least this is the case in MediaWiki 1.27.4).

Kghbln (talkcontribs)

Thanks for reporting back. Did you create a task on phabricator for your feature request?

Stefahn (talkcontribs)

No, I didn't. You can if you like.

Incompatible with MW 1.28+?

4
Summary by Kghbln

The new version 8.2.0 of this extension is compatible with MW 1.28 and later

182.245.242.53 (talkcontribs)

Hi,when I click the "special:MassEditRegex"link,my browser show a "http error 500",I use 1.28. please help, thank you

Kghbln (talkcontribs)

Thanks a lot for reporting this issue. Indeed this extension is not (yet) compatible with the MW 1.28 branch. Thus I have reported this issue on phabricator (T152605)

Kghbln (talkcontribs)
Kghbln (talkcontribs)

Version 8.2.0 is out (zip) that fixes the issue reported. Thanks go to @Paladox

Does MassEditRegex work with MW 1.27?

2
Summary by Kghbln

MassEditRegex works with MW 1.27.x

Deletedaccount4567435 (talkcontribs)

Does MassEditRegex work with MW 1.27?

Kghbln (talkcontribs)

Yes

There are no older topics