okfn / ckanext-tsbsatellites

repo for Satellites Catapult's CKAN
http://data.satapps.org/
GNU Affero General Public License v3.0
3 stars 3 forks source link

Map and language selector not working (wrong site url?) #26

Closed amercader closed 10 years ago

amercader commented 10 years ago

Although we have this in the ini file

ckan.site_url = http://185.30.10.28:8081

The body tag contains

<body data-site-root="http://185.30.10.28/" data-locale-root="http://185.30.10.28/" >

I suspect that is causing the problems

@nigelbabu as you looked into ckan/ckan#1632 maybe you know what might be going on?

vitorbaptista commented 10 years ago

@amercader That data-site-root and data-locale-root are populated by calling h.url('/', qualified=True), which doesn't use ckan.site_url. It's delegated down the stack to routes which should, in theory, add the correct host/port pair.

I can't reproduce this when using paster locally, can you?

nigelbabu commented 10 years ago

This is because CKAN is not aware it's visited on port 8081 because of the proxying For me, the fix for this is to visit the site through an SSH tunnel. I added the entry into site_url in the hopes of fixing it, but it should actually be removed.

amercader commented 10 years ago

@vitorbaptista @nigelbabu makes sense, thanks