ckan / ckanext-pages

A simple builtin CMS for CKAN sites
GNU General Public License v3.0
51 stars 99 forks source link

Unable to configure pages with a custom root_path #98

Open ccancellieri opened 4 years ago

ccancellieri commented 4 years ago

Hi, I'm trying to use pages with our ckan platform which has been configured using the ckan.root_path as following (in the production.ini):

ckan.root_path = /catalog

And in the who.ini we have:

[plugin:friendlyform]
use = repoze.who.plugins.friendlyform:FriendlyFormPlugin
login_form_url= /catalog/user/login
login_handler_path = /login_generic
logout_handler_path = /user/logout
rememberer_name = auth_tkt
post_login_url = /catalog/user/logged_in
post_logout_url = /catalog/user/logged_out

while in nginx we have:

    location /catalog/ {
        proxy_pass http://localhost:8080/catalog/;
        proxy_set_header Host $host;
        proxy_cache_bypass $cookie_auth_tkt;
        proxy_no_cache $cookie_auth_tkt;
        proxy_cache_valid 30m;
        proxy_cache_key $host$scheme$proxy_host$request_uri;
    }

So ckan responds to:

http://XXXXXXXXX/catalog/

When we click on the icon on top to create a page it points to:

http://XXXXXXXXX/catalog/pages

When we create a page (f.e.: public so it will be published on the header of the page) the plugin points correctly to:

http://XXXXXXXXX/catalog/pages_edit

The problem is when we click on the new link created on the header the link bring us to:

http://XXXXXXXXX/pages/test

instead of:

http://XXXXXXXXX/catalog/pages/test

I've looked around but can't find any parameter to setup that path properly on the pages plugin.

Note: Still have to test grup and organization functionnalities.