Re: [Zope3-dev] Problem with partialAnnotatableAdapters
Am Freitag, 27. Mai 2005 16:33 schrieb Jim Fulton: > Fred Drake wrote: > > On 5/25/05, Ivo van der Wijk <[EMAIL PROTECTED]> wrote: > >>I'm trying something similar right now as well - "sharing" the title > >>field between DC and content. Everything works fine, until I try to > >>change the title through the Metadata tab: > > > > This is interesting. We're not using the Metadata tab at all in the > > application for which we initially determined that something like this > > is needed. I'll have to take a look at this next week if someone > > doesn't figure it out before then; can't do it now. A collector issue > > is in order. > > Actually, I ran into this yesterday. I'll be checking in at least a > partial fix today. Hello, have you already checked it in? I went through the checkin mails but couldn't find anything which I could identify to patch it. ;-) Thanks, Florian ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Problem with partialAnnotatableAdapters
Fred Drake wrote: On 5/25/05, Ivo van der Wijk <[EMAIL PROTECTED]> wrote: I'm trying something similar right now as well - "sharing" the title field between DC and content. Everything works fine, until I try to change the title through the Metadata tab: This is interesting. We're not using the Metadata tab at all in the application for which we initially determined that something like this is needed. I'll have to take a look at this next week if someone doesn't figure it out before then; can't do it now. A collector issue is in order. Actually, I ran into this yesterday. I'll be checking in at least a partial fix today. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Problem with partialAnnotatableAdapters
On 5/25/05, Ivo van der Wijk <[EMAIL PROTECTED]> wrote: > I'm trying something similar right now as well - "sharing" the title > field between DC and content. Everything works fine, until I try to > change the title through the Metadata tab: This is interesting. We're not using the Metadata tab at all in the application for which we initially determined that something like this is needed. I'll have to take a look at this next week if someone doesn't figure it out before then; can't do it now. A collector issue is in order. -Fred -- Fred L. Drake, Jr. Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Problem with partialAnnotatableAdapters
On Thursday 19 May 2005 13:45, Florian Lindner wrote: > File "/home/florian/Zope3/src/zope/tales/tales.py", line 698, in evaluate > return expression(self) > File "/home/florian/Zope3/src/zope/tales/expressions.py", line 204, in > __call__ > return self._eval(econtext) > File "/home/florian/Zope3/src/zope/tales/expressions.py", line 198, in > _eval return ob() > File > "/home/florian/Zope3/src/zope/app/dublincore/browser/metadataedit.py", line > 37, in edit > dc.title = unicode(request['dctitle']) > ForbiddenAttribute: ('title', > at 0xb2a5a12c>) > 127.0.0.1 - zope.manager [19/May/2005:19:38:34 +0200] > "POST /cs/home/zope.manager/testfolder/Link/@@EditMetaData.html HTTP/1.1" > 500 316 > "http://localhost:8080/cs/home/zope.manager/testfolder/Link/@@EditMetaData. >html" "Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like > Gecko)" This is because the ZDCPartialAnnotatableAdapter has not the correct security settings. A totally different solution is provided by the Wiki and Bugtracker, that uses properties to implement the title on the object and the data is simply stored in the annotations. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Problem with partialAnnotatableAdapters
On 5/19/05, Florian Lindner <[EMAIL PROTECTED]> wrote: > Am Donnerstag, 19. Mai 2005 19:07 schrieb Stephan Richter: > > On Thursday 19 May 2005 13:02, Florian Lindner wrote: > > > > > for=".link.Link" > > > provides="zope.app.dublincore.interfaces.IZopeDublinCore" > > > factory=".link.factory" > > > /> > > > > You need to make this a trusted adapter and provide a permission for > > accessing it, i.e. add ``trusted="True"`` and ``permission="zope.public"`` > > Ok. thanks a lot! > I'm trying something similar right now as well - "sharing" the title field between DC and content. Everything works fine, until I try to change the title through the Metadata tab: File "/home/ivo/Work/Zope3/Zope3-svn/src/zope/app/dublincore/browser/metadataedit.py", line 37, in edit dc.title = unicode(request['dctitle']) ForbiddenAttribute: ('title', ) Retrieval of the title attribute works fine (i.e. it's displayed nicely in folder content listings) Cheers Ivo -- Drs. I.R. van der Wijk -=- Korte Leidsedwarsstraat 12 Amaze 1017 RC Amsterdam, NL -=- T +31-20-4688336 F +31-20-4688337 Zope/Plone/Content Management W http://www.amaze.nlE [EMAIL PROTECTED] Open Source Solutions W http://vanderwijk.info E [EMAIL PROTECTED] Consultancy PGP http://vanderwijk.info/pgp ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Problem with partialAnnotatableAdapters
Am Donnerstag, 19. Mai 2005 19:07 schrieb Stephan Richter: > On Thursday 19 May 2005 13:02, Florian Lindner wrote: > > Â Â > Â Â Â Â for=".link.Link" > > Â Â Â Â provides="zope.app.dublincore.interfaces.IZopeDublinCore" > > Â Â Â Â factory=".link.factory" > > Â Â Â Â /> > > You need to make this a trusted adapter and provide a permission for > accessing it, i.e. add ``trusted="True"`` and ``permission="zope.public"`` Ok. thanks a lot! It works, however I get another, not so grave error. I add the object. I can edit the schema description field and the DC description fields changes as well. But when I hit the "Save changes" (Ãnderungen spreichern) or "Refresh" (Auffrischen) buttons in the meta data pane, regardless whether I changed something or not I get a system error with this backtrace: File "/home/florian/Zope3/src/zope/tales/tales.py", line 698, in evaluate return expression(self) File "/home/florian/Zope3/src/zope/tales/expressions.py", line 204, in __call__ return self._eval(econtext) File "/home/florian/Zope3/src/zope/tales/expressions.py", line 198, in _eval return ob() File "/home/florian/Zope3/src/zope/app/dublincore/browser/metadataedit.py", line 37, in edit dc.title = unicode(request['dctitle']) ForbiddenAttribute: ('title', ) 127.0.0.1 - zope.manager [19/May/2005:19:38:34 +0200] "POST /cs/home/zope.manager/testfolder/Link/@@EditMetaData.html HTTP/1.1" 500 316 "http://localhost:8080/cs/home/zope.manager/testfolder/Link/@@EditMetaData.html"; "Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)" I have not touched the title field (it is empty) neither do I have created a mapping for it. Only the description field is mapped. Regards, Florian ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] Problem with partialAnnotatableAdapters
On Thursday 19 May 2005 13:02, Florian Lindner wrote: > Â Â Â Â Â Â for=".link.Link" > Â Â Â Â provides="zope.app.dublincore.interfaces.IZopeDublinCore" > Â Â Â Â factory=".link.factory" > Â Â Â Â /> You need to make this a trusted adapter and provide a permission for accessing it, i.e. add ``trusted="True"`` and ``permission="zope.public"`` Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
[Zope3-dev] Problem with partialAnnotatableAdapters
Hello, I try to connect a schema field with a dublin core metadata field using partialAnnotatableAdapterFactory. I'm logged in as zope.Manager. My configure.zcml: My link.py: [...] from zope.app.dublincore import annotatableadapter factory = annotatableadapter.partialAnnotatableAdapterFactory(["description"]) the description field is defined in the interface: description = TextLine ( title = u"Description", description = u"Description which mirrors the DC metadata.", required = False) What is wrong there? The backtrace is pasted at the end of the mail. Thanks, Florian 2005-05-16T17:26:57 ERROR SiteError http://localhost:8080/cs/home/zope.manager/+/AddCSLink.html%3D Traceback (most recent call last): [...] File "/home/florian/Zope3/src/zope/app/dublincore/timeannotators.py", line 31, in ModifiedAnnotator dc.modified = datetime.utcnow() File "/home/florian/Zope3/src/zope/app/dublincore/zopedublincore.py", line 75, in __set__ super(DateProperty, self).__set__(inst, value) File "/home/florian/Zope3/src/zope/app/dublincore/zopedublincore.py", line 48, in __set__ inst._changed() File "/home/florian/Zope3/src/zope/app/dublincore/annotatableadapter.py", line 49, in _changed self.annotations[DCkey] = self._mapping File "/home/florian/Zope3/src/zope/app/annotation/attribute.py", line 66, in __setitem__ annotations = self.obj.__annotations__ = OOBTree() ForbiddenAttribute: ('__annotations__', ) 127.0.0.1 - zope.manager [16/May/2005:17:26:57 +0200] "POST /cs/home/zope.manager/+/AddCSLink.html%3D HTTP/1.1" 500 316 "http://localhost:8080/cs/home/zope.manager/+/AddCSLink.html="; "Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)" ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com