cubicweb-book #343095 Error when click on an author [deprecated]

On the book's primary view, when we click on the author link, we obtain the following error page

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 4)</p>
Literal block expected; none found.

ProgrammingError: function phonetype_sort_value(character varying) does not exist LINE 4: ORDER BY PHONETYPE_SORT_VALUE(X.type) DESC

ReST / HTML errors:System Message: ERROR/3 (&lt;string&gt; , line 6)</p>
Unexpected indentation.
^
ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 7)</p>
Block quote ends without a blank line; unexpected unindent.

HINT: No function matches the given name and argument types. You might need to add explicit type casts.

function phonetype_sort_value(character varying) does not exist LINE 4: ORDER BY PHONETYPE_SORT_VALUE(X.type) DESC

ReST / HTML errors:System Message: ERROR/3 (&lt;string&gt; , line 11)</p>
Unexpected indentation.
^
ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 12)</p>
Block quote ends without a blank line; unexpected unindent.

HINT: No function matches the given name and argument types. You might need to add explicit type casts.

File /usr/lib/python2.5/site-packages/cubicweb/web/application.py, line 321, function main_publish:

result = controller.publish(rset=rset)

[+] ctrlid='view', self=<cubicweb.web.application.CubicWebPublisher object at 0x8b1feec>, req=<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at 0x9f4572c>, rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, controller=<cubicweb.web.views.basecontrollers.ViewController object at 0xa4e856c>, ex=ProgrammingError('function phonetype_sort_value(character varying) does not existnLINE 4: ORDER BY PHONETYPE_SORT_VALUE(X.type) DESCn ^nHINT: No function matches the given name and argument types. You might need to add explicit type casts.n',), tstart=32.659999999999997, path='/person/Raskin',

File /usr/lib/python2.5/site-packages/cubicweb/web/views/basecontrollers.py, line 66, function publish:

return self.vreg.main_template(self.req, template, rset=rset)

[+] self=<cubicweb.web.views.basecontrollers.ViewController object at 0xa4e856c>, rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, template=u'main',

File /usr/lib/python2.5/site-packages/cubicweb/cwvreg.py, line 165, function main_template:

res = self.render('templates', oid, req, **context)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 39); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] self=<cubicweb.cwvreg.CubicWebRegistry object at 0x8b1fecc>, oid=u'main', req=<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at 0x9f4572c>, context={'rset': <resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>},

File /usr/lib/python2.5/site-packages/cubicweb/cwvreg.py, line 158, function render:

return selected.dispatch(**context)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 49); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] oid=u'main', self=<cubicweb.cwvreg.CubicWebRegistry object at 0x8b1fecc>, req=<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at 0x9f4572c>, rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, selected=<cubicweb.web.views.basetemplates.TheMainTemplate object at 0x9ff3a0c>, context={}, registry='templates', objclss=[<class 'cubicweb.web.views.basetemplates.TheMainTemplate'>],

File /usr/lib/python2.5/site-packages/cubicweb/common/view.py, line 144, function dispatch:

view_func(**context)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 61); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] w=None, stream=<cubicweb.common.utils.HTMLStream object at 0xa15406c>, self=<cubicweb.web.views.basetemplates.TheMainTemplate object at 0x9ff3a0c>, col=None, context={}, view_func=<bound method TheMainTemplate.call of <cubicweb.web.views.basetemplates.TheMainTemplate object at 0x9ff3a0c>>, row=None,

File /usr/lib/python2.5/site-packages/cubicweb/web/views/basetemplates.py, line 142, function call:

view.dispatch(w=self.w)

[+] with_templates=True, self=<cubicweb.web.views.basetemplates.TheMainTemplate object at 0x9ff3a0c>, req=<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at 0x9f4572c>, rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, content_type='application/xhtml+xml', view=<cubes.person.views.PersonPrimaryView object at 0x9db9d0c>,

File /usr/lib/python2.5/site-packages/cubicweb/common/view.py, line 144, function dispatch:

view_func(**context)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 82); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] w=<bound method HTMLStream.write of <cubicweb.common.utils.HTMLStream object at 0xa15406c>>, stream=None, self=<cubes.person.views.PersonPrimaryView object at 0x9db9d0c>, col=None, context={}, view_func=<bound method PersonPrimaryView.call of <cubes.person.views.PersonPrimaryView object at 0x9db9d0c>>, row=None,

File /usr/lib/python2.5/site-packages/cubicweb/common/view.py, line 167, function call:

self.wview(self.id, rset, row=i, **kwargs)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 92); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] i=0, wrap=False, self=<cubes.person.views.PersonPrimaryView object at 0x9db9d0c>, rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, kwargs={},

