Some buttons and links in Confluence point to bogus URIs

Chris Leduc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 22, 2012

Good morning!

We've been using Confluence for a while, but since it's been reinstalled, there is a problem that appears for some but not all of the links and buttons in Confluence.

They point to things such as...

http://pages/editpage.action?pageId=786435

http://admin/console.action

Essentially in the source, just to take a random example of the file http://confluence.swiss-va.com/display/R/Home

<li class="normal ajs-menu-item">
        <a id="browse-menu-link" class="browse trigger ajs-menu-title" href="#"><span><span>Browse</span></span></a>         <div class="assistive ajs-drop-down">
                        <ul  id="browse-menu-link-leading"                 class="section-leading first">
                                        <li>
    
        
    
    <a  id="space-pages-link" href="//pages/listpages.action?key=R"  class=""   title="Browse pages in the Relaunch 2013 space">
                   <span>Pages</span></a>        </li>
                                        <li>
    
        
    
    <a  id="space-blogposts-link" href="//pages/viewrecentblogposts.action?key=R"  class=""   title="Browse blogs in the Relaunch 2013 space">
                   <span>Blog</span></a>        </li>
                                        <li>
    
        
    
    <a  id="space-labels-link" href="//labels/listlabels-heatmap.action?key=R"  class=""   title="Browse labels in the Relaunch 2013 space">
                   <span>Labels</span></a>        </li>
                                        <li>
    
        
    
    <a  id="space-attachments-link" href="//spaces/listattachmentsforspace.action?key=R"  class=""   title="Browse attachments in the Relaunch 2013 space">
                   <span>Attachments</span></a>        </li>
                                        <li>
    
        
    
    <a  id="space-mail-link" href="//mail/archive/viewmailarchive.action?key=R"  class=""   title="Browse mail in the Relaunch 2013 space">
                   <span>Mail</span></a>        </li>
                                        <li>

Manually prepending the server name between http:// and the rest obviously works fine, but we'd rather do without.

If you have any ideas about what's causing this, let me know what you need to diagnose. I'll do my best!

Thanks for your help and hints!

Chris

2 answers

1 vote
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2012

Just found this KB article which may be more relevant than my previous suggestions - http://confluence.atlassian.com/display/JIRAKB/Some+Links+Lose+the+Base+URL

It's for JIRA, but it's likely that the same would apply to Confluence. Check your server.xml file where the Context path is set and if it's set to "/" change it to "" if users access Confluence at http://confluence.swiss-va.com or "/confluence" if users access Confluence at http://confluence.swiss-va.com/confluence

Andrew.

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 28, 2012

Hi Chris,

Did any of these suggestions fix the problem?

Andrew.

Anil Sreedharan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 24, 2014

Hello Andrew, I had the same problem. Your final suggestion fixed the issue "Check your server.xml file where the Context path is set and if it's set to "/" change it to "" "

0 votes
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2012

Hi Chris,

THe thing that immediately springs to mind is the base URL (http://confluence.atlassian.com/display/DOC/Configuring+the+Server+Base+URL) not being set in Browse -> Confluence Admin -> General Configuration

It's unlikely that the base URL would have been wiped in the config, but that's where I'd start.

Hope that helps?

Andrew.

Chris Leduc
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 22, 2012

Hi Andrew

Thanks for your help!

I've checked in the configuration, and the base url is already in. It's as follows:

Server Base Url http://confluence.swiss-va.com:8090

What is maybe relevant is that the port number is in the base URL. However, we access the server without as Apache is configured to virtually serve confluence on Port 80. The actual used address is http://confluence.swiss-va.com.

I've tried changing the value in the general configuration to http://confluence.swiss-va.com without success.

Addendum: Visiting http://confluence.swiss-va.com:8090 sends you back to http://confluence.swiss-va.com... Just for info. :-)

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 22, 2012

Hmmm, even though removing the port number from the base URL hasn't fixed this issue it needed to be done anyway as the base URL should be set to the URL that users use rather than the backend URL and port of the Confluence server, and at least that's one avenue of investigation closed off :-)

Next places I'd look (in no particular order) would be:

  • Anything in the log files related to problems with the base URL?
  • Browse -> Confluence Admin -> Look and Feel -> Custom HTML - any custom HTML trying to do any URL rewriting?
  • Browse -> Confluence Admin -> Look and Feel -> Layout - any changes to the default layouts?
  • Any custom themes?

Is there any pattern to the problem URLs? Does it only happen in a certain Space or Spaces? From the source sample you've provided they're all parameterised URLs, does it happen for just parameterised URLs (http://pages/editpage.action?pageId=786435) or does it happen for "normal" URLs as well (http://display/R/Home/My+Page)?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events