Grails
  1. Grails
  2. GRAILS-1054

createLinkTo Makes Bad URLs to the Root (home) Page of Application

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.2
    • Fix Version/s: 0.5
    • Component/s: TagLib
    • Labels:
      None
    • Environment:

      Description

      When deployed as the default context (ie, there is no 'site_name/' context portion), createLinkTo builds incorrect urls to the root page. Here are two examples, which appear on the page http://www.owlyshadowpuppets.com/puppet/list :

      <a href="$

      {createLinkTo(dir:'/')}

      ">Home</a> creates: <a href="//">Home</a>
      <a href="$

      {createLinkTo(dir:'')}

      ">Home</a> creates: <a href="">Home</a>

      You can try the page online (for the next few days). Neither of these links is correct and they will not work in any browser to reach the home page.

        Activity

        Hide
        Sergey Nebolsin added a comment -

        fixed with ${createLinkTo(dir:'') syntax

        Show
        Sergey Nebolsin added a comment - fixed with ${createLinkTo(dir:'') syntax
        Hide
        Timo Behrmann added a comment -

        Are you sure this issue is fixed?
        I have the same problem on apache-tomcat-6.0.16 with Java(TM) SE Runtime Environment (build 1.6.0_07-b06) and Grails 1.0.3 !
        Windows or linux makes no difference!

        Show
        Timo Behrmann added a comment - Are you sure this issue is fixed? I have the same problem on apache-tomcat-6.0.16 with Java(TM) SE Runtime Environment (build 1.6.0_07-b06) and Grails 1.0.3 ! Windows or linux makes no difference!
        Hide
        Mikolaj Olszewski added a comment -

        Confirm.
        I have this problem with Grails 1.0.4 and grails.app.context = "/".
        The url of the created link is the same as current page.

        Show
        Mikolaj Olszewski added a comment - Confirm. I have this problem with Grails 1.0.4 and grails.app.context = "/". The url of the created link is the same as current page.

          People

          • Assignee:
            Sergey Nebolsin
            Reporter:
            Eric Everman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development