Translation search hangs if col 2 doesn't exist

Let’s say you are adding French/English pairs, and delete the English column. When you search for a french word, e.g. “march” for “le marché”, you would still expect the audio to be returned. However, the search hangs there with "Search results loading… "

If we add the English column back, and try again, then it still hangs with "Search results loading… "

I can see the call to your API, and the response has the correct column order (i.e. 1 is French/Text, 5 is English/Text, 6 is Audio, 7 is Image), except the things list specifies column 2 on some of the items, which doesn’t exist and results in a “TypeError: n.columns[e] is undefined”

Please see below for json response illustrating this.

{
    "things": [{
        "attributes": [],
        "id": 107192654,
        "columns": {
            "1": {
                "alts": [],
                "val": "acteur"
            },
            "5": {
                "alts": [],
                "val": ""
            },
            "6": {
                "alts": [],
                "val": ""
            },
            "7": {
                "alts": [],
                "val": ""
            }
        }
    }, {
        "attributes": [],
        "id": 107193352,
        "columns": {
            "1": {
                "alts": [],
                "val": "l'acteur"
            },
            "5": {
                "alts": [],
                "val": "actor"
            },
            "6": {
                "alts": [],
                "val": ""
            },
            "7": {
                "alts": [],
                "val": ""
            }
        }
    }, {
        "attributes": [],
        "id": 13298649,
        "columns": {
            "1": {
                "alts": [],
                "val": "l'acte"
            },
            "2": {
                "alts": [],
                "val": "act"
            },
            "5": {
                "alts": [],
                "val": ""
            },
            "6": {
                "alts": [],
                "val": ""
            },
            "7": {
                "alts": [],
                "val": ""
            }
        }
    }, {
        "attributes": [],
        "id": 13295572,
        "columns": {
            "1": {
                "alts": [],
                "val": "l'acteur"
            },
            "2": {
                "alts": [],
                "val": "actor"
            },
            "5": {
                "alts": [],
                "val": ""
            },
            "6": {
                "alts": [],
                "val": ""
            },
            "7": {
                "alts": [],
                "val": ""
            }
        }
    }],
    "pool": {
        "attributes": {
            "3": {
                "kind": "text",
                "show_at_tests": false,
                "label": "Gender"
            },
            "2": {
                "kind": "text",
                "show_at_tests": false,
                "label": "Part of Speech"
            }
        },
        "id": 2078485,
        "columns": {
            "1": {
                "kind": "text",
                "classes": [],
                "tapping_disabled": false,
                "show_after_tests": false,
                "keyboard": "\u00e0\u00e2\u00e7\u00e8\u00e9\u00ea\u00eb\u00ee\u00ef\u00f4\u00f9\u00fb\u00fc",
                "typing_disabled": false,
                "always_show": false,
                "typing_strict": false,
                "label": "French"
            },
            "5": {
                "kind": "text",
                "classes": [],
                "tapping_disabled": false,
                "show_after_tests": false,
                "keyboard": "",
                "typing_disabled": false,
                "always_show": false,
                "typing_strict": false,
                "label": "English"
            },
            "7": {
                "kind": "image",
                "classes": [],
                "tapping_disabled": false,
                "show_after_tests": false,
                "keyboard": "",
                "typing_disabled": false,
                "always_show": false,
                "typing_strict": false,
                "label": "Image"
            },
            "6": {
                "kind": "audio",
                "classes": [],
                "tapping_disabled": false,
                "show_after_tests": false,
                "keyboard": "",
                "typing_disabled": false,
                "always_show": false,
                "typing_strict": false,
                "label": "Audio"
            }
        },
        "name": "French"
    },
    "success": true
}
1 Like