File /usr/lib/python2.5/site-packages/cubicweb/common/view.py, line 216, function wview:

self.view(__vid, rset, __fallback_vid, w=self.w, **kwargs)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 101); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] self=<cubes.person.views.PersonPrimaryView object at 0x9db9d0c>, _View__fallback_vid=None, _View__vid='primary', rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, kwargs={'row': 0},

File /usr/lib/python2.5/site-packages/cubicweb/common/view.py, line 211, function view:

return view.dispatch(**kwargs)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 110); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] _View__vid='primary', self=<cubes.person.views.PersonPrimaryView object at 0x9db9d0c>, rset=<resultset u'Any X WHERE X is Person, X surname %(x)s' (1 rows): [5394] (('Person',))>, kwargs={'w': <bound method HTMLStream.write of <cubicweb.common.utils.HTMLStream object at 0xa15406c>>, 'row': 0}, _View__fallback_vid=None, view=<cubes.person.views.PersonPrimaryView object at 0xa0cf44c>,

File /usr/lib/python2.5/site-packages/cubicweb/common/view.py, line 144, function dispatch:

view_func(**context)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 121); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] w=<bound method HTMLStream.write of <cubicweb.common.utils.HTMLStream object at 0xa15406c>>, stream=None, self=<cubes.person.views.PersonPrimaryView object at 0xa0cf44c>, col=None, context={'col': 0, 'row': 0}, view_func=<bound method PersonPrimaryView.cell_call of <cubes.person.views.PersonPrimaryView object at 0xa0cf44c>>, row=0,

File /usr/lib/python2.5/site-packages/cubicweb/web/views/baseviews.py, line 152, function cell_call:

self.render_entity(self.complete_entity(row, col))

[+] self=<cubes.person.views.PersonPrimaryView object at 0xa0cf44c>, col=0, row=0,

File /usr/lib/python2.5/site-packages/cubicweb/web/views/baseviews.py, line 163, function render_entity:

self.render_entity_attributes(entity, siderelations)

[+] self=<cubes.person.views.PersonPrimaryView object at 0xa0cf44c>, siderelations=[], entity=<Entity Person 5394 ['surname', 'modification_date', 'firstname', 'description_format', 'civility', 'creation_date', 'eid', 'description'] at 167606860>,

File /usr/share/cubicweb/cubes/person/views.py, line 22, function render_entity_attributes:

if getattr(entity, 'phone', None):

[+] self=<cubes.person.views.PersonPrimaryView object at 0xa0cf44c>, siderelations=[], entity=<Entity Person 5394 ['surname', 'modification_date', 'firstname', 'description_format', 'civility', 'creation_date', 'eid', 'description'] at 167606860>,

File /usr/lib/python2.5/site-packages/cubicweb/common/entity.py, line 1090, function __get__:

return eobj.related(self._rtype, self._role, entities=True)

[+]

eobj=<Entity Person 5394 ['surname', 'modification_date', 'firstname', 'description_format', 'civility', 'creation_date', 'eid', 'description'] at 167606860>, self=<cubicweb.common.entity.SubjectRelation object at 0x9ae33cc>, eclass=<class 'cubes.person.entities.Person'>,

File /usr/lib/python2.5/site-packages/cubicweb/common/entity.py, line 750, function related:

rset = self.req.execute(rql, {'x': self.eid}, 'x')

[+] rtype='phone', self=<Entity Person 5394 ['surname', 'modification_date', 'firstname', 'description_format', 'civility', 'creation_date', 'eid', 'description'] at 167606860>, entities=True, role='subject', limit=None, rql=u'Any X,AA,AB,AC ORDERBY phonetype_sort_value(AB) DESC WHERE E eid %(x)s, E phone X, X number AA, X type AB, X modification_date AC',

File /usr/lib/python2.5/site-packages/cubicweb/dbapi.py, line 251, function execute:

return self.cursor.execute(*args, **kwargs)

ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 178); <em>backlink</em></p>
Inline emphasis start-string without end-string.
ReST / HTML errors:System Message: WARNING/2 (&lt;string&gt; , line 178); <em>backlink</em></p>
Inline strong start-string without end-string.

[+] self=<cubicweb.etwist.request.CubicWebTwistedRequestAdapter object at 0x9f4572c>, args=(u'Any X,AA,AB,AC ORDERBY phonetype_sort_value(AB) DESC WHERE E eid %(x)s, E phone X, X number AA, X type AB, X modification_date AC', {'x': 5394}, 'x'), kwargs={},

File /usr/lib/python2.5/site-packages/cubicweb/dbapi.py, line 578, function execute:

