Hi!,
Like before I'm playing with a wiki with quite an old Mediawiki installed (
http://www.cruiserswiki.org/wiki/Special:Version)
We have a Widgets <http://www.mediawiki.org/wiki/Extension:Widgets>
extension installed and it appears we are not able to render a result from
#widget parser function there.
For example, at http://www.cruiserswiki.org/wiki/User:Vadim/Sandbox3 we
have:
<nowiki>{{</nowiki>#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
>
> {{#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
>
> <nowiki>{{</nowiki>#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
>
> {{#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
>
which renders to
> {{#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
>
> 41.245666666667
>
> {{#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
>
> 9.1988333333333
>
but the Parsoid gives:
{{#Widget:Dmh2Deg|d=41|m=14.74|h=N}}
>
> {{#Widget:Dmh2Deg|d=09|m=11.93|h=E}}
>
Actually in HTML code I see:
<!-- ENCODED_CONTENT PCEtLQotLT48IS0tCi0tPjQxLjI0NTY2NjY2NjY2Nw== -->
>
and
<!-- ENCODED_CONTENT PCEtLQotLT48IS0tCi0tPjkuMTk4ODMzMzMzMzMzMw== -->
>
which gives 41.245666666667 and 9.1988333333333 if base64-decoded.
I'm quite confused about this behaviour.
I wonder if someone could help me to solve this issue.
Thanks
Vadim
Hello,
Some older versions of Mediawiki (1.16) do not provide "mediatype" in
"iiprop" for media. Then its worker crashes when it tries to parse a reply
from a server.
Here is workaround for an issue:
--- ext.core.LinkHandler.js- 2015-04-22 15:30:04.000000000 +0300
+++ ext.core.LinkHandler.js 2015-04-22 17:03:11.000000000 +0300
@@ -1011,7 +1012,11 @@
// Add (read-only) information about original file size (T64881)
img.addAttribute( 'data-file-width', info.width );
img.addAttribute( 'data-file-height', info.height );
- img.addAttribute( 'data-file-type', info.mediatype.toLowerCase() );
+ if (info.mediatype) {
+ img.addAttribute( 'data-file-type',
info.mediatype.toLowerCase() );
+ }
}
if ( hasImageLink ) {
Is it possible implement it into the Parsoid.
Regards
Vadim