• Broken URL under Edit button

    By Stepan Karandin 1 decade ago

    Environment:

    1. Domino 8.5 Win32 running http task at 192.168.х.х:yyy
    2. Router between 192.168.x.x and WWW
    3. Port mapping from Router:80 to 192.168.х.х:yyy



      Expected:
    4. Open http://192.168.х.х:yyy/wiki.nsf/dx/CompanyMedia from LAN
    5. Click Edit
    6. URL http://192.168.х.х:yyy/wiki.nsf/editpage.xsp?documentId=EB1D36561FD43CE5C325762A00480C23&action=editDocument opens

      4. Open http://Router/wiki.nsf/dx/CompanyMedia from WWW
    7. Click Edit

      6. URL http://Router/wiki.nsf/editpage.xsp?documentId=EB1D36561FD43CE5C325762A00480C23&action=editDocument opens



      In fact:
    8. URL http://192.168.х.х:yyy/wiki.nsf/editpage.xsp?documentId=EB1D36561FD43CE5C325762A00480C23&action=editDocument opens



      Solution:

      Under the Edit hotspot in the prtContent.xsp replace for both threads



      var url=@LeftBack(database.getUrl(),"/")+facesContext.getExternalContext().getRequestContextPath();

      var id=document1.getDocument().getUniversalID();



      facesContext.getExternalContext().redirect(url+"/editpage.xsp?documentId="+id+"&action=editDocument");



      by



      var url:XSPUrl;

      //return "View By Category";

      try {

      var url=@LeftBack(context.getUrl().toString(),"/")+facesContext.getExternalContext().getRequestContextPath();

      var id=document1.getDocument().getUniversalID();

      facesContext.getExternalContext().redirect(url+"/editpage.xsp?documentId="+id+"&action=editDocument");

      } catch(e) {

      return "";

      }