Extension talk:Loops

Jump to navigation Jump to search

About this board

Old messages until January 2, 2012 are archived.


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.

Dg.de (talkcontribs)

I don't understand how to increase maxLoops. What I finally have to write into the LocalSettings? I tried: $maxLoops = 120; or: ExtLoops::$maxLoops = 120; but failed, no effect at all. May anyone help me writing the correct syntax?

Danwe (talkcontribs)

There was a bug in the extension so the variable had no effect. If you require this feature you should update to the latest version.

Reply to "how to increase maxLoops?"

$egLoopsEnabledFunctions - Backwards settings

4
Alexia E. Smith (talkcontribs)

All functions are enabled by default, but there is a setting to enable functions. This logic is broken. There really should be a setting for which functions to disable.

Danwe (talkcontribs)

In your opinion, what is broken about this? You can have problems both ways, when only having a setting to enable or disable certain functions. The reason why I chose to allow enabling only certain functions instead of defining which ones should be disabled is because when introducing new functions, the admin who is updating the extension might not realize that there are new ones. Suddenly users of the wiki could start writing new templates using that function which should actually be disabled. This doesn't happen when having the option for exclusively enabling because here all previously enabled functions will still work, only newly introduced ones might not until some admin explicitly adds them. Anyhow, admins should always read the changelog when updating extensions to adjust configs if desired.

76.164.170.2 (talkcontribs)

I can see Alexia's point on the extension. I've had to do some edits to help build this extension into my wiki farm. If you don't mind, I would like to commit it to the repo for your review when I finish making sure it's hundred percent ready.

This post was posted by 76.164.170.2, but signed as ProgramCeltic.

Danwe (talkcontribs)

Sure, looking forward to see your changes.

Reply to "$egLoopsEnabledFunctions - Backwards settings"