Ticket #4374 (closed Bug: fixed)
__call__ loop at portal level
| Reported by: | Anonymous User | Owned by: | |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.1.3 |
| Component: | Upgrade/Migration | Keywords: | |
| Cc: |
Description (last modified by hannosch) (diff)
[Extracted from multi-bug issue #4372]
Comment - Entry #2 by Anonymous User on Aug 2, 2005 11:00 pm
bwt: I have same the issue with #4368 after I upgraded(successful) zope from 2.7.5 to 2.8.1, plone from 2.0.5 to 2.1.0rc1, as version info listed above, My python is NOT 2.4.x.
it occurs when access a directory such http://www.xxx.org/, but every things in PHC is ok.
Traceback (innermost last):
Module ZPublisher.Publish, line 113, in publish Module ZPublisher.mapply, line 88, in mapply Module ZPublisher.Publish, line 40, in call_object Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call Module Products.CMFCore.PortalContent, line 109, in call
RuntimeError: maximum recursion depth exceeded
Change History
comment:2 Changed 7 years ago by optilude
Okay, this issue is quite strange. I need more information before I can debug properly.
The use of call() is a little strange itself, because call() ought to be sidestepped with before_publishing_traverse. Also, CMFDynamicViewFTI.browserdefault.BrowserDefaultMixin, which is mixed into the ATCT types and the portal root, re-defines call(). The traceback tells me that this is happening in the fallback in CMFCore.PortalContent.
Now, in Portal.py in Plone, I see that CMFSite and OrderedContainer are listed before BrowserDefaultMixin. That may mean that the portal root object's call() method may come from either of these. Tracing the inheritance hierarchy is a little confusing, and I don't have time right now, but it seems likely that this is where the PortalContent.call() recursion is coming from. This would also mean, I believe, that there is no deafult-page or index_html set.
The offending code, according to the traceback, is in PortalContent.py:
def call(self):
""" Invokes the default view. """ ti = self.getTypeInfo() method_id = ti and ti.queryMethodID('(Default)', context=self) if method_id:
method = getattr(self, method_id)
else:
method = _getViewFor(self)
if getattr(aq_base(method), 'isDocTemp', 0):
return method(self, self.REQUEST)
else:
return method()
It is the very last method() call that is recursing. What makes this hard to trace is that I don't know whether method() came from looking up the (Default) alias or the from _getViewFor(), as per the previous if statement. My working theory here is that it is _getViewFor(), returning the 'view' action, which for the portal root is 'string:${object_url}'. However, this seems strange, because CMFCore.utils._getViewFor() looks up the action (which in this case would get it , since it strips the object url and any leading /) and then does restrictedTraverse(). The idea of using 'string:${object_url}' for the 'view' action in the first place is that the '(Deafult)' method alias should be found and invoked and point us to '(dynamic view)', which would look up a default page and/or selected layout.
That was a bit of background info, hopefully not too confusing. I really need a reliable way to reproduce the error.
So - can you tell me:
- Is there is anyway you can introduce the same behaviour on a clean Plone 2.1 instance? If so, please give step-by-step instructions.
- Did all migrations run OK, including ATCT version migration if you had ATCT installed already?
- What is on the URL you're trying t access? Plone root? A folder? A document?
- If it's the root or a folder, does it have an index_html or other default-page set?
- If you look at the type of object (either Plone Site, Folder, Document or whatever it is) that is causing the problem in portal_types, does it have a 'method aliases' tab? If so, what is the '(Default)' alias pointing to? On the 'actions' tab, what is the target of the 'view' action? Can you verify that it is a "Factory Type Information with Dynamic View" with a yellow icon, not a "Factory Type Information" with a blue icon?
comment:3 Changed 7 years ago by alecm
Mr. Penguin, please respond to optilude's questions so that we can get this issue resolved. :)
comment:4 Changed 7 years ago by Anonymous User
I get the same recursion error after an upgrade from 2.0.5. Versions are:
- CMF: CMF-1.5.2
When trying to do an atct migrate I get: Couldn't migrate src_portal_type due to missing FTI Couldn't migrate src_portal_type due to missing FTI Couldn't migrate src_portal_type due to missing FTI ...
I previously had installed at content types on 2.0.5 and the migration failed, but I was able to use both types alongside each other.
Lots is broken since the migration, no style sheets coming through seemingly and so on, different errors for different content types - I would give more detail but I wouldn't know where to begin.
I have this on a test instance on which I can do infinite messing with in case you need any tests done.
Mike
comment:5 Changed 7 years ago by alecm
Hm, perhaps what's going on in these cases is we have some partially migrated ATCT 0.2 sites. So that some CMF content has its portal_type set to an ATCT FTI, or vice versa perhaps. As a result you may get an attempt to use the CMFDynamicViewFTI methods on a type which doesn't actually support them.
Mike were there any more specific errors in your event.log or error_log, regarding what the relevant portal_type was, or what objects this happened on?
comment:6 Changed 7 years ago by Anonymous User
Documents of type 'document' give the recursion error. If I add /view on the end of the url they work. These are ones that didn't get converted I think.
Newer documents - 'atdocument' types give this error:
Traceback (most recent call last):
File "/usr/lib/zope-2.7.6/lib/python/ZPublisher/Publish.py", line 101, in publish
request, bind=1)
File "/usr/lib/zope-2.7.6/lib/python/ZPublisher/mapply.py", line 88, in mapply
if debug is not None: return debug(object,args,context)
File "/usr/lib/zope-2.7.6/lib/python/ZPublisher/Publish.py", line 39, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "/var/lib/zope/zope-test/Products/CMFDynamicViewFTI/browserdefault.py", line 94, in call
return template(context, context.REQUEST)
TypeError: call() takes exactly 1 argument (3 given)
I mentioned stylesheet problems in my earlier post, that was something unrelated that I'd messed up.
Mike
comment:8 Changed 6 years ago by alecm
Could anyone who sees this error try the steps listed here: http://plone.org/documentation/faq/importing-2.0-content-into-2.1 and report if this resolves the issue?
comment:9 Changed 6 years ago by Anonymous User
I've followed those instructions and created a new Plone site. The term 'import' is unclear to me, but I copy and pasted content from the old to the new and ran the suggested migrations. The recursion error is gone, but I'm now getting:
Error Type
TypeError
Error Value
call() takes exactly 1 argument (3 given)
when loading documents and folder contents for about half the content.
Mike
comment:10 Changed 6 years ago by Anonymous User
Using rc2 on the plone site I'd already attempted to upgrade with rc1 has problems.
I went back to the clean 2.0.5 site (having not used rc1 on it) and upgraded straight to rc2. This time had no problems.
Mike
comment:11 Changed 6 years ago by alecm
Oh, I needed to be more clear here. The first two steps of those instructions are unnecessary for people who are attempting to migrate a site in place. The issue is that both a bad migration (usually due to a previous partial ATCT migration) or a direct import of CMF content can result in the same issues, which are likely to be solved by the last 3 steps.
Great to know you've got it working now.
comment:12 Changed 6 years ago by hannosch
- Component changed from Infrastructure to Upgrade/Migration
- Description modified (diff)
- Milestone changed from 2.1 to 2.1.x
comment:13 Changed 6 years ago by hannosch
- Status changed from new to closed
- Resolution set to fixed
According to Mike the problem is resolved since Plone 2.1.
comment:14 Changed 6 years ago by NorbertK
- Status changed from closed to reopened
- Resolution fixed deleted
Problems like these still occur in 2.1.1
comment:16 Changed 6 years ago by hannosch
- Status changed from reopened to closed
- Resolution set to fixed
We fixed some bugs in Plone 2.1.2 which should finally make sure all old content is actually converted to the new types, lack of these seemed to be the main reason for this error.
If you encounter this problem on your site, please make sure you try out Plone 2.1.2 first and in case this does not resolve your problem (and you have no customized templates which could cause this) reopen this issue and provide detailed information on which kind of content objects this fails (look in the ZMI for the type of the object or try to find it in the catalog).
comment:18 Changed 6 years ago by tim@…
I was getting this error on an in-place migration from 2.0.5 to 2.1.2, and after following all the suggestions here and elsewhere, I was finally able to resolve it by deleting my "portal_types" object and importing a copy from a fresh Plone instance.
Hopefully this bit of knowledge will help someone and save them the time I spent on it.

Optilude PLEASE get behind this call loop thingy. I have seen the report 500 times now, and we'll see it many, many more times. Python 2.4 or (seemingly even?) not.