Skip to end of metadata
Go to start of metadata

Unable to render {include} The included page could not be found.

(warning)  Atlassian applications allow the use of reverse-proxies within our products, however Atlassian Support does not provide assistance for configuring them. Consequently, Atlassian can not guarantee providing any support for them.

If assistance with configuration is required, please raise a question on Atlassian Answers.


Problem

Opening up a page with page title that contains special character leads to a system error after upgrade. Sample page : [ABC] Hello

The following appears on the screen as well as in  atlassian-confluence.log

Caused by: java.net.URISyntaxException: Illegal character in path at index 14: /display/<SPACEKEY>/[ABC]+HELLO
	at java.net.URI$Parser.fail(URI.java:2848)
	at java.net.URI$Parser.checkChars(URI.java:3021)
	at java.net.URI$Parser.parseHierarchical(URI.java:3105)
	at java.net.URI$Parser.parse(URI.java:3063)
	at java.net.URI.<init>(URI.java:588)
	at com.github.kristofa.brave.servlet.ServletHttpServerRequest.getUri(ServletHttpServerRequest.java:25)
	... 49 more

Diagnosis

Environment

Confluence had configured Apache Reverse Proxy Using the AJP Protocol OR Nginx.

Cause

Your current AJP configuration works for Confluence 5.8.x in terms of handling special character , wasn't working for 5.10.0 anymore.

Workaround

Apache Reverse Proxy Using the AJP Protocol

In your httpd.conf.local file, you'll most probably have the following JkOption:

JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories


The +ForwardURICompat needs to be changed for Confluence 5.10.0 to +ForwardURICompatUnparsed , resulted on the following :

JkOptions +ForwardKeySize +ForwardURICompatUnparsed -ForwardDirectories


Nginx

In your nginx.conf file,

location /<context-path> {

    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 
 
if ($request_uri ~* "/<context-path>(/.*)") { 
	proxy_pass http://<base-url>/<context-path>$1; break; 
}

proxy_pass http://<base-url>/<context-path>;
}


You can also simply add $request_uri; to your proxy_pass directive (as long as the location and context path are the same). For example: 

location /<context-path> {

    proxy_set_header X-Forwarded-Host $host;
    proxy_set_header X-Forwarded-Server $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 

proxy_pass http://<base-url>/<context-path>$request_uri;
}



  • No labels