<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
I have been attempting to fix the bug described at <a href="https://wiki.openstreetmap.org/wiki/Category_talk:Mismatched_image" id="LPlnk462667">
https://wiki.openstreetmap.org/wiki/Category_talk:Mismatched_image</a> and have got stuck. The buggy code is at line 395 of
<a href="https://wiki.openstreetmap.org/wiki/Module:DescriptionFromDataItem" id="LPlnk202950">
https://wiki.openstreetmap.org/wiki/Module:DescriptionFromDataItem</a>:
<pre><span><span class="lineno">395 </span>    <span class="kr">elseif</span> <span class="n">entityVal</span> <span class="o">==</span> <span class="n">pageVal</span> <span class="ow">or</span>
</span><span><span class="lineno">396 </span>            <span class="p">(</span><span class="n">argname</span> <span class="o">~=</span> <span class="s1">'description'</span> <span class="ow">and</span>
</span><span><span class="lineno">397 </span>                    <span class="n">self</span><span class="p">.</span><span class="n">language</span><span class="p">:</span><span class="n">caseFold</span><span class="p">(</span><span class="n">entityVal</span><span class="p">)</span> <span class="o">==</span> <span class="n">self</span><span class="p">.</span><span class="n">language</span><span class="p">:</span><span class="n">caseFold</span><span class="p">(</span><span class="n">pageVal</span><span class="p">))</span> <span class="kr">then</span>
</span><span><span class="lineno">398 </span>        <span class="c1">-- value is identical in both entity and the page</span>
</span><span><span class="lineno">399 </span>        <span class="c1">-- comparison is case-insensitive except for the description</span>
</span><span><span class="lineno"></span></span></pre>
The desired behaviour is that images (where argname is 'image' or 'osmcarto-rendering') should be matched by Mediawiki identity (File:Example 1.jpg is equivalent to Image:Example 1.jpg. file:Example 1.jpg, File:example 1.jpg and File:Example_1.jpg; it is not
 equivalent to FilE:Example 1.jpg, File:EXample 1.jpg or File:Example 1.jpeg).<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Only pages where the image is genuinely mismatched should appear in <a href="https://wiki.openstreetmap.org/wiki/Category:Mismatched_image" id="LPlnkOWALinkPreview">
https://wiki.openstreetmap.org/wiki/Category:Mismatched_image</a> and <a href="https://wiki.openstreetmap.org/wiki/Category:Mismatched_osmcarto-rendering" id="LPlnkOWALinkPreview_1">
https://wiki.openstreetmap.org/wiki/Category:Mismatched_osmcarto-rendering</a>.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Pages should render correctly without Lua errors.</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
--</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Andrew<br>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview_1 _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly93aWtpLm9wZW5zdHJlZXRtYXAub3JnL3dpa2kvQ2F0ZWdvcnk6TWlzbWF0Y2hlZF9vc21jYXJ0by1yZW5kZXJpbmc." class="LPBorder635543" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer635543" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td style="width: 100%;">
<div id="LPTitle635543" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor635543" href="https://wiki.openstreetmap.org/wiki/Category:Mismatched_osmcarto-rendering" style="text-decoration: none; color: var(--themePrimary);">Category:Mismatched osmcarto-rendering - OpenStreetMap Wiki</a></div>
<div id="LPDescription635543" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
Please note, this category does not work properly. In most cases the image is the same in both the article and the data item, but the template that adds this category does not take into account minor differences like</div>
<div id="LPMetadata635543" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
wiki.openstreetmap.org</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
<div class="_Entity _EType_OWALinkPreview _EId_OWALinkPreview _EReadonly_1">
<div id="LPBorder_GTaHR0cHM6Ly93aWtpLm9wZW5zdHJlZXRtYXAub3JnL3dpa2kvQ2F0ZWdvcnk6TWlzbWF0Y2hlZF9pbWFnZQ.." class="LPBorder176162" style="width: 100%; margin-top: 16px; margin-bottom: 16px; position: relative; max-width: 800px; min-width: 424px;">
<table id="LPContainer176162" role="presentation" style="padding: 12px 36px 12px 12px; width: 100%; border-width: 1px; border-style: solid; border-color: rgb(200, 200, 200); border-radius: 2px;">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td style="width: 100%;">
<div id="LPTitle176162" style="font-size: 21px; font-weight: 300; margin-right: 8px; font-family: "wf_segoe-ui_light", "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px;">
<a target="_blank" id="LPUrlAnchor176162" href="https://wiki.openstreetmap.org/wiki/Category:Mismatched_image" style="text-decoration: none; color: var(--themePrimary);">Category:Mismatched image - OpenStreetMap Wiki</a></div>
<div id="LPDescription176162" style="font-size: 14px; max-height: 100px; color: rgb(102, 102, 102); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; margin-bottom: 12px; margin-right: 8px; overflow: hidden;">
Pages in category "Mismatched image" The following 200 pages are in this category, out of 8,660 total. (previous page) ()</div>
<div id="LPMetadata176162" style="font-size: 14px; font-weight: 400; color: rgb(166, 166, 166); font-family: "wf_segoe-ui_normal", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">
wiki.openstreetmap.org</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<br>
</div>
</body>
</html>