You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@esme.apache.org by "Dick Hirsch (JIRA)" <ji...@apache.org> on 2011/01/26 08:15:43 UTC

[jira] Created: (ESME-327) URL path problems

URL path problems
-----------------

                 Key: ESME-327
                 URL: https://issues.apache.org/jira/browse/ESME-327
             Project: ESME
          Issue Type: Bug
          Components: UI
    Affects Versions: 1.2
            Reporter: Dick Hirsch
             Fix For: 1.2


I have noticed this several places, but this is a concrete example.


webapp/scripts/display_messages_top.js:198, sets a link to message
author like so:

newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );

this causes problems when running with a non / context on tomcat

For example, if esme in running here:

http://foo.bar.com/esme/

the above will create this link:

http://foo.bar.com/user/user1

It appears that tomcat(? or lift?) does the right thing,
snippet/UserSnip.scala:121 does this

<a href={"/user/"+urlEncode(u.nickname.is)}>

which gives the correct location:

http://foo.bar.com/esme/user/user1

My javascript foo isn't strong enough to know if there's a way to
solve this in js.  Perhaps the best way is putting it in the template
and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ESME-327) URL path problems

Posted by "Vladimir Ivanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ivanov updated ESME-327:
---------------------------------

    Attachment: index_err2.png

> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: Enterprise Social Messaging Environment (ESME)
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>            Assignee: Dick Hirsch
>             Fix For: 1.2
>
>         Attachments: index_err1.png, index_err2.png, index_err_local.png
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (ESME-327) URL path problems

Posted by "Vladimir Ivanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ivanov updated ESME-327:
---------------------------------

    Attachment: index_err_local.png

> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: Enterprise Social Messaging Environment (ESME)
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>            Assignee: Dick Hirsch
>             Fix For: 1.2
>
>         Attachments: index_err1.png, index_err2.png, index_err_local.png
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (ESME-327) URL path problems

Posted by "Dick Hirsch (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dick Hirsch reassigned ESME-327:
--------------------------------

    Assignee: Dick Hirsch

> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: Enterprise Social Messaging Environment (ESME)
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>            Assignee: Dick Hirsch
>             Fix For: 1.2
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (ESME-327) URL path problems

Posted by "Vladimir Ivanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ivanov updated ESME-327:
---------------------------------

    Attachment: index_err1.png

> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: Enterprise Social Messaging Environment (ESME)
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>            Assignee: Dick Hirsch
>             Fix For: 1.2
>
>         Attachments: index_err1.png, index_err2.png, index_err_local.png
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (ESME-327) URL path problems

Posted by "Vladimir Ivanov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Ivanov updated ESME-327:
---------------------------------

    Attachment: index_err3_chrome.png

> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: Enterprise Social Messaging Environment (ESME)
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>            Assignee: Dick Hirsch
>             Fix For: 1.2
>
>         Attachments: index_err1.png, index_err2.png, index_err3_chrome.png, index_err_local.png
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ESME-327) URL path problems

Posted by "Dick Hirsch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986974#action_12986974 ] 

Dick Hirsch commented on ESME-327:
----------------------------------

As Ethan suggested, the change isn't as easy as I thought:

Here is my current effort - which isn't finished yet

      var pathArray = top.location.pathname.split( '/' ); 
          
      // Dealing with tomcat
      if (top.location.pathName == "/") 
      	  newMsg.find('#author').attr('href',"/user/" + msgAuthor.nickname );
     else { 
     	 if (pathArray.length==3)
     	    newMsg.find('#author').attr('href', pathArray[1] + "/user/" + msgAuthor.nickname ); 
     	 else  	 
      	   newMsg.find('#author').attr('href', "../user/" + msgAuthor.nickname ); 
     }
     
     
     
           // Dealing with users with no avatars
      if (!msgAuthor.imageUrl) {
        if (top.location.pathName == "/") 
      	   msgAuthor.imageUrl= "/images/avatar.jpg"
      	else
      	  msgAuthor.imageUrl= "../images/avatar.jpg" 
     }

> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: ESME
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>             Fix For: 1.2
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ESME-327) URL path problems

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12991953#comment-12991953 ] 

Hudson commented on ESME-327:
-----------------------------

Integrated in ESME #497 (See [https://hudson.apache.org/hudson/job/ESME/497/])
    [ESME-327] Make My Contacts view lists expand to fix list
First step - removed scroll bars but now footer is hidden :-<


> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: Enterprise Social Messaging Environment (ESME)
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>            Assignee: Dick Hirsch
>             Fix For: 1.2
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (ESME-327) URL path problems

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ESME-327?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986985#action_12986985 ] 

Hudson commented on ESME-327:
-----------------------------

Integrated in ESME #481 (See [https://hudson.apache.org/hudson/job/ESME/481/])
    [ESME-327] URL path problems


> URL path problems
> -----------------
>
>                 Key: ESME-327
>                 URL: https://issues.apache.org/jira/browse/ESME-327
>             Project: ESME
>          Issue Type: Bug
>          Components: UI
>    Affects Versions: 1.2
>            Reporter: Dick Hirsch
>             Fix For: 1.2
>
>
> I have noticed this several places, but this is a concrete example.
> webapp/scripts/display_messages_top.js:198, sets a link to message
> author like so:
> newMsg.find('#author').attr('href', "/user/" + msgAuthor.nickname );
> this causes problems when running with a non / context on tomcat
> For example, if esme in running here:
> http://foo.bar.com/esme/
> the above will create this link:
> http://foo.bar.com/user/user1
> It appears that tomcat(? or lift?) does the right thing,
> snippet/UserSnip.scala:121 does this
> <a href={"/user/"+urlEncode(u.nickname.is)}>
> which gives the correct location:
> http://foo.bar.com/esme/user/user1
> My javascript foo isn't strong enough to know if there's a way to
> solve this in js.  Perhaps the best way is putting it in the template
> and just having the js fill in the username?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.