clarin-eric / discovery-service-frontend

SPF Central Discovery Service Backend
https://www.clarin.eu/content/clarin-discovery-service
GNU General Public License v3.0
0 stars 2 forks source link

UI does not show any IdP when one IdP in the metadata source misses .titles #48

Closed andmor- closed 5 years ago

andmor- commented 5 years ago

Given the following entry present in the output of the metadata-api:

{
    "custom": {"languages": [
        "en-US",
        "en"
    ]},
    "discojuice": [
...
    {
        "country": "SE",
        "entityID": "http://adfs.nrm.se/adfs/services/trust",
        "geo": {
            "lat": 59.3247,
            "lon": 18.056
        },
        "weight": 0
    }
...
]

The Discovery Service front-end fails to display any IdP on its list. The JS console shows an error about missing .titles field on an IdP entry.

For comparison, a regular entry usually looks like this:

{
    "country": "SE",
    "entityID": "http://adfs.rkh.se/adfs/services/trust",
    "geo": {
        "lat": 53.3331,
        "lon": -6.2489
    },
    "icon": {
        "url": "https://dw.rkh.se/Logo.png",
        "width": 200,
        "height": 126
    },
    "titles": [
        {
            "language": "sv",
            "value": "Röda Korsets Högskola"
        },
        {
            "language": "en",
            "value": "Swedish Red Cross University College"
        }
    ],
    "weight": 0
}

Two IdPs had to be blacklisted [1] [2] from our feed in order for the discovery service to restart showing the IdPs list.

andmor- commented 5 years ago

When .titles exists but it is null the Discovery Service can deal with the situation. After the IdPs above were blacklisted and the functionality restored, the JS console shows many warnings like:

[DEBUG] Missing title. x: {entityid:http://sts1.vib.be/adfs/services/trust, title:null}, y: {entityid:https://auth.nfa.cz:4443/idp/shibboleth, title:National film archive}
WillemElbers commented 5 years ago

Fixed in 25eb2124e0b0ebf53e9353f8f408c8d5843bf282 and deployed in https://github.com/clarin-eric/discovery-service-frontend/releases/tag/2.0.5