[Zope] Acquisition problems?

Curtis Maloney curtis@umd.com.au
Thu, 13 Jul 2000 15:36:12 +1000


Ok... I'm going try this again.

I am having an odd problem with my Zope site.  It seems that Acquisition is 
not working as excpected. (Gee.  Where have we heard this before? :)

At the suggestion of Martijn Pieters, I read through the Acquisition Algebra 
tutorial.  Interesting stuff.

Well, here's the details:

/
 standard_html_header
 register
/internal/
	standard_html_header

register works fine if invoked as  /register
however, it spits the dummy if invoked as /internal/register
Complaining loudly about TypeError: too many arguments; expected 2, got 3
in standard_html_header.

According to what MP told me, and what I read, register should be using 
/standard_html_header

However, that method is just raw HTML (no DTML tags), and has been shown to 
work fine.  But when I started messing with /interna/standard_html_header to 
try to track down the problem, things started changing, implying that IT was 
being used, not the root version.

How can this be?
Why is it?
And, what would cause a DTML method, invoked with <dtml-var 
standard_html_header>, to complain about the number of arguments?

Have a better one,
	Curtis Maloney.

<dtml-var standard_work_disclaimer>

P.S: Just for the fun of it, here's the latest traceback:

Zope Error

        Zope has encountered an error while publishing this resource. 

        TypeError

        Sorry, a Zope error occurred.

        Traceback (innermost last):
          File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, 
line 214, in publish_module
          File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, 
line 179, in publish
          File /usr/local/Zope-2.1.6-src/lib/python/Zope/__init__.py, line 
202, in zpublisher_exception_hook
            (Object: ElementWithAttributes)
          File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, 
line 165, in publish
          File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/mapply.py, 
line 160, in mapply
            (Object: register)
          File /usr/local/Zope-2.1.6-src/lib/python/ZPublisher/Publish.py, 
line 102, in call_object
            (Object: register)
          File /usr/local/Zope-2.1.6-src/lib/python/OFS/DTMLDocument.py, line 
166, in __call__
            (Object: register)
          File 
/usr/local/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, 
in __call__
            (Object: register)
          File /usr/local/Zope-2.1.6-src/lib/python/OFS/DTMLMethod.py, line 
146, in __call__
            (Object: standard_html_header)
          File 
/usr/local/Zope-2.1.6-src/lib/python/DocumentTemplate/DT_String.py, line 502, 
in __call__
            (Object: standard_html_header)
        TypeError: too many arguments; expected 2, got 3