Page MenuHomePhabricator

Redirects should not be in wb_terms table
Closed, ResolvedPublic

Description

Found them while checking the table:

mysql:wikiadmin@db1092 [wikidatawiki]> select * from wb_terms where term_full_entity_id is null order by term_entity_id asc limit 100;
+-------------+----------------+---------------------+------------------+---------------+-------------+------------------------------------------------------------------------+------------------------------------------------------------------------+-------------+
| term_row_id | term_entity_id | term_full_entity_id | term_entity_type | term_language | term_type   | term_text                                                              | term_search_key                                                        | term_weight |
+-------------+----------------+---------------------+------------------+---------------+-------------+------------------------------------------------------------------------+------------------------------------------------------------------------+-------------+
|   512962682 |        3091008 | NULL                | item             | fr            | alias       | Caméléon verruqueux                                                    | caméléon verruqueux                                                    |           0 |
|   512962687 |        3091008 | NULL                | item             | ceb           | alias       | Chamaeleon monilifer                                                   | chamaeleon monilifer                                                   |           0 |
|   512962686 |        3091008 | NULL                | item             | fr            | alias       | Furcifer verrucosus verrucosus                                         | furcifer verrucosus verrucosus                                         |           0 |
|   512962685 |        3091008 | NULL                | item             | fr            | alias       | Furcifer verrucosus semicristatus                                      | furcifer verrucosus semicristatus                                      |           0 |
|   512962684 |        3091008 | NULL                | item             | fr            | alias       | Chamaeleo verrucosus                                                   | chamaeleo verrucosus                                                   |           0 |
|   512962683 |        3091008 | NULL                | item             | fr            | alias       | Chamaeleon semicristatus                                               | chamaeleon semicristatus                                               |           0 |
|   512962688 |        3091008 | NULL                | item             | ceb           | alias       | Chamaeleo verrucosus                                                   | chamaeleo verrucosus                                                   |           0 |
|   648180164 |        3411758 | NULL                | item             | zh-hant       | description | 維基媒體消歧義頁                                                       | 維基媒體消歧義頁                                                       |           0 |
|   648180157 |        3411758 | NULL                | item             | gl            | description | páxina de homónimos de Wikimedia                                       | páxina de homónimos de wikimedia                                       |           0 |
|   648180160 |        3411758 | NULL                | item             | nds           | description | Sied för en mehrdüdig Begreep op Wikimedia                             | sied för en mehrdüdig begreep op wikimedia                             |           0 |
|   648180156 |        3411758 | NULL                | item             | cs            | description | rozcestník na projektech Wikimedia                                     | rozcestník na projektech wikimedia                                     |           0 |
|   648180158 |        3411758 | NULL                | item             | ja            | description | ウィキメディアの曖昧さ回避ページ                                       | ウィキメディアの曖昧さ回避ページ                                       |           0 |
|   648180155 |        3411758 | NULL                | item             | ru            | description | страница значений в проекте Викимедиа                                  | страница значений в проекте викимедиа                                  |           0 |
|   648180161 |        3411758 | NULL                | item             | nl            | description | Wikimedia-doorverwijspagina                                            | wikimedia-doorverwijspagina                                            |           0 |
|   648180154 |        3411758 | NULL                | item             | en            | description | Wikimedia disambiguation page

All are redirects.

Event Timeline

Overall we have 674 cases now:

mysql:wikiadmin@db1092 [wikidatawiki]> select count(*) from wb_terms where term_full_entity_id is null;
+----------+
| count(*) |
+----------+
|      674 |
+----------+
1 row in set (0.00 sec)
Addshore closed this task as Resolved.EditedSep 19 2018, 12:09 PM
Addshore claimed this task.
Addshore triaged this task as Low priority.
Addshore subscribed.

Look like no new things are being added:

MariaDB [wikidatawiki]> select count(*) from wb_terms where term_full_entity_id is null;
+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.00 sec)

So I'll mark this as resolved.

They should not?

If Q10 is a redirect to Q17, and I have a reference to Q10 in a statement, how do I look up labels for Q10 when rendering the statement for display? Does the code in question resolve redirects first?

There is already redirect handling somewhere (just verified):

This statement references Q6 which is currently a redirect to Q7, and the label renders.

image.png (169×400 px, 4 KB)

The only reference for that label in wb_terms is for Q7

MariaDB [default]> SELECT * FROM `wb_terms` where term_text = "Ima Label";
+-------------+----------------+---------------------+------------------+---------------+-----------+-----------+-----------------+-------------+
| term_row_id | term_entity_id | term_full_entity_id | term_entity_type | term_language | term_type | term_text | term_search_key | term_weight |
+-------------+----------------+---------------------+------------------+---------------+-----------+-----------+-----------------+-------------+
|           8 |              0 | Q7                  | item             | en            | label     | Ima Label | ima label       |       0.001 |
+-------------+----------------+---------------------+------------------+---------------+-----------+-----------+-----------------+-------------+
1 row in set (0.000 sec)