Uploaded image for project: '{RETIRED} XWiki Enterprise'
  1. {RETIRED} XWiki Enterprise
  2. XE-691

Visible urls and broken links on standard XWiki Enterprise 2.3.2, when run behind Apache+Tomcat

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Major
    • None
    • 2.3.2
    • None
    • None
    • Apache 2.2.11, Apache Tomcat 5.5.28, fresh XWiki Enterprise 2.3.2

    Description

      When XWiki is run on Apache + Tomcat, $doc.getURL() might produce canonical urls instead of urls that are relative to server root. This causes problems in quite many standard documents in XWiki Enterprise, (XWiki.XWikiUserProfileSheet, Main.Dashboard, the Blog application to name some) because $doc.getURL() is often used within html wiki="true"; the urls are rendered incorrectly into links, breaking the layout and functionality on these pages.

      For example, on the user's profile page, the HTML code for Edit icon is then rendered as

      <div class="editProfileCategory"><a href="%3Cspan%20class=" wikiexternallink=""></a><a class="wikimodel-freestanding" href="http://wiki.domainname.com/xwiki/bin/inline/XWiki/AnttiHaapala?category=profile"><span class="wikigeneratedlinkcontent">http://wiki.domainname.com/xwiki/bin/inline/XWiki/AnttiHaapala?category=profile</span></a>"><span class="hidden">Edit profile</span></div>

      Whereas the correct html source should be

      <div class="editProfileCategory"><a href="/xwiki/bin/inline/XWiki/AnttiHaapala?category=profile"><span class="hidden">Edit profile</span>
      </a></div>

      The problem does not exist with only Tomcat + XWiki, so it is a complicated heisenbug; however, this could be easily fixed in documents by ensuring that the urls are either properly escaped, or will not be embedded within html wiki="true" tag at all, along with possibly changing the logic behind getURL().

      Attachments

        1. brokenblogpanel.bmp
          281 kB
          Antti Haapala
        2. xwikinotworking.jpg
          661 kB
          Antti Haapala

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              anttihaapala Antti Haapala
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: