Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants