cubicweb #784299 Form error display in non-ajax mode [resolved]

When using non-ajax mode to validate a form, if a Validation error occurs, it's not displayed correctly. The reason is : the form field_error method doesn't find the error in the self.form_valerror.errors dict, because the keys in it are based on whereas it searches for field.role_name() (the latter being the supposed correct behaviour).

Below is a (custom printed) traceback showing where the ValidationError comes from in our case (=> yams)

File "/home/vincent/veolia/cubicweb/web/views/", line 256, in _action_apply
File "/home/vincent/veolia/cubicweb/web/views/", line 86, in _default_publish
  eid = self.edit_entity(formparams)
File "/home/vincent/veolia/cubicweb/web/views/", line 173, in edit_entity
  self._update_entity(eid, rqlquery)
File "/home/vincent/veolia/cubicweb/web/views/", line 131, in _update_entity
  self._cw.execute(rqlquery.update_query(eid), rqlquery.kwargs)
File "/home/vincent/veolia/cubicweb/", line 291, in execute
  return self.cursor.execute(*args, **kwargs)
File "/home/vincent/veolia/cubicweb/", line 650, in execute
  parameters, eid_key, build_descr)
File "/home/vincent/veolia/cubicweb/server/", line 588, in execute
File "/home/vincent/veolia/cubicweb/server/", line 659, in execute
  results = plan.execute()
File "/home/vincent/veolia/cubicweb/server/", line 172, in execute
  result = step.execute()
File "/home/vincent/veolia/cubicweb/server/", line 446, in execute
  repo.glob_update_entity(session, edef, attributes)
File "/home/vincent/veolia/cubicweb/server/", line 1043, in glob_update_entity
File "/home/vincent/veolia/cubicweb/", line 871, in check
  self.e_schema.check(self, creation=creation, _=_)
File "/home/vincent/veolia/yams/", line 521, in check
  raise ValidationError(entity, errors)
done in3.7.2
load left0.000
closed by<not specified>