merge
authorsylvain.thenault@logilab.fr
Fri, 09 Jan 2009 17:00:21 +0100
changeset 384 f117f6cefad0
parent 382 03964dd370e7 (current diff)
parent 383 66804d97b919 (diff)
child 385 663f42a881ba
merge
--- a/doc/book/en/D010-faq.en.txt	Fri Jan 09 17:00:01 2009 +0100
+++ b/doc/book/en/D010-faq.en.txt	Fri Jan 09 17:00:21 2009 +0100
@@ -211,3 +211,17 @@
 
   Any change applied to configuration file requires to restart your
   application.
+
+* I get NoSelectableObject exceptions: how do I debug selectors ?
+
+  You just need to put the appropriate context manager around view/component
+  selection: ::
+
+    from cubicweb.common.selectors import traced_selection
+    with traced_selection():
+        comp = self.vreg.select_object('contentnavigation', 'wfhistory',
+                                       self.req, rset, context='navcontentbottom')
+
+  This will yield additional WARNINGs, like this: ::
+
+    2009-01-09 16:43:52 - (cubicweb.selectors) WARNING: selector one_line_rset returned 0 for <class 'cubicweb.web.views.basecomponents.WFHistoryVComponent'>