[Product-Developers] Re: Remember username edit leads to a magic 301 header

Radim Novotny novotny.radim at gmail.com
Fri Apr 10 16:01:42 UTC 2009


It is plone.app.redirector, which remember old object ID and provides 
its alias. I don't know if it is possible to remove it though.

-- 
Radim

Hedley Roos napsal(a):
> Hi all
> 
> I have a member called 'dan'. I go to dan/edit and change his username
> to 'danny'. This means that his id must also change from 'dan' to
> 'danny'. This all works as expected. But if I now manually go to the
> URL members/dan it redirects me to members/danny!
> 
> The edit was done on http://adminboo/site/members/dan in Firefox on
> Linux. If I use IE on a Windows machine and attempt to go to
> http://adminboo/site/members/dan I am redirected to danny. The Windows
> machine has never before been to that object. The 301 persists through
> Zope restarts. Clearing the cookies in IE does not help.
> 
> If I go to the object on http://boo/site/members/dan (different alias
> in my /etc/hosts) then I rightly get a NotFound error.
> 
> Normally I would not care much about this redirect, except that it is
> somehow possible to land in a redirect loop. Firefox handles the
> situation nicely and displays an error message.
> 
> Firebug show that a 301 Moved Permanently was set for members/dan. And
> the member is not really called dan - it is just easier to type.
> 
> Response headers:
> Server: Zope/(Zope 2.10.6-final, python 2.4.4, linux2) ZServer/1.1 Plone/3.1.7
> Date: Fri, 10 Apr 2009 10:33:33 GMT
> Bobo-Exception-Line: 682
> Content-Length: 17649
> Bobo-Exception-Value: See the server error log for details
> Content-Language: en-us
> Bobo-Exception-File: HTTPResponse.py
> Bobo-Exception-Type: NotFound
> Expires: Sat, 1 Jan 2000 00:00:00 GMT
> Location: http://adminboo:23190/fivefm/members/melattree/view
> Content-Type: text/html;charset=utf-8
> X-Ksscommands: <?xml version="1.0"?> <kukit
> xmlns="http://www.kukit.org/commands/1.1"> <commands>   <command
> name="error">      <param name="type">system</param>       <param
> name="message">NotFound:   &amp;lt;h2&amp;gt;Site
> Error&amp;lt;/h2&amp;gt;   &amp;lt;p&amp;gt;An error was encountered
> while publishing this resource.   &amp;lt;/p&amp;gt;
> &amp;lt;p&amp;gt;&amp;lt;strong&amp;gt;Debugging
> Notice&amp;lt;/strong&amp;gt;&amp;lt;/p&amp;gt;    Zope has
> encountered a problem publishing your object.&amp;lt;p&amp;gt; Cannot
> locate object at:
> http://adminboo:23190/fivefm/members/melatree&amp;lt;/p&amp;gt;
> &amp;lt;hr noshade="noshade"/&amp;gt;
> &amp;lt;p&amp;gt;Troubleshooting Suggestions&amp;lt;/p&amp;gt;
> &amp;lt;ul&amp;gt;   &amp;lt;li&amp;gt;The URL may be
> incorrect.&amp;lt;/li&amp;gt;   &amp;lt;li&amp;gt;The parameters
> passed to this resource may be incorrect.&amp;lt;/li&amp;gt;
> &amp;lt;li&amp;gt;A resource that this resource relies on may be
> encountering an error.&amp;lt;/li&amp;gt;   &amp;lt;/ul&amp;gt;
> &amp;lt;p&amp;gt;For more detailed information about the error, please
>   refer to the error log.   &amp;lt;/p&amp;gt;    &amp;lt;p&amp;gt;If
> the error persists please contact the site maintainer.   Thank you for
> your patience.   &amp;lt;/p&amp;gt;</param>  </command> </commands>
> </kukit>
> 
> Any ideas?
> Hedley





More information about the Product-Developers mailing list