Craig - I will make a JIRA, clean up my patch, and submit it.  The print statements are not appropriate for a real patch.

I will have to figure out how to make a patch the hard way -  my IDE is a combination of vi, find and grep - I never have to worry when I mistakenly lose a toolbar and cannot figure out how to get it back :)

/Chuck

On Aug 28, 2006, at 10:57 AM, [EMAIL PROTECTED] wrote:


See below: 


Charles Severance <[EMAIL PROTECTED]> wrote on 08/27/2006 11:19:08 PM:

> 

> ==== Bug in pageId lookup in trunk ======

> 

> This worked about a week ago - so I am thinking something recent  

> happenned when I did an svn update.

> 

> The trunk has a bug where PageId's end up with a prefix of a "/" and  

> so the configuration can never find find pages - and things blow up  

> horribly.

> 

> To reproduce - simply bring up pluto, log in as tomcat, and navigate  

> to a page other than the default using the dropdown.

> 

> The fix is below:

> 

> vi pluto-portal-driver/src/main/java/org/apache/pluto/driver/services/ 

> portal/RenderConfig.java

> 

>      public PageConfig getPageConfig(String pageId) {

>          if (pageId == null || "".equals(pageId)) {

>              if (LOG.isDebugEnabled()) {

>                  LOG.debug(

>                      "Requested page is null.  Returning default: " +

>                      defaultPageId);

>              }

>              pageId = defaultPageId;

>          }

>          PageConfig retval = (PageConfig) pages.get(pageId);

>          // TODO: Fix Hack

>          if ( retval == null && pageId.startsWith("/") &&  

> pageId.length() > 2 ) {

>                  System.out.println("HACK ALert - Trimming off slash  

> " + pageId.substring(1));

>                  retval = (PageConfig) pages.get(pageId.substring(1));

>          }

>          System.out.println("retval = " + retval);

>          return retval;

>      }

> 

> [DEBUG] PortalURLParser - Parsing URL: /pluto/portal/Pluto%20Admin

> [DEBUG] PortalURLParser - Parsing request pathInfo: /Pluto Admin

> [DEBUG] PortalDriverServlet - Processing render request.

> [DEBUG] PortalDriverServlet - Rendering Portal: Requested Page: / 

> Pluto Admin

> HACK ALert - Trimming off slash Pluto Admin

> retval = [EMAIL PROTECTED]

> 


Thanks for this patch. Would you mind submitting this to Jira (http://issues.apache.org/jira/secure/BrowseProject.jspa?id=10560) so we can 

properly keep track of this issue? It also would be helpful if you submit 

a patch file so we can apply your fix properly. Creating a patch file is pretty 

easy if you are using Eclipse and the subeclipse plugin. 


Reply via email to