Ticket #2097 (new defect)

Opened 10 years ago

Sites created with CPSComment and CPSRelations profile are broken

Reported by: gracinet Owned by: gracinet
Priority: P2 Milestone: CPS 3.4.10
Component: CPSComment Version: TRUNK
Severity: major Keywords:


Workaround: manually (re)import CPSComment profile after site creation, or use meta profiles.

This is most likely due to the fact that CPSComment profile will be loaded before CPSRelations', and therefore won't be able to create the needed graph. This would be therefore one case among lots of problems related to lack of profiles ordering

Anyway, one gets errors on all documents, with a traceback ending like this:

     URL: file:CPSComment/skins/cpscomment_default/cpscomment_lib.pt
     Line 90, Column 2
     Expression: <PythonExpr ctool.getComments(document,
     sorted=sorted, sort_on=sort_on, reverse=reverse, limit=limit)>
   * Module Products.CPSComment.commenttool, line 342, in getComments

AttributeError: 'NoneType' object has no attribute 'getObjects' 

And indeed, the graph is None.

Side note: this seems to be called on cpsdocument_edit_form as well, which I guess isn't correct.

Reported on 3.5.0, but should affect the 3.4 branch as well CPSComment should not crash in that situation, but log something at ERROR or even CRITICAL level to request a reimport of profile

Note: See TracTickets for help on using tickets.