RE: [Zope3-dev] browserDefault uses '@@' for containers

2005-09-26 Thread Garrett Smith
On , [EMAIL PROTECTED] wrote:

 Hi together
 
 Behalf Of Fred Drake
 Sent: Friday, September 23, 2005 4:13 AM
 To: Gary Poster
 Cc: Garrett Smith; zope3-dev
 Subject: Re: [Zope3-dev] browserDefault uses '@@' for containers
 
 On 9/22/05, Gary Poster [EMAIL PROTECTED] wrote:
 I believe that the idea is that the container traverser wants to
 specify that the default view name is a view, not an object in the
 container.  That is, if the default view is named index.html, and I
 have an object in the container named index.html, './index.html'
 will traverse to the object in the container while @@index.html will
 render the container view named 'index.html'.  Sometimes you *want*
 
 That's right.  At one point it wasn't doing that (as best I recall),
 so the default view was traversing when it shouldn't.  We decided to
 change it specifically because it produced unexpected behavior.
 
 I'm running into a bug with this behavior.
 
 If I call myContainer/@@ or myContainer/ and get my registred
 index.html (template) view back. There is the following part
 rendered into the template 'lt;/'.

Does this extra text show up even if your template is empty? I.e. delete the 
template text and see what happens.

 -- Garrett
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



RE: [Zope3-dev] browserDefault uses '@@' for containers

2005-09-26 Thread Roger Ineichen
Hi Garrett

[...]
  
  I'm running into a bug with this behavior.
  
  If I call myContainer/@@ or myContainer/ and get my registred
  index.html (template) view back. There is the following part
  rendered into the template 'lt;/'.
 
 Does this extra text show up even if your template is empty? 
 I.e. delete the template text and see what happens.

I was really confused about this.
But I think I located this bug now.
It has nothing to do with the '@@' view.

The problem is somewhere around the method __insertBase in the 
publisher.browser.py.

After a bugfix from Stephan and Bjorn the bug was gone, 
at least if you directly access the zope3 server.

Now the problem is,
If you call a view via a Apache virtual host and this view doesn't 
define a BASE url, the BASE URL get rendered with the __insertBASE 
method. This ends in wrong quoted tags after the rendered BASE URL.

I don't know why this happens and I also don't know why
we need a BASE URL implicit rendered into a page.

I have no idea right now what's happen there.

Regards
Roger Ineichen



 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] browserDefault uses '@@' for containers

2005-09-23 Thread Jim Fulton

Gary Poster wrote:


On Sep 22, 2005, at 1:36 PM, Garrett Smith wrote:

Why does z/a/container/traversal/ContainerTraversal include '@@' in  
the default view name? This is not the case in  
SimpleComponentTraverser (z/a/publication/traversers). Is there  
something special about containers that their default view should  be 
an explicit view lookup? Or should SimpleComponentTraverser also  
include '@@' in the default name?



I believe that the idea is that the container traverser wants to  
specify that the default view name is a view, not an object in the  
container.  That is, if the default view is named index.html, and I  
have an object in the container named index.html, './index.html' will  
traverse to the object in the container while @@index.html will  render 
the container view named 'index.html'.  Sometimes you *want*  the 
over-ridable behavior (and so you can configure it that way), but  the 
default configuration is to have the system honor the configured  view.


Yup.

Jim
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



RE: [Zope3-dev] browserDefault uses '@@' for containers

2005-09-23 Thread Roger Ineichen
Hi together

 Behalf Of Fred Drake
 Sent: Friday, September 23, 2005 4:13 AM
 To: Gary Poster
 Cc: Garrett Smith; zope3-dev
 Subject: Re: [Zope3-dev] browserDefault uses '@@' for containers
 
 On 9/22/05, Gary Poster [EMAIL PROTECTED] wrote:
  I believe that the idea is that the container traverser wants to
  specify that the default view name is a view, not an object in the
  container.  That is, if the default view is named index.html, and I
  have an object in the container named index.html, 
 './index.html' will
  traverse to the object in the container while @@index.html will
  render the container view named 'index.html'.  Sometimes you *want*
 
 That's right.  At one point it wasn't doing that (as best I recall),
 so the default view was traversing when it shouldn't.  We decided to
 change it specifically because it produced unexpected behavior.

I'm running into a bug with this behavior.

If I call myContainer/@@ or myContainer/ and get my registred 
index.html (template) view back. There is the following part
rendered into the template 'lt;/'. 

If I call myContainer/index.html or myContainer/@@index.html
this doesn't happen.

Does anybody know what's going on?

Regards
Roger Ineichen

   -Fred
 
 --
 Fred L. Drake, Jr.fdrake at gmail.com
 Zope Corporation
 ___
 Zope3-dev mailing list
 Zope3-dev@zope.org
 Unsub: 
 http://mail.zope.org/mailman/options/zope3-dev/dev%40projekt01.ch
 
 

___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] browserDefault uses '@@' for containers

2005-09-22 Thread Gary Poster


On Sep 22, 2005, at 1:36 PM, Garrett Smith wrote:

Why does z/a/container/traversal/ContainerTraversal include '@@' in  
the default view name? This is not the case in  
SimpleComponentTraverser (z/a/publication/traversers). Is there  
something special about containers that their default view should  
be an explicit view lookup? Or should SimpleComponentTraverser also  
include '@@' in the default name?


I believe that the idea is that the container traverser wants to  
specify that the default view name is a view, not an object in the  
container.  That is, if the default view is named index.html, and I  
have an object in the container named index.html, './index.html' will  
traverse to the object in the container while @@index.html will  
render the container view named 'index.html'.  Sometimes you *want*  
the over-ridable behavior (and so you can configure it that way), but  
the default configuration is to have the system honor the configured  
view.


An educated guess as to intent. :-)

Gary
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com



Re: [Zope3-dev] browserDefault uses '@@' for containers

2005-09-22 Thread Fred Drake
On 9/22/05, Gary Poster [EMAIL PROTECTED] wrote:
 I believe that the idea is that the container traverser wants to
 specify that the default view name is a view, not an object in the
 container.  That is, if the default view is named index.html, and I
 have an object in the container named index.html, './index.html' will
 traverse to the object in the container while @@index.html will
 render the container view named 'index.html'.  Sometimes you *want*

That's right.  At one point it wasn't doing that (as best I recall),
so the default view was traversing when it shouldn't.  We decided to
change it specifically because it produced unexpected behavior.


  -Fred

--
Fred L. Drake, Jr.fdrake at gmail.com
Zope Corporation
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com