[ZCM] [ZC] 825/ 2 Reject "Identical property name and value causes trouble"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin@zope.org
Wed, 26 Feb 2003 09:45:50 -0500


Issue #825 Update (Reject) "Identical property name and value causes trouble"
 Status Rejected, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/825

==============================================================
= Reject - Entry #2 by Caseman on Feb 26, 2003 9:45 am

 Status: Pending => Rejected

This is a general flaw that runs deep in the property manager implementation. This is being implemented entirely differently in Zope 3 to solve these types of problems, but it is not going to be fixed for Zope 2.x. As a workaround, make sure the property name and value are not the same.

If you wish to simply disallow this senario, please supply a patch that implements some sanity checking.
________________________________________
= Request - Entry #1 by Anonymous User on Feb 26, 2003 8:21 am

Selection and multiple-selection properties don't seem to display a list of values when the property name and property value are identical.

For example: I created a simple Python script that returns a tuple of strings.  I called it "categories".

I then created a folder, and created a new "categories" property within the folder.  The type was set to be "multiple selection", and the value was set to be "categories", meaning that the list of values should be taken from the "categories" Python script.

However, when the property name and value are identical (on selection and multiple selection properties only), Zope displays an empty selection list.  If any other properties are using the same Python script, then they also get empty selection lists.  (No, there's no good reason to do that.)

Zope should either forbid identical names and values, or should display things appropriately.

==============================================================