Extension talk:Loops

About this board

Old messages until January 2, 2012 are archived.


Question about using Loops with the Variables extension

1
Cavila (talkcontribs)

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?

Reply to "Question about using Loops with the Variables extension"

$egLoopsCountLimit vs. $egLoopsCounterLimit

3
Justin C Lloyd (talkcontribs)

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.

Justin C Lloyd (talkcontribs)

I've opened Phabricator bug report T290577 on this.

Want (talkcontribs)

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.

Reply to "$egLoopsCountLimit vs. $egLoopsCounterLimit"

PHP Fatal error: Out of memory

2
Summary by DesignerThan

It wasn't a issue with the extension.

DesignerThan (talkcontribs)

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.

DesignerThan (talkcontribs)

It wasn't a issue with the extension.

ExtLoops::$maxLoops = -1 crashes the system

1
2607:FEA8:879F:E87B:7871:E37A:F082:2B27 (talkcontribs)

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?

Reply to "ExtLoops::$maxLoops = -1 crashes the system"

Call to undefined function wfMsgForContent()

4
Summary by Kghbln

Upgrading the extension will solve the issue

SgtLion (talkcontribs)

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!

Kghbln (talkcontribs)

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

SgtLion (talkcontribs)

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. --~~~~

Kghbln (talkcontribs)

There are so many things to think of when upgrading. Sometimes something like this just slips one's attention. No worries.

<nowiki /> tag removal from some examples

2
Summary by Kghbln

nowiki tags added back to the examples

JamesDriscoll (talkcontribs)

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)

Kghbln (talkcontribs)

This was removed in 2015 by an IP. (diff) Thanks for your note so I added these back in.

Could pages where max loops have been performed get added to a category?

2
RheingoldRiver (talkcontribs)

Similar to pages with script errors etc. I tried to add a category to the system message but it didn't work.

Kghbln (talkcontribs)

Indeed this wile be a nice enhancement.

Reply to "Could pages where max loops have been performed get added to a category?"

Works with MW 1.30.X ?

3
Summary by Kghbln

It should or report a respective bug.

Yukii (talkcontribs)

can someone say if this extension works with MW1.30.x?

Skunark (talkcontribs)

It doesn't... missing extension.json file

Kghbln (talkcontribs)

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.

Broken in 1.28: PHP Fatal error: Call to undefined method Message::escape() in Loops.php on line 360

1
Summary by Kghbln

Also use the version for MW 1.29 for MW 1.28

Ciencia Al Poder (talkcontribs)

This download extensions are antivirus software alarm Trojan

2
齐天大圣者行孙 (talkcontribs)

1.28 and 1.27 seems have trojan. can you pure it? ~~~

Kghbln (talkcontribs)

I guess you have a local problem.

Return to "Loops" page.