Link Issue #1
Peter Zechmeister <[email protected]>
| Newsgroups | gmane.comp.cms.zms.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi ZMS-Developers,
ZMS 2.11.0-34 (Build #131d)
Issue #1:
I dunno why, but since yesterday linking does not work any more. Links
can be made and saved. But if someone tries to open an object with a
link and to change the link by pressing the '...'-button, the
select-object-window comes up and shows an site-error. Until yesterday
this had worked properly.
Now I changed something in ZMS-code:
zms.py
#
--------------------------------------------------------------------------
# ZMS.getHome
#
--------------------------------------------------------------------------
def getHome(self):
"""
Returns the home-folder of the site.
"""
docElmnt = self.getDocumentElement()
ob = docElmnt
try:
depth = 0
while ob.meta_type != 'Folder':
if depth > sys.getrecursionlimit():
raise "Maximum recursion depth exceeded"
depth = depth + 1
ob = ob.aq_parent
except:
# *** Weboffice pze 081104 ***
try: # original
ob = getattr( docElmnt,
docElmnt.absolute_url().split( '/')[-2])
except: # Weboffice-Version
ob = getattr( docElmnt,
docElmnt.absolute_url().split( '/')[-1]).aq_parent
return ob
I think, that until yesterday only the first try-branch got executed.
Now something happened and the first except-branch gets done but there
is a bug I think:
In case of http://www2.jku.at/content as the docElmnt, this line
ob = getattr( docElmnt, docElmnt.absolute_url().split( '/')[-2])
tries to getattr( docElmnt, 'www2.jku.at')
which cannot work.
I did a dirty workaround which seem to work (see above) but I think I do
not see the whole picture.
Could you please tell me, is this a bug or is something wrong with our
setup?
Regards
PeterZ, JKU