Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

The value for the 'keys' field on the Files form is empty #92

Closed
kurtfoster opened this issue May 5, 2017 · 5 comments
Closed

The value for the 'keys' field on the Files form is empty #92

kurtfoster opened this issue May 5, 2017 · 5 comments

Comments

@kurtfoster
Copy link
Contributor

The value for the 'keys' field on the Files form is empty. After fixing #91 I can retrieve the data from the CKAN site, the other fields fill in with values from the dataset, however, the keys field remains empty. I've started stepping through the code, however, it would be handy if someone could point me to where $config['keys'] gets set.

@jeremy-doghouse
Copy link
Contributor

@kurtfoster
Copy link
Contributor Author

@jeremy-doghouse , the $items array is being passed in empty.

@kurtfoster
Copy link
Contributor Author

@jeremy-doghouse , I'm still looking through this.

When i try this dataset from data.gov, the key values are filled in, however, $items in the functions you've listed are empty arrays. The lines listed above never run. The keys value, however, contains the correct values.

@jeremy-doghouse
Copy link
Contributor

@kurtsalsa the only time that should be empty would be if it was a new entity on field_load. presave should always contain something.

Maybe look at this function too: https://github.com/govCMS/govcms-ckan/blob/7.x-1.x/modules/govcms_ckan_media/includes/govcms_ckan_media.field_config.inc#L422 it handles displaying the keys

@kurtfoster
Copy link
Contributor Author

@jeremy-doghouse , the issue ended up being with the data. The function I was looking for was this one, govcms_ckan_media_visualisation_default_key_config. The 'numeric' value for $key_type didn't match with the data. We've fixed the data instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants