Re: [Zope] Problem with adding items to ZClass instance
Hm, this is getting hard to answer. Adding normal instances of ZCLasses to other ZClasses should work. Are you adding everything straight from the management interface or programmatically from DTML? If from the management interface, are you sure you always add TinyTable etc from within the instance? If programmatically, could you send the code?
Perhaps you could try and adding one of the problem products in another way (from a dtml method instead of the management interface or the other way around).
The items I'm adding aren't other ZClasses, but rather from python products. I haven't come up with an exhaustive list of which items cause the problem and which don't, but I know at least the TinyTable and ZMySQL DB Connection do, and the DTML Methods/Documents, MailHost and UserFolders don't.
Everything is being added via the interface. I haven't tried adding them via DTML. I've never done that because I haven't had a use for it, so I'm not sure I know how.
I setup a series of screen shots to demonstrate exactly what's happening. Take a look at http://www.logicetc.com/Test/zclass_problem if you're interested.
I looked at it, and found it fishy. The strange thing is, I tried to reproduce it, but I can't. To be sure I added a tiny table plus to an instance not a straight tiny table and a ZODBC adapter, but I doubt whether this would make a difference. Anyway, they both work straight away. This is getting very strange indeed. It seems strange things are happening to your namespace. I can think of some things that may cause problems, but this is all speculation. This may be a bug, but then it's a special one. Anything special about your ZClass - what does it derive from (just objectmanager? anything else that might cause strange behaviour?). Is there a subobjects tab in it's definition? Are the products in there? Rik
-----Original Message----- From: Rik Hoekstra [mailto:rik.hoekstra@inghist.nl] Sent: Monday, June 19, 2000 4:13 PM To: Ron Bickers Cc: zope@zope.org Subject: Re: [Zope] Problem with adding items to ZClass instance
I looked at it, and found it fishy. The strange thing is, I tried to reproduce it, but I can't. To be sure I added a tiny table plus to an instance not a straight tiny table and a ZODBC adapter, but I doubt whether this would make a difference. Anyway, they both work straight away. This is getting very strange indeed. It seems strange things are happening to your namespace.
I can think of some things that may cause problems, but this is all speculation.
This may be a bug, but then it's a special one. Anything special about your ZClass - what does it derive from (just objectmanager? anything else that might cause strange behaviour?). Is there a subobjects tab in it's definition? Are the products in there?
I don't think there's anything "special" about my ZClass. It's derived from Catalog Aware and ObjectManager. I believe I reproduced it without the Catalog Aware and got the same results. I'm using Andy Dustman's version of the MySQLDA and TinyTable v0.8.2. They both work just fine once I get the objects in the right place. Maybe the problem just happens to be with these two products, but I have no clue. You're welcome to fetch the product at ftp://ftp.logicetc.com/pub/Zope/IssueTracker.zexp if you want to give it a look. It's a one day throw-together port of the issue tracking system used by the PHP project with modifications for my own needs. Thanks! _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
I don't think there's anything "special" about my ZClass. It's derived from Catalog Aware and ObjectManager. I believe I reproduced it without the Catalog Aware and got the same results.
I'm using Andy Dustman's version of the MySQLDA and TinyTable v0.8.2. They both work just fine once I get the objects in the right place. Maybe the problem just happens to be with these two products, but I have no clue.
You're welcome to fetch the product at ftp://ftp.logicetc.com/pub/Zope/IssueTracker.zexp if you want to give it a look. It's a one day throw-together port of the issue tracking system used by the PHP project with modifications for my own needs.
OK, I downloaded it and I think I found your problem (not wure how to remediate this, though). If you look in the source of the management screen http://localhost/<somefolder>/<IssueTrackerInstance>/manage_main, the dropdown list for adding Product looks like this: <FORM ACTION="http://localhost/<somefolder>/<IssueTrackerInstance>/" METHOD="GET"> <SELECT NAME=":method" ONCHANGE="location.href='http://localhost/testhier/blup/'+this.options[this.selectedIndex].value"> <OPTION value="manage_workspace" DISABLED>Available Objects <OPTION value="manage_addProduct/OFSP/documentAdd">DTML Document <OPTION value="manage_addProduct/OFSP/methodAdd">DTML Method <OPTION value="manage_addProduct/MailHost/addMailHost_form">Mail Host <OPTION value="manage_addTinyTableForm">TinyTable <OPTION value="manage_addProduct/OFSP/manage_addUserFolder">User Folder <OPTION value="manage_addZMySQLConnectionForm">Z MySQL Database Connection </SELECT> <INPUT TYPE="SUBMIT" VALUE=" Add "> </FORM> As you see, most of the items have a manage_addProducts/.... as a start. Not so with TinyTables and MySQLConnection. They call the add_TinyTableForm and manage_addZMySQLConnection form. They do not switch the namespace to manage_addProduct (not in the form). Why this is a problem, I can't tell, but this _is_ the problem. I'm not quite sure about the solution. Probably it's best to make a custom manage_main form that does the right incantations for adding products and then map this to your Contents View in the ZCLass definition. As a side I'd like to remark that all products should comply with the same manage_addProduct interface, because the current situation leads to nasty problems. Rik
Thanks a lot for your help on this weird one! Now that I know what to look into, I'll do that. _______________________ Ron Bickers Logic Etc, Inc. rbickers@logicetc.com
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Rik Hoekstra Sent: Tuesday, June 20, 2000 4:53 AM To: Ron Bickers Cc: zope@zope.org Subject: Re: [Zope] Problem with adding items to ZClass instance
OK, I downloaded it and I think I found your problem (not wure how to remediate this, though). If you look in the source of the management screen http://localhost/<somefolder>/<IssueTrackerInstance>/manage_main, the dropdown list for adding Product looks like this:
<FORM ACTION="http://localhost/<somefolder>/<IssueTrackerInstance>/" METHOD="GET"> <SELECT NAME=":method" ONCHANGE="location.href='http://localhost/testhier/blup/'+this.opt ions[this.selectedIndex].value"> <OPTION value="manage_workspace" DISABLED>Available Objects <OPTION value="manage_addProduct/OFSP/documentAdd">DTML Document <OPTION value="manage_addProduct/OFSP/methodAdd">DTML Method <OPTION value="manage_addProduct/MailHost/addMailHost_form">Mail Host <OPTION value="manage_addTinyTableForm">TinyTable <OPTION value="manage_addProduct/OFSP/manage_addUserFolder">User Folder <OPTION value="manage_addZMySQLConnectionForm">Z MySQL Database Connection </SELECT> <INPUT TYPE="SUBMIT" VALUE=" Add "> </FORM>
As you see, most of the items have a manage_addProducts/.... as a start. Not so with TinyTables and MySQLConnection. They call the add_TinyTableForm and manage_addZMySQLConnection form. They do not switch the namespace to manage_addProduct (not in the form). Why this is a problem, I can't tell, but this _is_ the problem.
I'm not quite sure about the solution. Probably it's best to make a custom manage_main form that does the right incantations for adding products and then map this to your Contents View in the ZCLass definition.
As a side I'd like to remark that all products should comply with the same manage_addProduct interface, because the current situation leads to nasty problems.
Rik
participants (2)
-
Rik Hoekstra -
Ron Bickers