[Product-Developers] Re: plone.contentratings for Plone 4

Kees Hink hink at gw20e.com
Fri Feb 12 10:47:09 UTC 2010


I fixed some tests in contentratings/trunk, so they pass in Plone 4. I also
included the patch (mentioned earlier in this thread) to subclass views from
'Acquisition.Explicit'. Still works on Plone 3 as well.

On i go...

Kees Hink wrote:
> The mentioned test passes when testing via ./bin/test -s contentratings. So the
> failing was probably due to missing zcml setup.
> 
> Raphael Ritz wrote:
>> Kees Hink wrote:
>>> While browsing the documentation of contentrating and executing the
>>> python code
>>> in a ./bin/zopepy shell, i ran into this (README.txt:93):
>>>
>>>>>> adapted = IUserRating(content)
>>> Traceback (most recent call last):
>>>   File "<console>", line 1, in <module>
>>> TypeError: ('Could not adapt', <zope.container.sample.SampleContainer
>>> object at
>>> 0x2ad8910>, <InterfaceClass contentratings.interfaces.IUserRating>)
>>>
>> Wild guess: The adapter to IUserRating is registered for
>> an interface (or interfaces) that are no longer provided
>> by some or all relevant content items.
>> If that's the case, one would either have to mark those
>> content types accordingly or adjust/extend the adapter
>> registration.
>>
>> No clue whether that points you in the right direction though,
>>
>>     Raphael
>>
>>
>>
>>> Could this be the cause of the problem, or is this due to some zcml
>>> setup which
>>> is not taken into account when running the code from the zopepy shell?
>>>
>>> I also tried testing using zc.recipe.testrunner, but i don't have this
>>> working yet.
>>>
>>> Kees
>>>




More information about the Product-Developers mailing list