Skip to content.

Etria Lists

 

[quills-dev] tim2p-towards-1.7 branch progress

Tim Hicks tim at sitefusion.co.uk
Tue Feb 19 16:41:07 UTC 2008


Reinout van Rees wrote:
> Tim Hicks schreef:
>> First, the buildout for this is now at 
>> <http://svn.plone.org/svn/collective/Quills/bundles/quills-buildout/branches/tim2p-towards-1.7>.
> 
> Downloading...

Cool :).

>>    1. The 'Add Comment' button never gets shown for 
>> Documents-masquerading-as-weblogentries when traversed to via the 
>> transient archive hierarchy that we construct.  I guess this is 
>> something to do with how viewlets get looked up, but I'm afraid I have 
>> no knowledge of that.  Does anybody here understand these things?
>>
>>    2. Anonymous views of a Folder-masquerading-as-a-weblog appear to 
>> throw an Unauthorized exception.  I've run out of time to track this 
>> down, but I'm sure it'll be trivial for someone to do this.
> 
> 1 and 2 might even be related. There could be breakage somewhere in the 
> traversal chain that trows both off. Perhaps a test that just tests 
> whether all the expected interfaces are provided?

We already have tests verifying that classes are actually implementing 
the interfaces that they claim to.  They all pass, so I guess that's not it.

My suspicion is that the two problems are not related as viewing a 
Folder-as-weblog involves none of our special traversal.  I'm guessing 
the latter is due to some bad/missing security declaration.  The former 
is a mystery to me.

>> That said, there is one other issue that would prohibit a release of the 
>> QuillsEnabled code.  At the moment, weblog portlets do not get rendered 
>> when viewing weblog entries.  There are technical reasons for this that 
>> I'd be delighted to discuss with anybody interested.  I haven't figured 
>> out how to make this work yet.
> 
> By all means post your technical reasons :-)

The approach taken in QuillsEnabled is to use ZCML to mark classes with 
IPossibleWeblog and IPossibleWeblogEntry interfaces to indicate that 
they are weblog-enable-able (to abuse language horribly).  There is then 
also an IWeblogEnhanced interface that is used to mark individual 
objects/instances (Folders, currently) to indicate that they should be 
treated as weblogs.

This works fine for rendering portlets for the folder/weblog as we can 
arrange for quills' portlets to show up only when the weblog has been 
marked with IWeblogEnhanced.

However, the Documents contained within the weblog/folder are only 
marked with IPossibleWeblog, but I have not figured out a good/efficient 
way of distinguishing between those IPossibleWeblog-marked instances 
that are (in some sense) currently contained in an IWeblogEnhanced 
folder, and those that are not.

We could register our portlets for all IPossibleWeblogEntry objects and 
then have the renderer crawl up the aq_chain looking for an object 
implementing either IWeblog directly (as in the Quills case) or 
IWeblogEnhanced (as in the QuillsEnabled case).  Somehow that feels a 
bit heavy handed, although it may not actually come with performance 
penalties as presumably zope's standard traversal mechanism will have 
'woken up' all parent objects.

Another alternative is to mark the request object with an interface 
during our custom traversal mechanism so that we know when we are 
operating "inside" a weblog.

Thoughts?


Tim


More information about the quills-dev mailing list