Kallithea issues archive

Issue #160: CodeMirror modeurl wrong when using proxy prefix config

Reported by: sambasama
State: resolved
Created on: 2015-09-17 18:42
Updated on: 2016-01-09 17:45

Description

Hi.

I have Kallithea using similar configuration as in issue #159. I have set a prefix configuration and I'm using apache as reverse proxy for Kallithea:

[filter:proxy-prefix]
use = egg:PasteDeploy#prefix
prefix = /kallithea

Every time I add or edit gists or files and try to select the CodeMirror editor language (for ex go lang) I see a request sent to: https://{domain}/codemirror/mode/go/go.js. It should be: https://{domain}/kallithea/codemirror/mode/go/go.js

I think this change has something to do with the problem: https://bitbucket.org/conservancy/kallithea/diff/kallithea/templates/admin/gists/edit.html?diff2=ccc005b96103&at=default

So this results in syntax highlighting not working / loading for selected language.

Attachments

Comments

Comment by Christian Oyarzun, on 2015-09-17 20:51

Comment by sambasama, on 2015-09-18 14:50

I tested the patch, still not working. I think ${h.url('')} should be ${h.url('home')} in all occurrences as ${h.url('')} renders as "" at least on my installation. Other than that the patch seems good. I currently do not have access to proper dev env, but I hope this helps.

Comment by Mads Kiilerich, on 2015-09-20 23:44

Please test the stable branch.

Comment by Mads Kiilerich, on 2015-12-22 14:23

Can you confirm it works now?

Comment by sambasama, on 2016-01-09 17:44

Works ok now in stable branch.

Comment by sambasama, on 2016-01-09 17:45

Tested latest stable branch (0.3), works ok.