[Bug] page_image entry (with empty value) added to page_props for entities with no relevant page image
Closed, ResolvedPublic

Description

page_image is currently always set and added to the page_props table, even if there is no relevant image. Instead of not adding the property, the property is added with a blank value.

e.g. for https://www.wikidata.org/wiki/Q5160

select * from page_props where pp_page = 6102;
+---------+--------------+------------------------------------------------------------------------------------------------------------------------------------------+------------+
| pp_page | pp_propname  | pp_value                                                                                                                                 | pp_sortkey |
+---------+--------------+------------------------------------------------------------------------------------------------------------------------------------------+------------+
|    6102 | displaytitle | <span class="wikibase-title ">
<span class="wikibase-title-label">'Are'are</span>
<span class="wikibase-title-id">(Q5160)</span>
</span> |       NULL |
|    6102 | page_image   |                                                                                                                                          |       NULL |
|    6102 | wb-claims    | 7                                                                                                                                        |          7 |
|    6102 | wb-sitelinks | 6                                                                                                                                        |          6 |
+---------+--------------+------------------------------------------------------------------------------------------------------------------------------------------+------------+
4 rows in set (0.00 sec)

we should instead should just not set the page_image property in the ParserOutput in this case. This is how it is done for wikitext pages.

aude created this task.Oct 28 2015, 6:37 AM
aude updated the task description. (Show Details)
aude raised the priority of this task from to Needs Triage.
aude added a subscriber: aude.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 28 2015, 6:37 AM
aude updated the task description. (Show Details)Oct 28 2015, 6:38 AM
aude set Security to None.

Change 249355 had a related patch set uploaded (by Aude):
Don't set page_image property when there is no 'best' image

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

Change 249355 merged by jenkins-bot:
Don't set page_image property when there is no 'best' image

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

Change 249445 had a related patch set uploaded (by Aude):
Don't set page_image property when there is no 'best' image

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

thiemowmde closed this task as Resolved.Oct 28 2015, 6:05 PM
thiemowmde triaged this task as Normal priority.
thiemowmde edited projects, added Wikidata-Sprint-2015-10-13; removed Patch-For-Review.

Oh. I wrote the code how it was because I had, for some reason, the impression a page property is deleted by setting it to null.

Change 249445 abandoned by Aude:
Don't set page_image property when there is no 'best' image

Reason:
at this point, i think it's ok to wait until next scheduled deployment on wednesday

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