[ckan-dev] fi.thedatahub.org installation - some help needed

David Read david.read at okfn.org
Mon Jan 16 11:25:01 UTC 2012


On 16 January 2012 11:24, Jaakko Louhio <jaakko.louhio at floapps.com> wrote:
> On Mon, 16 Jan 2012 12:59:38 +0200, David Read <david.read at okfn.org> wrote:
>
>> On 16 January 2012 08:35, Jaakko Louhio <jaakko.louhio at floapps.com> wrote:
>>>>
>>>> On 13 January 2012 03:05, Henri Ahti <henri.ahti at gmail.com> wrote:
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>> We are currently installing ckan to fi.thedatahub.org. We used package
>>>>> installation on ubuntu 10.04 server according to these instructions:
>>>>> http://readthedocs.org/docs/ckan/en/latest/install-from-package.html.
>>>>> However, there seems to be extra '?id=None' -parameter that is appended
>>>>> to
>>>>> some links, for example to 'Search' -link
>>>>> (http://fi.thedatahub.org/dataset?id=None), and that of course screws
>>>>> up
>>>>> the search (adds an extra unwanted search filter). There are several
>>>>> other
>>>>> places, even when creating a new package. So, it seems that there is
>>>>> extra
>>>>> get -parameter that is for whatever reason carried around. Do you have
>>>>> any
>>>>> idea what might cause this and how to fix it?
>>>>
>>>>
>>>>
>>>> What causes this is Routes config (the url generation in Pylons). We
>>>> have seen this before. What is happening here is that Pylons can
>>>> operate in different modes and in the strict mode (which we are now
>>>> use) it won't default any parameters which can have the affect of this
>>>> ?id=None showing up. I have to say we thought this was completely
>>>> eliminated (e.g. it does not happen on thedatahub.org) so surprised
>>>> you are encountering it.
>>>>
>>>> How are you generating these links that get the id=None parameter? For
>>>> example we are generating search link (which goes to /dataset) on the
>>>> front page by doing:
>>>>
>>>> url_for(controller='package', action='index')
>>>
>>>
>>>
>>> We have default out of the box install from package repository on ubuntu
>>> 10.04 that gives us problems with links having extra ?id=None parameter.
>>> We don't have a custom theme for now. For example, each of the links at
>>> layout_base menu have this extra parameter and they are generated as
>>> such:
>>>
>>>  <span py:if="h.check_access('package_create')">
>>>   ${h.nav_link(c, _('Add a dataset'), controller='package',
>>> action='new')}
>>>  </span>
>>>  ${h.nav_link(c, _('Search'), controller='package', action='index'
>>>  , highlight_actions = 'new index')}
>>>  ${h.nav_link(c, _('Groups'), controller='group', action='index')}
>>>  ${h.nav_link(c, _('About'), controller='home', action='about')}
>>
>>
>> Jaako,
>>
>> To help, I've summarised the change we made to the Routes config here:
>> http://trac.ckan.org/ticket/1651
>>
>> I can't reproduce your behaviour on our clean Ubuntu 10.04 install or
>> by playing around with the Routes version or Routes config.
>>
>> Do check your Routes version is 1.11 though:
>>
>> $ pip freeze | grep Routes
>>
>> You could try changing map.explicit=False to see if that helps
>> (although there will likely be other URLs messed up). Otherwise, I
>> suggest you'll have to debug why Routes is acting differently, due to
>> our different environments.
>>
>> David
>>
>
> Thank you! That did the trick! Package installation installed Routes
> version 1.12.3 and downgrading it to version 1.11 fixed the ?id=None
> issue.

Please to hear it! We'll see if we can reproduce the install doing
this. Regards,

David

>
> Jaakko
>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev




More information about the ckan-dev mailing list