Plone NGO Mailing List naming content error

4 messages Options
Embed this post
Permalink
Sisi Nutt

Plone NGO Mailing List naming content error

Reply Threaded More More options
Print post
Permalink

Hi all,

I have encountered a problem on my extranet while naming folders and
content. If I give either a folder or a content the short name "rights"
it chokes the parent folder and all it's children, giving me an error
message in the properties tab:  Error Value
    isBinary() takes exactly 2 arguments (1 given)

Took me ages just to work out what was giving the damn error, I was very
surprised when I found out it was because I used the word "rights" as a
title of a folder. Renaming it to env-rights solves the problem.

Anyway, this is a problem for me, we have a campaign on environmental
and human rights. And while I can control what names we use in the
navigation, I can't control what people call the documents they upload.
And we use the word "rights" ALOT!

If anyone has any tips for me I'd really appreciate it. I'm struggling
to understand the error message. Trace back pasted below.

Cheers,
sisi

Traceback (innermost last):
  Module ZPublisher.Publish, line 114, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 40, in call_object
  Module Products.CMFFormController.FSControllerPageTemplate, line 102,
in __call__
  Module Products.CMFFormController.BaseControllerPageTemplate, line 46,
in _call
  Module Shared.DC.Scripts.Bindings, line 311, in __call__
  Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
  Module Products.CMFCore.FSPageTemplate, line 195, in _exec
  Module Products.CMFCore.FSPageTemplate, line 134, in pt_render
  Module Products.PageTemplates.PageTemplate, line 104, in pt_render
   - <FSControllerPageTemplate at
/foeiMultisiteFolder/insite/base_metadata used for
/foeiMultisiteFolder/insite/programs/campaign-coordinators/camp-coords.jpg>
  Module TAL.TALInterpreter, line 206, in __call__
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 690, in do_defineMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 711, in do_useMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 742, in do_defineSlot
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 690, in do_defineMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 734, in do_defineSlot
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 690, in do_defineMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 653, in do_loop_tal
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 711, in do_useMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 711, in do_useMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 677, in do_condition
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 677, in do_condition
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 424, in do_optTag_tal
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 734, in do_defineSlot
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 711, in do_useMacro
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 426, in do_optTag_tal
  Module TAL.TALInterpreter, line 411, in do_optTag
  Module TAL.TALInterpreter, line 406, in no_tag
  Module TAL.TALInterpreter, line 250, in interpret
  Module TAL.TALInterpreter, line 477, in do_setLocal_tal
  Module Products.PageTemplates.TALES, line 221, in evaluate
   - URL: file:Archetypes/skins/archetypes/widgets/textarea.pt
   - Line 16, Column 6
   - Expression: <PythonExpr base and value.isBinary() or
here.isBinary(fieldName)>
   - Names:
      {'container': <PloneSite at /foeiMultisiteFolder/insite>,
       'context': <ATPhoto at
/foeiMultisiteFolder/insite/programs/campaign-coordinators/camp-coords.jpg>,
       'default': <Products.PageTemplates.TALES.Default instance at
0x40ba5b2c>,
       'here': <ATPhoto at
/foeiMultisiteFolder/insite/programs/campaign-coordinators/camp-coords.jpg>,
       'loop': <Products.PageTemplates.TALES.SafeMapping object at
0x474518ec>,
       'modules':
<Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
0x40bb6a2c>,
       'nothing': None,
       'options': {'args': (),
                   'state':
<Products.CMFFormController.ControllerState.ControllerState object at
0x46e8408c>},
       'repeat': <Products.PageTemplates.TALES.SafeMapping object at
0x474518ec>,
       'request': <HTTPRequest,
URL=http://10.0.0.25:8080/foeiMultisiteFolder/insite/programs/campaign-coordinators/camp-coords.jpg/base_metadata>,
       'root': <Application at >,
       'template': <FSControllerPageTemplate at
/foeiMultisiteFolder/insite/base_metadata used for
/foeiMultisiteFolder/insite/programs/campaign-coordinators/camp-coords.jpg>,
       'traverse_subpath': [],
       'user': admin}
  Module Products.PageTemplates.ZRPythonExpr, line 47, in __call__
   - __traceback_info__: base and value.isBinary() or
here.isBinary(fieldName)
  Module Python expression "base and value.isBinary() or
here.isBinary(fieldName)", line 1, in <expression>
  Module Products.Archetypes.BaseObject, line 270, in isBinary
TypeError: isBinary() takes exactly 2 arguments (1 given)



