[ckan-dev] Problem with custom fields only new datasets
Michael Reichart
michael.reichart at gmail.com
Fri Jul 4 05:52:39 UTC 2014
No I'm not using the standard "extra fields" only the custom fields ...
You can see the form here:
https://github.com/OpenDataPortal-AT/ckanext-odpat-form/blob/master/ckanext/odpat_form/templates/package/snippets/package_metadata_fields.html#L25
The field "attribute_description" is one of the fields that doesn't work,
the field "metadata_linkage" right above works ...
The controller code is here:
https://github.com/OpenDataPortal-AT/ckanext-odpat-form/blob/master/ckanext/odpat_form/controllers/odpat.py#L327
But that's already the version where I also tried setting the data
hardcoded in source ... I also tried the standard function "new_metadata"
and tried using the original package controller.
My schema is here:
https://github.com/OpenDataPortal-AT/ckanext-odpat-form/blob/master/ckanext/odpat_form/plugin.py#L76
The actual (released) version is found under: data.opendataportal.at
As I've said before, editing an existing dataset works, the problem is only
when storing a new dataset.
Thanks!!
Michael
2014-07-04 1:14 GMT+02:00 <Qifeng.Bai at csiro.au>:
> Are you using ‘extra fields’ as well? - you can add /delete those
> fields
>
>
>
> If you are using ‘extra fields/’, then the custom fields won’t work. That
> is my understanding
>
>
>
> *From:* ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] *On Behalf Of *Michael
> Reichart
> *Sent:* Thursday, 3 July 2014 9:42 PM
> *To:* CKAN Development Discussions
> *Subject:* [ckan-dev] Problem with custom fields only new datasets
>
>
>
> Hi,
>
>
>
> we have added serveral custom fields in our datasetform and adapted the
> schema like described in the docs.Everything works fine when we are saving
> an existing dataset - all custom fields are correct mapped and stored.
>
>
>
> But if we create a new dataset some of the fields (6 of the custom fields,
> everytime the same ones) are not getting stored. These fields are located
> at the 3rd step of creating a new dataset (after uploading/linking a
> resource). There are other custom fields in this step which are working
> perfectly.
>
>
>
> Any ideas what the problem could be? I even tried to implement the
> function "new metadata" in a custom package controller. It seems like the
> data is correct in the data_dict before updating the dataset, but the
> fields are missing in the object returned from get_action(package_update)...
>
>
>
> We're using CKAN 2.2
>
>
>
> Thanks!
>
>
>
> Michael
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140704/ba5e49d1/attachment-0003.html>
More information about the ckan-dev
mailing list