Nothing Special   »   [go: up one dir, main page]

Page MenuHomePhabricator

Add tracking category when a template loop is detected
Closed, ResolvedPublic

Description

Example. These errors are not tracked anywhere.

Event Timeline

Change 343281 had a related patch set (by Matěj Suchánek) published:
Add a tracking category when a template loop is detected

https://gerrit.wikimedia.org/r/343281

Florian edited projects, added User-notice; removed Patch-For-Review.
Florian moved this task from To Triage to Announce in next Tech/News on the User-notice board.

Change 343281 merged by jenkins-bot:
[mediawiki/core@master] Add a tracking category when a template loop is detected

https://gerrit.wikimedia.org/r/343281

Hi. Could you explain why do you need this, please? There is a category for "parser-template-loop-warning". Thank you.

Having this integrated in software is better than overriding local messages. Always.

Thank you, @matej_suchanek, but if it's the same, how do I have 2,072 in your category, but not in the old one? What's the difference? I can't recognize any problem in all these pages.

Example? I bet it's a inside template you actually cannot see.

All of them have the same infobox, @matej_suchanek, and every page with it is in the category.

An update, @matej_suchanek: I checked other namespaces. There are 2,104 pages, and 4 more that have the infobox, but not included in the category.

I'm investigating it at the moment. It's clear that the category is always included with this template and vice versa. Moreover, it seems to me that it's not the infobox itself but some of the templates from the list in "Templates used on this page:" when you edit it. I'm not sure whether I will be able to identify it, given that I cannot read markup rtl :(

and 4 more that have the infobox, but not included in the category.

They are actually, I don't understand what makes the search tell the opposite.

Thank you, @matej_suchanek , but could you tell me, please, what's the difference between the old and the new category? It much less that all the cases, so i could try from my side.

They are actually, I don't understand what makes the search tell the opposite.

Why? The first, for example, has no categories at all, try the edit mode.

Thank you, @matej_suchanek , but could you tell me, please, what's the difference between the old and the new category? It much less that all the cases, so i could try from my side.

The accuracy. The old one is only added when the warning is shown (which is not mandatory for the new one).

They are actually, I don't understand what makes the search tell the opposite.

Why? The first, for example, has no categories at all, try the edit mode.

Sorry, my bad. Hm, they are all in the talk namespace... Now you need to focus on something that also checks the namespace.

The accuracy. The old one is only added when the warning is shown (which is not mandatory for the new one).

But in which cases it was not shown? The loop has more 41 templates long and less than 72? It includes modules? Something else?

Hm, they are all in the talk namespace... Now you need to focus on something that also checks the namespace.

There are no pages in talk namespaces in this category. Maybe the code does not work on talk pages at all.

The accuracy. The old one is only added when the warning is shown (which is not mandatory for the new one).

But in which cases it was not shown? The loop has more 41 templates long and less than 72? It includes modules? Something else?

When it was hidden by a complex template syntax (some parser functions etc.), for example. I wonder how important this is, though.

Hm, they are all in the talk namespace... Now you need to focus on something that also checks the namespace.

There are no pages in talk namespaces in this category. Maybe the code does not work on talk pages at all.

Ie. that there's a problem (the category) with the infobox depends at least on the namespace (which is what I actually meant previously).

When it was hidden by a complex template syntax (some parser functions etc.), for example. I wonder how important this is, though.

You mean something like {{#if:{{loop template}}|5|10}}?

Ie. that there's a problem (the category) with the infobox depends at least on the namespace (which is what I actually meant previously).

Ah. You mean that the infobox creates different code. Interesting.

You mean something like {{#if:{{loop template}}|5|10}}?

Yes. I suspect something like that.

I would be good if you shared all this with your fellows to find that mistake.

Well, @matej_suchanek, this is the problem code, translated to English

{{templatea||{{templateb|somestringa|{{:{{FULLPAGENAME}}}}||{{#ifeq:{{NAMESPACENUMBER}}|0|{{templateb|somestringb|{{{parama|}}}|[[categorya]]|[[categoryb]]}}}}}}}}

And it's the only template with this kind of check. The problem is I can't see something wrong here.

Thank you, that helped me a lot.

The problem is caused by {{:{{FULLPAGENAME}}}} (ie. return the content of the current page). When you insert the infobox, it will execute this code and will try to load the content of the current page. But then it needs to execute again this piece of code and so on... So this is the loop (and a very interesting case of it). You should find the person who inveted this and tell them about this problem.

Ah, I see, thank you very much, @matej_suchanek, for your help.

This error should generate an error message at the site of the error, at least in Preview mode, so that editors have a fighting chance of finding (or at least being able to report) the problem.