History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: GRAILS-1140
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Graeme Rocher
Reporter: Eric Everman
Votes: 1
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Grails

createLinkTo tag creates bad links to the files in the project root

Created: 10/May/07 11:16 PM   Updated: 29/Sep/08 05:10 PM
Component/s: TagLib
Affects Version/s: 0.5
Fix Version/s: 1.0.4

Time Tracking:
Not Specified

File Attachments: 1. File tagtest.gsp (3 kb)

Environment: All / NA

Testcase included: yes


 Description  « Hide
The CreateLinkTo tag creates bad links if the link points to home or a file in the home directory. I have a sample page up that shows the issue:

http://localhost:8080/grails_site/tagtest.gsp

A simplified version of this page is attached.

This was previously reported as fixed on this bug: http://jira.codehaus.org/browse/GRAILS-1054



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Eric Everman - 10/May/07 11:23 PM
Of course, that url would be the wrong one. How about this url for a live test case:

www.owlyshadowpuppets.com/tagtest.gsp


Sergey Nebolsin - 11/May/07 12:36 AM
As a workaround you can use <g:createLinkTo> tag just with file attribute (without 'dir' completely) to point on files in the root - and it should work.

And we need to decide - which syntax we wish to use for links to project root files. Is it dir:'' or dir:'/' or without dir attribute completely?


Eric Everman - 11/May/07 09:26 AM
To me, this one is clear:
dir='/' means root

while these two are ambiguous and might mean either root or current directory:
dir='' [empty string]
[not specified]

I would also throw in this one as an explicit current directory reference (don't know if it works) :
dir='.'

I will post this on the discussion forums to get more discussion on this - I have no idea how this would affect others.


Lee Butts - 23/Sep/08 02:15 AM
I've committed a fix for the double slashes when using dir = '/'. Was anything decided on the list about how to handle dir="" ?

cheers

Lee


Lee Butts - 29/Sep/08 05:10 PM
Double slashes fixed - behaviour of dir="" left as is.