[ECODP-dev] EU ODP ckan bug

John Glover john.glover at okfn.org
Mon Aug 12 13:57:51 UTC 2013


Hi Bert,

That is actually the expected behaviour of those commands (with the
exception of the incorrect redirect on the trash page).

Deleting a dataset puts it into the 'deleted' state, so it is now shown on
the portal but is still in the database. To purge individual datasets you
can use the dataset purge paster command:

paster dataset purge <dataset-name/id> -c <path to config file>

The other purge command that you are running only purges the resource
revision history for a given publisher, not deleted datasets. There is no
current command to purge all of the deleted datasets belonging to a given
publisher.

The trash page can indeed be used to purge either specific deleted datasets
or all deleted datasets from the database, but it is not publisher specific.

Regards,
John


On 9 August 2013 15:20, Bert Van Nuffelen <bert.van.nuffelen at tenforce.com>wrote:

> Hi,
>
> in addition
>
> Dimitrios pointed me out to this page:
>
> https://odp.tenforce.com/data/ckan-admin/trash<http://odp.tenforce.com/data/ckan-admin/trash>
>
> where I clicked "Purge them all" button
>
> It seems to work, but the button is redirected to the wrong page.
>
> best,
>
> Bert
>
>
>
> 2013/8/9 Bert Van Nuffelen <bert.van.nuffelen at tenforce.com>
>
>> Hi,
>>
>> the following scenario creates confusion and should be resolved properly.
>>
>> 1. rdf2ckan uploaded a dataset using api as user
>> 2. login on the webinterface as api
>> 3. delete the package
>> 4. purge the publisher
>>
>> => expected the dataset is removed from the database
>> however it remains in the database.
>>
>>
>> The purging is done with the next REST call:
>>
>> #!/bin/bash
>>
>> USERHOME=/applications/ecodp/users/ecodp
>> CKANHOME=$USERHOME/ckan
>> CKANAPI=http://localhost:8008
>>
>> # clear the publisher content
>> if [ $# -lt 2 ] ; then
>>    echo "2 arguments are mandatory"
>>    echo "arg1 the CKAN publisher id"
>>    echo "arg2 the CKAN api key"
>>    exit
>>    fi
>>
>> JSON="{\"group\":\"$1\"}"
>>
>> curl $CKANAPI/data/api/action/purge_revision_history -H "Authorization:
>> $2" -d "$JSON"
>>
>> best,
>>
>> Bert
>>
>>
>> --
>> Bert Van Nuffelen
>>
>> Semantic Technologies Software Architect at TenForce
>> www.tenforce.be
>>
>> Bert.Van.Nuffelen at tenforce.com
>> Office: +32 (0)16 31 48 60
>> Mobile:+32 479 06 24 26
>> skype: bert.van.nuffelen
>>
>
>
>
> --
> Bert Van Nuffelen
>
> Semantic Technologies Software Architect at TenForce
> www.tenforce.be
>
> Bert.Van.Nuffelen at tenforce.com
> Office: +32 (0)16 31 48 60
> Mobile:+32 479 06 24 26
> skype: bert.van.nuffelen
>
> _______________________________________________
> Ecodp-dev mailing list
> Ecodp-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ecodp-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.okfn.org/mailman/private/ecodp-dev/attachments/20130812/c18a9880/attachment.html>


More information about the ecodp-dev mailing list