Options type API not working

Hi, I have updated to Kirby 3.9 and I have a Nationality custom field for the users blueprint as follows:

  label: Nacionalidad
  type: select
  translate: false
    type: api
    url: https://raw.githubusercontent.com/Dinuks/country-nationality-list/master/countries.json
    text: "{{ item.en_short_name }}"
    value: "{{ item.en_short_name.slug }}"

But the select only gets the latest item:

This is the JSON I’m using:

I’m missing something?

This issue is supposed to be fixed in 3.9: OptionsApi: Fix usage without query, add support for simple arrays by lukasbestle · Pull Request #4987 · getkirby/kirby · GitHub

1 Like

I’ve used it with Query too and, naturally, another JSON but with the same output.

The slug part seems to be the problem. If you remove it, it should work

1 Like

Yes, now it’s working!
If I may, why is .slug a problem? It’s in the docs

Yes, I know, I was trying to test if it works with the other example in the docs but ran into a certificate issue instead.

So the slug bit not working might be a bug or the docs not correct.

Or did it work in a prior version? Then it would be a regression…

Yes, over 3.7 it was working fine

Could you please create an issue on GitHub then? Thanks!

1 Like