Extension talk:MassEditRegex

Unlike ReplaceText, MassEditRegex has no function for page-title renaming

3
Slgrandson (talkcontribs)

That much I finally realised minutes ago. So to developer @Malvineous: Can you look into adding this feature in a future update? (Speaking on behalf of the Miraheze community, whose farm switched from ReplaceText early this year.) --Slgrandson (talk) 13:32, 26 March 2023 (UTC)

Malvineous (talkcontribs)

Sorry for the late response, I don't seem to get notifications of messages here. I'm not actively working on this extension due to time constraints but I am happy to merge patches if anyone else wishes to add this functionality. -- Malvineous (talk) 11:50, 3 October 2023 (UTC)

Slgrandson (talkcontribs)

@Malvineous:

  1. I may file a request at WM Phabricator, thus making my début there.
  2. What's been keeping you busy lately?

(Typing from my Galaxy Tab A.)

--Slgrandson (talk) 12:27, 3 October 2023 (UTC)

Reply to "Unlike ReplaceText, MassEditRegex has no function for page-title renaming"

renaming file links?

1
38.15.68.177 (talkcontribs)

when i move a file page then use masseditregex to rename all backlinks to the old name, it looks like it only renames escaped links ([[:file:foo.png]]), but not when it's used as an image ([[file:foo.png]]). is there a setting i can toggle to have it rename non-escaped file links?

Reply to "renaming file links?"
Dimpizzy (talkcontribs)

Is there any way to edit all pages in the Main namespace, even though those pages don't have a prefix? If not, I think that would be a good addition to the extension.

Flyingratchet (talkcontribs)

I have the same question—tried to play around with a regex that would capture all titles but that didn't work.

Dimpizzy (talkcontribs)

I found a good solution. Go to Special:AllPages, and just select then copy the list of pages. And paste all that into the list of pages box on MassEditRegex.

Reply to "Editing all pages?"
2A02:C7C:D484:3500:CD23:2D41:FE86:4CE5 (talkcontribs)

Having upgraded from MW 1.35.0 to 1.39.1, and PHP 7.4 to to 8.0.26, this extension no longer works.

Every page returns the error message, unable to open /extensions/MassEditRegex/MassEditRegex.special.php , as requested by /includes/AutoLoader.php

This is a file which isn't included in the extension.

2A02:C7C:D484:3500:CD23:2D41:FE86:4CE5 (talkcontribs)

False alarm - a full reinstall of the extension solved the problem. Weird, but something must have broken in the transfer.

Reply to "MW 1.39.1 issue"

Loss of Execute in browser functionality

1
Pspviwki (talkcontribs)

Starting with version 1.38.2 "Execute in browser" check works only for "Show preview". If checked and "Execute" is attempted, a popup window opens as usual but no action happens. Running without Execute in browser check works, but it is much slower than in 1.37.2. Execute in browser is useful as it does not suffer from timeouts for big updates (limited by 50 pages at the time only). Detected in version 8.4.1 (bed9fa2) 07:08, 6 July 2022, Environment: MediaWiki 1.38.2, PHP 7.4.30 (fpm-fcgi), MariaDB 10.8.3-MariaDB, ICU 71.1.

Reply to "Loss of Execute in browser functionality"

Editing pages of a certain namespace?

2
Kghbln (talkcontribs)

I'd like to add something to a certain namespace. Thus I entered "Namespacename:" for the page prefix option. The preview works fine however when trying to actually do the changes I get "Error: The MediaWiki API returned the error code invalidtitle: Bad title "File:"." I am not sure if this is a bug or feature request.

Teltura01 (talkcontribs)

I am encountering this same issue. The Show Preview button shows exactly what I want, with all pages in the namespace getting altered, but attempting to Execute (with "Execute in Browser") results in the "invalidtitle" pop-up. However, running with "execute in browser" unchecked seems to work--it's just that I've got many tens of thousands of articles to affect, so it stops after the first 1000.

Reply to "Editing pages of a certain namespace?"
2600:1700:4BA0:8430:446C:D3A3:894E:E849 (talkcontribs)

In MediaWiki 1.3.1 and above, Extension:Replace Text is included by default and only needs enabled.


Is there any functionality that this extension provides that is not covered by that one?

Kghbln (talkcontribs)

What do you meant with redundant value? Anyhow it has a different approach and the regex functionality is more versatile.

Reply to "Redundant Value?"

Adding content to the very top of every page

2
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

Dinoguy1000 (talkcontribs)

IDK if you tested this, but working just from regex (since I've never used this extension and it might behave differently than expected), the match fragment /^/ should work, with replacement MyContent\n.

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

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?"

How to rename a category?

2
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?"
Return to "MassEditRegex" page.