incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terry Steichen <te...@net-frame.com>
Subject Re: IE Editing Glitch
Date Sat, 24 May 2008 18:28:29 GMT
Well, this is another Duh!  Turns out that there were two baseURL
entries in my jspwiki.properties.  I kept editing one of them, but the
other (which included hostname:8080) remained unchanged.  The reason
this happened is because I was using Install.jsp which leaves the
'official' jspwiki.baseURL parameter commented out, but adds a second
(active) one at the very end of jspwiki.properties.  

Since Install.jsp doesn't work right for me (in the sense that it always
fails to generate an admin user and group), when I started having
troubles and examined jspwiki.properties, I noticed that the baseURL was
commented out and assumed I needed to set that to a proper value
(neglecting to look at the other baseURL declaration at the end).

Maybe I was just careless, but on the other hand, when the installer
creates two different baseURL entries (one associated with the
description but commented out, and the other at the end), we may be
asking for confusion. 



On Sat, 2008-05-24 at 10:40 +0300, Janne Jalkanen wrote:

> OK, this is *really* strange.  I can't offhand see any place where  
> this could possibly happen.
> 
> Please do some additional debugging.  Good place to step through or  
> add debug statements are WikiEngine.initialize() [which sets the  
> baseURL].
> 
> Another thing which might be confusing JSPWiki is that if there is  
> another instance of jspwiki.properties somewhere in the classpath, or  
> that you're cascading the property files.
> 
> If you're on UNIX/Mac, I would do a "find / -type f | xargs grep  
> baseURL | grep "localhost:8080" and see what comes out.
> 
> /Janne
> 
> On 24 May 2008, at 03:52, Terry Steichen wrote:
> 
> > Even more fundamentally, when debugging Edit.jsp, when I add this  
> > item:
> > <wiki:Variable var='baseurl' />, it displays
> > "http://localhost:8080/TC4a/" - even though the jswiki.properties
> > contains this entry:
> >
> >         jspwiki.baseURL=http://192.168.1.109:8080/TC4a
> >
> > It appears that - somehow - baseURL isn't being inputted properly.
> >
> >
> >
> > On Fri, 2008-05-23 at 17:09 -0400, Terry Steichen wrote:
> >
> >> Janne,
> >>
> >> Sorry I didn't get to this sooner, but been traveling and having
> >> wireless connection problems.
> >>
> >> Unfortunately your patch doesn't change the error.
> >>
> >> I did some debugging and found that the problem is coming from
> >> wiki.getViewURL(pagereq) [Edit.jsp, line 235].  In this particular  
> >> case
> >> 'pagereq' is set to "Main" and the value returned by
> >> wiki.getViewURL("Main") is
> >> "http://localhost:8080/TC4a/Wiki.jsp?page=Main".
> >>
> >> Just to verify: I plugged in the actual url
> >> ("http://192.168.1.109:8080/TC4a") and hit Cancel and it worked just
> >> fine.
> >>
> >> I don't have time at the moment to dig into WikiEngine.getViewURL 
> >> (), but
> >> that's clearly where the problem is.
> >>
> >> Terry
> >>
> >> On Wed, 2008-05-21 at 08:10 +0300, Janne Jalkanen wrote:
> >>
> >>> Terry, can you please try this patch on the current SVN trunk?   
> >>> Might
> >>> work also on the 2.6 branch...
> >>>
> >>> /Janne
> >>>
> >>> Index: /Users/jalkanen/Eclipse/JSPWiki/src/webdocs/Edit.jsp
> >>> ===================================================================
> >>> --- /Users/jalkanen/Eclipse/JSPWiki/src/webdocs/Edit.jsp	(revision
> >>> 658385)
> >>> +++ /Users/jalkanen/Eclipse/JSPWiki/src/webdocs/Edit.jsp	(working  
> >>> copy)
> >>> @@ -114,7 +114,7 @@
> >>>               log.info("Page changed, warning user.");
> >>>
> >>>               session.setAttribute( EditorManager.REQ_EDITEDTEXT,
> >>> EditorManager.getEditedText(pageContext) );
> >>> -            response.sendRedirect( wiki.getURL 
> >>> (WikiContext.CONFLICT,
> >>> pagereq, null, false) );
> >>> +            response.sendRedirect( wiki.getURL 
> >>> (WikiContext.CONFLICT,
> >>> pagereq, null, true) );
> >>>               return;
> >>>           }
> >>>
> >>> @@ -184,7 +184,7 @@
> >>>           }
> >>>           catch( DecisionRequiredException ex )
> >>>           {
> >>> -        	String redirect = wikiContext.getURL
> >>> (WikiContext.VIEW,"ApprovalRequiredForPageChanges");
> >>> +        	String redirect = wiki.getViewURL
> >>> ("ApprovalRequiredForPageChanges");
> >>>               response.sendRedirect( redirect );
> >>>               return;
> >>>           }
> >>> @@ -219,7 +219,7 @@
> >>>           if( htmlText != null ) session.setAttribute
> >>> ( EditorManager.REQ_EDITEDTEXT, text );
> >>>
> >>>           session.setAttribute("changenote", changenote != null ?
> >>> changenote : "" );
> >>> -        response.sendRedirect( wiki.getURL
> >>> (WikiContext.PREVIEW,pagereq,null,false) );
> >>> +        response.sendRedirect( wiki.getURL
> >>> (WikiContext.PREVIEW,pagereq,null,true) );
> >>>           return;
> >>>       }
> >>>       else if( cancel != null )

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message