Topic on Project:Support desk

ReplaceText extension and "expansion depth limit exceeded"

9
Jonathan3 (talkcontribs)

I used ReplaceText to change the field name (e.g. |fieldname=) of a Cargo template. Dozens of pages ended up with this warning.

After undoing the edits, the pages were fine again.

Changing the field name on the same pages manually by clicking Edit and Save worked fine.

Any ideas?

I'm not sure whether this is a problem with the ReplaceText extension, or MediaWiki, or something else.

Bawolff (talkcontribs)

Can you paste the NewPP parser report report, both for the normal edit, and for the problematic edit with the warning?

Jonathan3 (talkcontribs)

In chronological order, here is the NewPP report for the old version of the page:

NewPP limit report
Cached time: 20230321102010
Cache expiry: 86400
Dynamic content: false
Complications: []
CPU time usage: 0.028 seconds
Real time usage: 0.044 seconds
Preprocessor visited node count: 390/1000000
Post‐expand include size: 7554/2097152 bytes
Template argument size: 2395/2097152 bytes
Highest expansion depth: 12/40
Expensive parser function count: 2/100
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 945/5000000 bytes

This is from the revision created by ReplaceText (resulting in the "Expansion depth limit exceeded" warning):

NewPP limit report
Cached time: 20230321101847
Cache expiry: 86400
Dynamic content: false
Complications: []
CPU time usage: 0.003 seconds
Real time usage: 0.004 seconds
Preprocessor visited node count: 3/1000000
Post‐expand include size: 0/2097152 bytes
Template argument size: 0/2097152 bytes
Highest expansion depth: 2/40
Expensive parser function count: 0/100
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 0/5000000 bytes

This is from the revision where I undo the ReplaceText revision:

NewPP limit report
Cached time: 20230321102056
Cache expiry: 86400
Dynamic content: false
Complications: []
CPU time usage: 0.029 seconds
Real time usage: 0.045 seconds
Preprocessor visited node count: 390/1000000
Post‐expand include size: 7554/2097152 bytes
Template argument size: 2395/2097152 bytes
Highest expansion depth: 12/40
Expensive parser function count: 2/100
Unstrip recursion depth: 0/20
Unstrip post‐expand size: 945/5000000 bytes
Bawolff (talkcontribs)

Huh, well clearly something weird is happening if all those limits are marked as 0.

Jonathan3 (talkcontribs)

They'd all have been done via runJobs.php. Would that make any difference?

Bawolff (talkcontribs)

It should not, but clearly something is happening that shouldn't be.

Jonathan3 (talkcontribs)

Thanks. I'll report back with more details if it happens again, and in the meantime have mentioned it on the ReplaceText talk page at Topic:Xewqzjxis4todtko.

Samwilson (talkcontribs)

I've run into this problem in the past, but I cannot now remember if I resolved it. I have a memory that it was related to the number of pages I was inserting; all the tests I did were with ten pages, then I did a hundred and they got broken with this.

Jonathan3 (talkcontribs)

Thanks. Yes for me it only happened with a large number of pages (over 100).

I've done that number of pages before, without problems, but I think maybe not a parameter name within a template. And the templates are nested a bit so it's not completely strange.

Having said that....... I have a feeling I absent-mindedly kept the "use regex" option on when replacing exactly the same template parameter name in the first 250 pages and it didn't cause the problem.

Reply to "ReplaceText extension and "expansion depth limit exceeded""