parameters, eid_key, build_descr)

[+] build_descr=True, operation=u'Any X,AA,AB,AC ORDERBY phonetype_sort_value(AB) DESC WHERE E eid %(x)s, E phone X, X number AA, X type AB, X modification_date AC', eid_key='x', parameters={'x': 5394}, self=<cubicweb.dbapi.Cursor object at 0x9ff394c>,

File /usr/lib/python2.5/site-packages/cubicweb/server/repository.py, line 551, function execute:

build_descr)

[+] session=<cubicweb.server.session.Session object at 0x9eb40ac>, self=<cubicweb.server.repository.Repository object at 0x8b3bd8c>, args={'x': 5394}, eid_key='x', build_descr=True, sessionid='6bb6221c5a9e62d9cbdf8836cfda7877', rqlstring=u'Any X,AA,AB,AC ORDERBY phonetype_sort_value(AB) DESC WHERE E eid %(x)s, E phone X, X number AA, X type AB, X modification_date AC',

File /usr/lib/python2.5/site-packages/cubicweb/server/querier.py, line 648, function execute:

results = plan.execute()

[+]

cachekey=(u'Any X,AA,AB,AC ORDERBY phonetype_sort_value(AB) DESC WHERE E eid %(x)s, E phone X, X number AA, X type AB, X modification_date AC', 'Person'), self=<cubicweb.server.querier.QuerierHelper object at 0x8bb54cc>, args={'x': 5394}, orig_rqlst=Any VarRef(0XA25B10C) to X(0XA36077C),VarRef(0XA25B7AC) to AA(0XA3609EC),VarRef(0XA25BD8C) to AB(0XA3609BC),VarRef(0XA25B54C) to AC(0XA360A1C) ORDERBY PHONETYPE_SORT_VALUE(VarRef(0X9F8C4CC) to AB(0XA3609BC)) DESC WHERE Relation(VarRef(0XA25B02C) to E(0XA360A7C) eid = %(x)s) AND Relation(VarRef(0XA25BFAC) to E(0XA360A7C) phone = VarRef(0X9EB6E0C) to X(0XA36077C)) AND Relation(VarRef(0X9EB6F6C) to X(0XA36077C) number = VarRef(0X9EB634C) to AA(0XA3609EC)) AND Relation(VarRef(0X9EB628C) to X(0XA36077C) type = VarRef(0X9EB6E4C) to AB(0XA3609BC)) AND Relation(VarRef(0X9EB6D0C) to X(0XA36077C) modification_date = VarRef(0X9B2A72C) to AC(0XA360A1C)), eid_key=('x',), build_descr=True, session=<cubicweb.server.session.Session object at 0x9eb40ac>, plan=<cubicweb.server.querier.ExecutionPlan object at 0xa3c2dcc>, key='x', etype='Person', rqlst=Any VarRef(0X9F45C8C) to X(0XA4BFDAC),VarRef(0X9F7486C) to AA(0X9F34E3C),VarRef(0X9F798CC) to AB(0XA0F959C),VarRef(0X9F7940C) to AC(0XA0F9A1C) ORDERBY PHONETYPE_SORT_VALUE(VarRef(0X9F79D6C) to AB(0XA0F959C)) DESC WHERE Relation(%(x)s phone = VarRef(0X9EB6D8C) to X(0XA4BFDAC)) AND Relation(VarRef(0X9EB658C) to X(0XA4BFDAC) number = VarRef(0XA2E1B2C) to AA(0X9F34E3C)) AND Relation(VarRef(0XA2E1F2C) to X(0XA4BFDAC) type = VarRef(0X9FF3BAC) to AB(0XA0F959C)) AND Relation(VarRef(0XA2E1AAC) to X(0XA4BFDAC) modification_date = VarRef(0X9FF364C) to AC(0XA0F9A1C)), rql=u'Any X,AA,AB,AC ORDERBY phonetype_sort_value(AB) DESC WHERE E eid %(x)s, E phone X, X number AA, X type AB, X modification_date AC', select=Any VarRef(0XA25B10C) to X(0XA36077C),VarRef(0XA25B7AC) to AA(0XA3609EC),VarRef(0XA25BD8C) to AB(0XA3609BC),VarRef(0XA25B54C) to AC(0XA360A1C) ORDERBY PHONETYPE_SORT_VALUE(VarRef(0X9F8C4CC) to AB(0XA3609BC)) DESC WHERE Relation(VarRef(0XA25B02C) to E(0XA360A7C) eid = %(x)s) AND Relation(VarRef(0XA25BFAC) to E(0XA360A7C) phone = VarRef(0X9EB6E0C) to X(0XA36077C)) AND Relation(VarRef(0X9EB6F6C) to X(0XA36077C) number = VarRef(0X9EB634C) to AA(0XA3609EC)) AND Relation(VarRef(0X9EB628C) to X(0XA36077C) type = VarRef(0X9EB6E4C) to AB(0XA3609BC)) AND Relation(VarRef(0X9EB6D0C) to X(0XA36077C) modification_date = VarRef(0X9B2A72C) to AC(0XA360A1C)),

