In T160743#3152639, @Jonesey95 wrote: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.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
Show a warning in edit preview when a template loop is detected | mediawiki/core | master | +4 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | matej_suchanek | T162149 Show a warning about template loops in edit preview | |||
Resolved | matej_suchanek | T160743 Add tracking category when a template loop is detected |
Event Timeline
Comment Actions
It seems there is already such a warning shown, from the 'parser-template-loop-warning' message: "Template loop detected: [[$1]]"?
Comment Actions
The page itself is transcluded inside #expr, the error message is not shown. Have seen the same an dewiki, where the template transclusion was part of a #ifeq and therefor the text was not shown. Was hard to find the issue.
Comment Actions
Change 359385 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/core@master] Show a warning in edit preview when a template loop is detected
Comment Actions
I just noticed that all Commons Creator Templates are being added to Category:Pages with template loops. Is there some issue with the Module:Creator used by all of them or is there some issue with incorrect categorization?
Comment Actions
I would say it's somewhere deeper since institutions get them as well. If it's a new problem, these edits may be problematic.
Comment Actions
I do not know if it is a new problem or an issue we had for months. I just noticed it today. I understood template loops in the days of just templates. Now many templates are Lua based. What lua related conditions have to be met to trigger addition of this category? Are there any ways to figure out what triggers it?
I just noticed that c:Template:LangSwitch is included, and last Friday I made very large change to c:Module:Fallback: removing many frame:preprocess calls and switching to use standard MediaWiki fallback chain instead of commons-only fallback chain. Would some changes there trigger it?
Comment Actions
Earliest date seem to be from 2017-09-08, the day I changed Module:Fallback, and Template:LangSwitch only uses that module. So most likely that code is the problem. The code is also very simple now. Anything there that looks like might be causing the issue?
Comment Actions
Change 359385 merged by jenkins-bot:
[mediawiki/core@master] Show a warning in edit preview when a template loop is detected
Comment Actions
Whatever the issue with Commons's 'Creator' template is, it's not really related to this task (other than the new error message possibly making it easier to find the problem). The code will go live this week per the usual schedule, it should be deployed to Commons on Wednesday.
Comment Actions
OK, I will create new task, If it is still an issue and I can not figure it out after the the deployment.
Comment Actions
(As a side note, when looking into this, I found a fascinating Chrome bug that affects the rendering of Template:Creator on Commons: https://bugs.chromium.org/p/chromium/issues/detail?id=764031)