[ckan-dev] Error when editing dataset name

Nigel Babu nigel.babu at okfn.org
Wed Jun 18 04:00:19 UTC 2014


Yay!

On Tue, Jun 17, 2014 at 11:30:48AM +0200, Rachel Knowler wrote:
> Hi Nigel,
>
> Thanks for sending that link. The new docs are a lot better than the
> ones I'd been following.
>
> I think the specific problem I had with editing the dataset name was
> due to the name already being editable on the dataset edit page, but
> I somehow didn't realise this because (a) it was labelled URL and
> (b) you need to click an extra button to change it. Everything's
> working now. :-)
>
> Cheers,
> Rachel
>
> On 16.06.2014 06:17, Nigel Babu wrote:
> >Hi Rachel
> >
> >I'm sorry about having old documentation lying around. The CKAN docs site has
> >a much better example of how to do this:
> >
> >http://docs.ckan.org/en/latest/extensions/adding-custom-fields.html
> >
> >Can you try that one and let us know if you can get things working?
> >
> >
> >On Fri, Jun 13, 2014 at 12:13:54PM +0200, Rachel Knowler wrote:
> >>Hi dev list,
> >>
> >>I'm writing a CKAN extension to add some custom metadata fields to
> >>datasets, and allow manual editing of them. I followed these
> >>instructions and had no problems: https://github.com/ckan/ckan/wiki/How-to-Add-Custom-Fields-to-CKAN-2.0
> >>
> >>However, I ran into trouble when adding the dataset name as a field
> >>on the edit page. With this field included in the template
> >>package/snippets/package_metadata_fields.html, any attempt to update
> >>the dataset gives the response 500 Server Error. This happens even
> >>if no values have been changed.
> >>
> >>Server logs from an example attempt:
> >>
> >>==> ckan_default.error.log <==
> >>[Fri Jun 13 09:59:43 2014] [error] [client 172.94.43.1] Error -
> >><type 'exceptions.TypeError'>: expected string or buffer
> >>[Fri Jun 13 09:59:43 2014] [error] 2014-06-13 09:59:43,154 INFO
> >>[ckan.lib.base]  /dataset/edit/stst_schulwesen render time 0.021
> >>seconds
> >>
> >>==> ckan_default.custom.log <==
> >>172.94.43.1 - - [13/Jun/2014:09:59:43 +0000] "POST
> >>/dataset/edit/stst_schulwesen HTTP/1.1" 500 7583
> >>"http://stadtzh.lo/dataset/edit/stst_schulwesen" "Mozilla/5.0 (X11;
> >>Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101 Firefox/29.0"
> >>
> >>==> ckan_default.error.log <==
> >>[Fri Jun 13 09:59:43 2014] [error] 2014-06-13 09:59:43,352 INFO
> >>[ckan.lib.base]  /api/i18n/de render time 0.018 seconds
> >>
> >>==> ckan_default.custom.log <==
> >>172.94.43.1 - - [13/Jun/2014:09:59:43 +0000] "GET /api/i18n/de
> >>HTTP/1.1" 200 1949 "http://stadtzh.lo/dataset/edit/stst_schulwesen"
> >>"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:29.0) Gecko/20100101
> >>Firefox/29.0"
> >>
> >>---
> >>
> >>I've replicated this on my local CKAN instance and on a Digital
> >>Ocean server (both using Vagrant boxes). I've tried redirecting the
> >>return URLs as described here
> >>(http://docs.ckan.org/en/769-docs-reorg/form-integration.html) but
> >>this made no difference.
> >>
> >>Can anybody see where the problem is? Thanks a lot.
> >>
> >>- Rachel
> >>
> >>--
> >>Liip AG // Limmatstrasse 183 // CH-8005 Zürich
> >>Tel +41 43 500 39 80 // Mob +41 78 658 26 12 // www.liip.ch
> >>
> >>_______________________________________________
> >>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
> >--
> >Nigel Babu
> >Developer, Open Knowledge
> >_______________________________________________
> >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
>
> --
> Liip AG // Limmatstrasse 183 // CH-8005 Zürich
> Tel +41 43 500 39 80 // Mob +41 78 658 26 12 // www.liip.ch
>
> _______________________________________________
> 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

--
Nigel Babu
Developer, Open Knowledge



More information about the ckan-dev mailing list