That comes from Ploticus. Seen in production.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Declined | PRODUCTION ERROR | None | T157644 Shell error from "pdftotext" and "pdfinfo" commands (e.g. "Syntax Error: Invalid XRef entry") | ||
Open | None | T157850 Interacting with Wikimedia logs should be a pleasant experience | |||
Resolved | PRODUCTION ERROR | MaxSem | T157646 wfShellExec errors end up in HHVM log | ||
Resolved | mmodell | T155525 MW-1.29.0-wmf.10 deployment blockers | |||
Resolved | PRODUCTION ERROR | Seb35 | T138036 proc line: 2959: warning: points must have either 4 or 2 values per line |
Event Timeline
Apparently EasyTimeline saves the error output to mwstore://local-multiwrite/timeline-render/$hash . So maybe we can dig in Swift and see whether we can find something helpful?
I also thought about adding a wfDebug() call whenever there is some error output. Something like:
diff --git a/Timeline.body.php b/Timeline.body.php index 87e7ec6..d342bb3 100644 --- a/Timeline.body.php +++ b/Timeline.body.php @@ -172,6 +172,8 @@ class Timeline { ] ); $err = Sanitizer::decodeCharReferences( $err ); + wfDebug("Timeline: error: $err"); + // Now convert back to HTML again $encErr = nl2br( htmlspecialchars( $err ) ); $txt = "<div class=\"error\" dir=\"ltr\"><tt>$encErr</tt></div>";
This error seems to occur when there is an issue with input data passed to Ploticus.
We probably need to add more context on this error message, for example to know the calling page.
One has to introduce the MediaWiki recent logging interface and add a bunch of logging all over the place. It is not that difficult but that takes a while.
I eventually got involved in fixing EasyTimeline bug T22825, so maybe I will next take care of adding logging.
Change 335035 had a related patch set uploaded (by Hashar):
[wmf/1.29.0-wmf.9] debug log EasyTimeline error
Change 335038 had a related patch set uploaded (by TTO):
Include article name in Ploticus error messages
Mentioned in SAL (#wikimedia-operations) [2017-01-30T15:42:08Z] <hashar@tin> Synchronized php-1.29.0-wmf.9/extensions/timeline/Timeline.body.php: debug log EasyTimeline error - T138036 (duration: 00m 46s)
With the above debug log patch, we get errors from ocwiki such as:
ocwiki 1.29.0-wmf.9 AdHocDebug INFO: Timeline: error: EasyTimeline 1.90<br /> <br /> Timeline generation failed: 7 errors found<br /> Line 62: bar:1841 from:0 till: 754<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '754' not within range as specified by command Period.<br /> <br /> <br /> Line 69: bar:1876 from:0 till: 705<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '705' not within range as specified by command Period.<br /> <br /> <br /> Line 76: bar:1911 from:0 till: 761<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '761' not within range as specified by command Period.<br /> <br /> <br /> Line 77: bar:1921 from:0 till: 615<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '615' not within range as specified by command Period.<br /> <br /> <br /> Line 78: bar:1926 from:0 till: 583<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '583' not within range as specified by command Period.<br /> <br /> <br /> Line 79: bar:1931 from:0 till: 562<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '562' not within range as specified by command Period.<br /> <br /> <br /> Line 80: bar:1936 from:0 till: 560<br /> <br /> - Plotdata attribute 'till' invalid.<br /> Date '560' not within range as specified by command Period.<br /> <br />
I found a couple pages showing EasyTimeline errors:
https://oc.wikipedia.org/wiki/Sant_Martin_d%27Entraunas
https://oc.wikipedia.org/wiki/Marmagne_(C%C3%B2sta_d%27Aur)
They are both using the template https://oc.wikipedia.org/wiki/Template:DemogFR
The template looks like:
PlotData= color:barra width:14 align:left bar:1793 from:0 till: {{#ifeq:{{{1793|}}}||1|{{{1793|}}}}} bar:1800 from:0 till: {{#ifeq:{{{1800|}}}||1|{{{1800|}}}}} ^
I believed the extra space leads to bar:1872 from:0 till: 510 and thus the Plotdata attribute 'till' invalid.. It is not it.
Actual error shows up like:
Line 68: bar:1872 from:0 till: 584 - Plotdata attribute 'till' invalid. Date '584' not within range as specified by command Period.
The model eventually invokes:
{{Timeline/Talha|{{{2009}}}|{{{max|{{{1821|{{{1836|0}}}}}}}}}}}
https://oc.wikipedia.org/w/index.php?title=Mod%C3%A8l:Timeline/Talha&action=edit
Eventually in https://oc.wikipedia.org/wiki/Sant_Martin_d%27Entraunas I have passed a parameter max to the Demografia template and that fixed the rendering :]
Another use case: https://fr.wikipedia.org/wiki/Arrondissement_de_Gourdon which use a similar template and ends up being bugged due to max.
Change 335374 had a related patch set uploaded (by Hashar):
Extract hash mecanism to a standalone method
I am slightly enhancing timeline so we can eventually have nice structured logging. Might help later on. Notably the error output is sent to Swift which is rather inconvenient. Might as well just push it to logstash.
I investigated this issue on a MediaWiki 1.35 and was able to fix it, so I reopen it and will soon prepare the commit associated with the details below.
When there are multiple entries in a LineData section, they are transformed into Ploticus language (example):
#proc line linedetails: width=2 color=black style=0 points: 07/03/2012(s) 1.26 07/03/2012(s) 2.68 #proc line linedetails: width=2 color=black style=0 points: 27/03/2015(s) 1.26 27/03/2015(s) 2.68
But Ploticus does not like much multiple #proc line without a blank line between them. So it is sufficient to add a blank line between these sections #proc line in EasyTimeline.pl in the corresponding loop:
diff --git a/EasyTimeline.pl b/EasyTimeline.pl index a4dcb00..ccc5608 100755 --- a/EasyTimeline.pl +++ b/EasyTimeline.pl @@ -4478,9 +4478,8 @@ sub PlotLines { $script .= " points: $Points[0] $Points[1] $Points[2] $Points[3]\n"; } + $script .= "\n"; } - - $script .= "\n"; } sub ColorPredefined {
No, it‘s really this issue. It was closed because it is only a warning without consequences and was silenced in Wikimedia environment, but it still appears on third-party installations, so a deeper fix will be better.
Change 682610 had a related patch set uploaded (by Seb35; author: Seb35):
[mediawiki/extensions/timeline@master] Fix a warning when there are multiple entries in a LineData section.
Change 682610 merged by jenkins-bot:
[mediawiki/extensions/timeline@master] Fix a warning when there are multiple entries in a LineData section.