[ckan-dev] Recent upgrade (?) and issues

David Raznick kindly at gmail.com
Sun Jun 12 19:32:55 UTC 2011


On Sun, Jun 12, 2011 at 3:42 PM, Rufus Pollock <rufus.pollock at okfn.org>wrote:

> On 10 June 2011 16:32, David Raznick <kindly at gmail.com> wrote:
> > On Fri, Jun 10, 2011 at 1:47 PM, Rufus Pollock <rufus.pollock at okfn.org>
> > wrote:
> >>
> >> OK, I've also discovered I'm getting issues with a several other
> >> fields when using preview then save. End up with fields looking like:
> >>
> >> [u'My title', u'My title']
> >>
> >> (You can see this in history of: <http://ckan.net/package/ngcoba>).
> >> I'd like to demo this on test.ckan.net but note that is at different
> >> version (v1.4.1a v v1.4.1b) and does not seem to display the problem.
> >>
> >> Looks like this is getting converted to a list of values on way in
> >> some way. Do we have a preview test?
> >
> >
> > The error was not due to the preview it was due to the params being used
> > from url.  This only happens when using the bookmarklet as it keeps the
> > params in the url.  This has been fixed so that the form saving only uses
> > the POST part of the request.  I may need to think of better validation
> > handing as two params with the same key get turned into a list, before
> they
> > were just being conveniently deduplicated.
>
> Great to hear this is fixed. Let me know when fix has gone live to
> test.ckan.net and ckan.net.
>
I have got it working on ckan.net.  test.ckan.net has the new moderated edit
code at the moment on it and I will merge into it when that is a bit more
tested.

>
> I've just found another "bug" when tracking down the issues with the
> ckan-admin/trash purge stuff (BTW: note to all, the revisioning of
> user edits seems to be an "accident" since User objects aren't
> revisioned. Thus deleting the revisions associated to user changes has
> no effect on underlying User objects and hence is *not* a way to
> delete spam users. What we just need is a delete option on user page
> for sysadmins -- I can look into this.)
>
> When trying to purge packages in ckan-admin/trash I get error messages of
> form:
>
> Problem purging revision 0abb62c9-f1b0-4bdd-8010-1c30fff6a784: can
> only use resources on packages if there is only one resource_group.


I imagine that this is a deceptive error (made by me:)).  I think it is
because the resource_group is being purged so the resources property on the
package raises an assertion as it did not take into account a time when
there were 0 resource_groups.
Anyway, I have added a fix to for this logical error (now on ckan.net) which
may or may not fix this issue as I have not thought of solid test case yet.
Could you tell me if it does...


> I note that purge seemed to work ok for packages with only one
> revision but failed with those with more than one revision. The purge
> method in vdm works by deleting revisions 'backwards' from most recent
> and updating the continuity. It then finally deletes the continuity
> object if you delete the last revision of that object. I'm wondering
> if the vdm purge method needs updating in some way to reflect latest
> changes in core code ...?
>

There are many issues flying around due to purging at the moment and I was
going to look at them in bulk.   If you purge a package with a group it
fails too.  I am not sure this has ever worked.

Also, PackageGroup revisioning has *never* worked.  If you remove a
relationship between a package and a group it gets deleted from the
package_group table physically (instead of staying there with a delete
state).  Also a package_group revision only gets made if you attach a
package to a group and *not* if you attach a group to a package.  I have not
reported these errors as they are in the process of being sorted out, with
the work on moderated edits.

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20110612/584f2323/attachment-0001.html>


More information about the ckan-dev mailing list