File /usr/lib/python2.5/site-packages/cubicweb/server/querier.py, line 161, function execute:

result = step.execute()

[+] step=<cubicweb.server.ssplanner.OneFetchStep object at 0x9f3b50c>, self=<cubicweb.server.querier.ExecutionPlan object at 0xa3c2dcc>,

File /usr/lib/python2.5/site-packages/cubicweb/server/ssplanner.py, line 347, function execute:

inputmap)

[+]

cachekey=(u'Any X,AA,AB,AC ORDERBY PHONETYPE_SORT_VALUE(AB) DESC WHERE %(x)s phone X, X number AA, X type AB, X modification_date AC', 'Person'), inputmap={}, union=Any VarRef(0X9F45C8C) to X(0XA4BFDAC),VarRef(0X9F7486C) to AA(0X9F34E3C),VarRef(0X9F798CC) to AB(0XA0F959C),VarRef(0X9F7940C) to AC(0XA0F9A1C) ORDERBY PHONETYPE_SORT_VALUE(VarRef(0X9F79D6C) to AB(0XA0F959C)) DESC WHERE Relation(%(x)s phone = VarRef(0X9EB6D8C) to X(0XA4BFDAC)) AND Relation(VarRef(0X9EB658C) to X(0XA4BFDAC) number = VarRef(0XA2E1B2C) to AA(0X9F34E3C)) AND Relation(VarRef(0XA2E1F2C) to X(0XA4BFDAC) type = VarRef(0X9FF3BAC) to AB(0XA0F959C)) AND Relation(VarRef(0XA2E1AAC) to X(0XA4BFDAC) modification_date = VarRef(0X9FF364C) to AC(0XA0F9A1C)), self=<cubicweb.server.ssplanner.OneFetchStep object at 0x9f3b50c>, args={'x': 5394}, source=<system source>, session=<cubicweb.server.session.Session object at 0x9eb40ac>, limit=None, result=[], offset=None,

File /usr/lib/python2.5/site-packages/cubicweb/server/sources/native.py, line 281, function syntax_tree_search:

self.doexec(cursor, sql, args)

[+]

cachekey=(u'Any X,AA,AB,AC ORDERBY PHONETYPE_SORT_VALUE(AB) DESC WHERE %(x)s phone X, X number AA, X type AB, X modification_date AC', 'Person'), union=Any VarRef(0X9F45C8C) to X(0XA4BFDAC),VarRef(0X9F7486C) to AA(0X9F34E3C),VarRef(0X9F798CC) to AB(0XA0F959C),VarRef(0X9F7940C) to AC(0XA0F9A1C) ORDERBY PHONETYPE_SORT_VALUE(VarRef(0X9F79D6C) to AB(0XA0F959C)) DESC WHERE Relation(%(x)s phone = VarRef(0X9EB6D8C) to X(0XA4BFDAC)) AND Relation(VarRef(0X9EB658C) to X(0XA4BFDAC) number = VarRef(0XA2E1B2C) to AA(0X9F34E3C)) AND Relation(VarRef(0XA2E1F2C) to X(0XA4BFDAC) type = VarRef(0X9FF3BAC) to AB(0XA0F959C)) AND Relation(VarRef(0XA2E1AAC) to X(0XA4BFDAC) modification_date = VarRef(0X9FF364C) to AC(0XA0F9A1C)), varmap={}, query_args={}, args={'x': 5394}, cursor=<cursor object at 0x9d077d8; closed: 0>, session=<cubicweb.server.session.Session object at 0x9eb40ac>, sql='SELECT X.eid, X.number, X.type, X.modification_datenFROM PhoneNumber AS X, phone_relation AS rel_phone0nWHERE rel_phone0.eid_from=%(x)s AND rel_phone0.eid_to=X.eidnORDER BY PHONETYPE_SORT_VALUE(X.type) DESC', self=<system source>,

File /usr/lib/python2.5/site-packages/cubicweb/server/sources/native.py, line 414, function doexec:

cursor.execute(str(query), args)
prioritynormal
typebug
done in<not specified>
load0.000
load left0.000
closed by<not specified>