cubicweb-bootstrap #5248804 monkey-patch cubes which are not used by the instance [open]

I've been warned by weird warning on the startup of my instance:

2015-04-15 08:49:33 - (cubicweb.rtags) WARNING: removing rtag ('*', 'tags', '*', 'subject'): set(['main_hidden']), tags undefined in schema 2015-04-15 08:49:33 - (cubicweb.rtags) WARNING: removing rtag ('*', 'tags', '*', 'object'): set(['main_hidden']), tags undefined in schema

while it doesn't use the tags cube. After investigation, it appeared that this was because the bootstrap cubes is importing cubes.tag.views to monkey patch some method, disregarding wether the instance is using it or not.

Looking at the code :

try:
   from cubes.tag.views import SimilarityBox
except ImportError:
   pass
else:
   from logilab.common.decorators import monkeypatch
   from cubicweb import tags

   @monkeypatch(SimilarityBox)
   def render_body(self, w):
       # bs customization begins
       self._cw.view('list', self.cw_rset, w=w, klass='list-unstyled')
       # bs customization ends
       rql = self.rql % '' % {'x': self.entity.eid}
       title = self._cw._('entities similar to %s') % self.entity.dc_title()
       url = self._cw.build_url('view', rql=rql,
                                vtitle=title)
       w(u'<div>[%s]</div>' % tags.a(self._cw._('see all'), href=url))

it seems that this should be protected by if 'tag' in vreg.config.cubes() within the registration_callback method. And this should be generalized to other bootstrat views monkey-patching other cube's views.

priorityimportant
typebug
done in<not specified>
closed by<not specified>