I'm trying to loop the calling of a Template (using #fornumargs), but all I get is the text, (no Template invocation is performed).
Extension talk:Loops
Appearance
This extension relies on the Variables extension to increment numbers as the loop continues, or whatever it is you want to do that relies on a previously defined variable. Unfortunately, because of Parsoid, the future of the Variables extension has become uncertain.
Should there be a warning of some kind on the page? Or is this one of those use cases where it is safe to carry on using Variables?
Is there a difference between these two variables or is it possibly a bug that both exist? The extension.json file defaults LoopsCountLimit
to 100 but there is no such setting for LoopsCounterLimit
. Further, this commit shows a change of $egLoopsCounterLimit
to $egLoopsCountLimit
but leaves it alone in onParserLimitReportPrepare()
at the bottom of the file.
This came up as I received a report from our editors that a certain page that uses Loops used to work fine but now it's reporting the maximum number of loops of 100 being performed despite having had $egLoopsCounterLimit
set to 1000 for many years.
The wiki in question is running MW 1.35.3 with Loops 1.0.0-beta (cloned directly from Gerrit on August 17.
EDIT: As a test, I did just also increase $egLoopsCountLimit
to 1000 on my dev wiki and it fixed the issue, so still just looking for clarification if there really are two variables or just one and this is a bug. The documentation is lacking with respect to this configuration.
I've opened Phabricator bug report T290577 on this.
I use Loops 1.0.0-beta (9a3f34f) from 10. 7. 2020, 06:46 with MW 1.35.5 (last update 25. 1. 2022, 17:36), in template pages. It's my own replacement for tag <pages />
which provide Extension:Proofread_Page.
Using this template give enhanced features for me. Because I do singlepages from books with a 500 pages and more. It's reason for using default value of the variable $egLoopsCounterLimit 2600. For template use see here.
Hello all together, I was doing a rebuild all all when I got that error: PHP Fatal error: Out of memory (allocated 7894204416) (tried to allocate 7782531104 bytes) in /www/htdocs/w014d7f1/wiki-pathfindersonline.designerthan.at/extensions/Loops/ExtLoops.php on line 111
The maintanance script is nearly at the end it is refreshing the link tables and is somewhere over 600 pages out of 211191.
How can I find the issue that causes that error. I have no clue.
It wasn't a issue with the extension.
I am on MW 1.34.1. Adding ExtLoops::$maxLoops = -1 to LocalSettings.php leads to the collapse of the system. The wiki just won't load at all. Any ideas why this might be the case?
Sadly, I've never really understood Git systems well enough. When we exceed max loops, our MW 1.31 freaks out and reports PHP error as above. Issue is in Loops.php, line 361:
return $output .= '<div class="error">' . wfMsgForContent( 'loops_max' ) . '</div>';
wfMsgForContent needs updating to wfMessage. That's all!
Thanks for suggesting the code change. A change to this line was done more than two years ago. I suspect that you did not update the Loops extension when you updated MediaWiki. Try to download the version meant for MW 1.31
Well aren't I just a dummy? I seem to remember this being because of some bug I had in that version, but I'll return with tears on my face if that happens after updatin'. Thanks kindly. --~~~~
There are so many things to think of when upgrading. Sometimes something like this just slips one's attention. No worries.
at some point in the history the example
{{#vardefine: i | 0 }}{{#while: | {{#ifexpr: {{#var: i }} < 5 | true }} |<nowiki/> * {{#var: i }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} }}
changed to
{{#vardefine: i | 0 }}{{#while: | {{#ifexpr: {{#var: i }} < 5 | true }} | * {{#var: i }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} }}
this, and other examples will only work with a the <nowiki /> tag to force a new line in the output but I don't feel qualified enough to provide a definitive answer as to which (or if there was a legitimate reason for their removal I haven't found)
This was removed in 2015 by an IP. (diff) Thanks for your note so I added these back in.
Similar to pages with script errors etc. I tried to add a category to the system message but it didn't work.
Indeed this wile be a nice enhancement.
can someone say if this extension works with MW1.30.x?
It doesn't... missing extension.json file
It should. If not you will have to report a bug. A missing "extension.json" only means that you have to invoke the extension as before.
Fixed in git commit f9fe1ad758a7447a3c96f8c3ae9ce407095c8d20 which landed in the MediaWiki 1.29 version, but was not backported to 1.28. Try downloading the 1.29 version or fix the typo manually: replace escape() with escaped()