I'm using XWiki 1.3 in tomcat 5.5 and I'm getting this exception when I
attempt to edit a group with Administration
- No storage migration required since current version is [7351]
2008-04-02 18:20:04,725
[
http://coe.portal8.stg.covisint.com/xwiki/bin/admin/XWiki/$xwiki.getSkinFil…]
[TP-Processor3] ERROR log.SimpleLog4JLogSystem - Method sendRedirect
threw exception for reference $response in template
/skins/covisint_coe/adminprefs.vm at [69,1]
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'sendRedirect' in class com.xpn.xwiki.web.XWikiServletResponse threw
exception java.lang.IllegalStateException @
/skins/covisint_coe/adminprefs.vm[69,11]
at
org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:286)
Here is a snippet of the adminprefs.vm the problem is the redirect. I
think something must have already been written to the client buffer and so
we get the IllegationStateException
##########
##
## Content
##
#set($formname = "update")
#set($saveaction = "save")
<form id="update" method="post"
action="$doc.getURL("save")"
onsubmit="cancelCancelEdit()">
<div id="xwikieditcontent">
#set($redirect = "$xwiki.getRequestURL()")
#set($classname = "XWiki.XWikiPreferences")
#set($class = $xwiki.getDocument($classname).xWikiClass)
#set($obj = $doc.getObject($classname, 0))
#if(!$obj)
#set($redirect = $xwiki.getRequestURL())
$response.sendRedirect($doc.getURL("objectadd",
"classname=XWiki.XWikiPreferences&XWiki.XWikiPreferences_upload_maxsize=33554432&xredirect=$xwiki.getFormEncoded($redirect)"))
#end
<div class="hidden">
<input type="hidden" name="xcontinue"
value="$doc.getURL("admin",
"editor=prefs")"/>
<input type="hidden" name="xredirect"
value="$xwiki.getURL("Main.WebHome")"/>
<input type="hidden" name="classname"
value="XWiki.XWikiPreferences" />
<input type="hidden" name="global" value="1" />
</div>
<div>
<div id="xwikiprefs">
#foreach($section in $sections)
#showsection($section $sectionitemsmap)
#end
</div> ## xwikiprefs
<script type="text/javascript">new Rico.Accordion( 'xwikiprefs',
{
panelHeight:'max', maxHeight: 320} );</script>
</div> ## noname
</div> ## xwikieditcontent
<div
class="bottombuttons">#template("adminactions.vm")</div>
</form>
So, I commented out the line with $response.sendRedirect and the exception
went away but I don't know if it really needs the redirect. From the log it
looks like it is just loading 'icons/ajax-loader.gif' If my "fix" is
wrong
please let me know.
Glenn Everitt
--
View this message in context:
http://www.nabble.com/IllegalStateException-when-editing-Groups-with-Admin-…
Sent from the XWiki- Dev mailing list archive at
Nabble.com.