--
# sisi nutt # extranet coordinator
# Friends of the Earth International
# PO Box 19199 # 1000 GD Amsterdam # The Netherlands
# Tel 31 20 6221369  # Fax 31 20 6392181  # http://www.foei.org
# email [hidden email] # skype foei_sisi

_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Alexander Limi

Re: Plone NGO Mailing List naming content error

Reply Threaded More More options
Print post
Permalink
On Thu, 16 Nov 2006 06:49:24 -0800, sisi  
<[hidden email]> wrote:

> Took me ages just to work out what was giving the damn error, I was very
> surprised when I found out it was because I used the word "rights" as a
> title of a folder. Renaming it to env-rights solves the problem.

Plone has a blacklist of IDs that can not be used in IDs (and yes, rights  
is one of them), it should be added to this blacklist. Please file a bug  
in the Plone issue tracker: http://dev.plone.org/plone

The technical reason is that Dublin Core has a metadata element called  
"rights", and because of acquisition and the way the catalog works, this  
becomes a global namespace issue.


--
_____________________________________________________________________

      Alexander Limi · Chief Architect · Plone Solutions · Norway

  Consulting · Training · Development · http://www.plonesolutions.com
_____________________________________________________________________

       Plone Co-Founder · http://plone.org · Connecting Content
   Plone Foundation · http://plone.org/foundation · Protecting Plone
 


_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Alexander Limi · http://limi.net

Calvin Hendryx-Parker

Re: Plone NGO Mailing List naming content error

Reply Threaded More More options
Print post
Permalink

On Nov 16, 2006, at 9:04 PM, Alexander Limi wrote:
>
> Plone has a blacklist of IDs that can not be used in IDs (and yes,  
> rights is one of them), it should be added to this blacklist.  
> Please file a bug in the Plone issue tracker: http://dev.plone.org/ 
> plone
>
> The technical reason is that Dublin Core has a metadata element  
> called "rights", and because of acquisition and the way the catalog  
> works, this becomes a global namespace issue.

Are there plans for fixing this?  We have run into this recently in a  
way that isn't as easy to get around.  While working on the Rosetta  
project they have languages that have 3 letter iso codes associated  
with them.  So the obvious choice for these objects in the system  
would be this code.  Unfortunately "alt" is one of them and this  
causes a similar issue as anytime you are in the container that  
contains the "alt" object all images that are using the OFS.Image.tag
() method are picking up that first for the alt property.

Seems like a core bug in acquisition that an image object which  
should have an alt attribute on it is picking up via acquisition an  
object from the same container before it gets its own attribute.  So  
my question is should we file a bug with Zope or is there already one  
being tracked that I haven't seen yet?

Thanks,
Calvin

--
S i x  F e e t  U p , I n c .  |  "Nowhere to go but open source"
Silicon Valley: +1 (650) 401-8579 x602
Midwest: +1 (317) 861-5948 x602
Toll-Free: 1-866-SIX-FEET
mailto:[hidden email]
http://www.sixfeetup.com  |  Zope/Plone Dedicated Hosting from $39/month



_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
S i x  F e e t  U p ,  I n c .  |  "Nowhere to go but open source"
Midwest: +1 (317) 861-5948 x602
Toll-Free: 1-866-SIX-FEET
mailto:calvin@sixfeetup.com
http://www.sixfeetup.com  |  Zope/Plone Custom Development
Alexander Limi

Re: Plone NGO Mailing List naming content error

Reply Threaded More More options
Print post
Permalink
On Thu, 16 Nov 2006 18:24:17 -0800, Calvin Hendryx-Parker  
<[hidden email]> wrote:

> Seems like a core bug in acquisition that an image object which should  
> have an alt attribute on it is picking up via acquisition an object from  
> the same container before it gets its own attribute.  So my question is  
> should we file a bug with Zope or is there already one being tracked  
> that I haven't seen yet?

We have reported this a few years back, but I'm not sure it can be fixed  
easily. Maybe it's doable now, I believe it was rejected earlier. If you  
could follow up on this (since you have an interest in it), maybe it can  
be fixed.

--
_____________________________________________________________________

      Alexander Limi · Chief Architect · Plone Solutions · Norway

  Consulting · Training · Development · http://www.plonesolutions.com
_____________________________________________________________________

       Plone Co-Founder · http://plone.org · Connecting Content
   Plone Foundation · http://plone.org/foundation · Protecting Plone
 


_______________________________________________
NGO mailing list
[hidden email]
http://lists.plone.org/mailman/listinfo/ngo
Alexander Limi · http://limi.net