Hi,<div><br></div><div>Selecting a different look using Pier's PRDesignChooserWidget causes an WAUnregisteredHandlerError exception to be raised. This occurs on the latest builds: <a href="http://hudson.lukas-renggli.ch/job/Pier%202/lastBuild/">http://hudson.lukas-renggli.ch/job/Pier%202/lastBuild/</a></div>
<div><br></div><div>The PRDesignChooserWidget registers 'pier' with the new structure in place then sends an #expiredKey response as:</div><div><br></div><div><div> self requestContext responseGenerator</div><div>
expiredKey;</div><div> respond</div></div><meta charset="utf-8"><div><br></div><div>The problem appears to be in a change to WAResponseGenerator>>expiredKey, which was introduced:</div><div><br></div>
<div>---</div><div><div>Name: Seaside-Core-YM.639</div><div>Author: YM</div><div>Time: 22 May 2010, 7:39:33 pm</div><div>UUID: e24bae83-3671-4679-ac8d-9f21154c304e</div><div>Ancestors: Seaside-Core-pmm.638</div></div><div>
<div><br></div><div><a href="http://code.google.com/p/seaside/issues/detail?id=552">http://code.google.com/p/seaside/issues/detail?id=552</a></div><div><br></div><div>- Corrected WAResponseGenerator>>#expiredKey to always use the correct URL</div>
<div>- Implemented WAPathConsumer>>#upToEnd</div></div><div>----</div><div><br></div><div>The exception is thrown in the line:</div><div><div>url := self requestContext handler url.</div></div><div><br></div><div>#handler returns a WASession which I presume wasn't expected when the code was written.</div>
<div><br></div><div>Changing the code to:</div><div><br></div><div>url := self requestContext request url</div><div><br></div><div>stops the exception from being thrown, but doesn't result in a URL free from keys; not the desired effect. I found a handy Pier extension method WAUrl>>purgeSeasideFields.The rewritten WAResponseGenerator>>expiredKey then becomes:</div>
<div><br></div><div><div>expiredKey</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>"The session key has expired, redirect the request to the home directory preserving the path as well as possible."</div>
<div><br></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>| url |</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self request isXmlHttpRequest</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>ifTrue: [ ^ self forbidden ].</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>url := self requestContext request url.</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>url addAllToPath: self requestContext consumer upToEnd.</div>
<div><span class="Apple-tab-span" style="white-space:pre">        </span>self request isGet ifTrue: [</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>url purgeSeasideFields].</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>self response redirectTo: url</div>
</div><div><br></div><div>With the requirement that the WAUrl>>purgeSeasideFields is moved from Pier-Seaside-Mapping into Seaside-Core-HTTP.</div><div><br></div><div>Thoughts?</div><div><br></div><div>Nick</div><div>
<br></div><div><br></div><meta charset="utf-8"><div><br></div><div><br></div>