In the latest version of views 3.x-dev, the function field_views_field_label returns an array instead of a string. This function is used on line 198 of efq_views.views.inc. On line 253 the array is passed though to a t() function which calls check_plain() resulting is the following warning during installation of the module:

htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1355 of includes/bootstrap.inc).

Call stack:
...
PHP 32. call_user_func_array() includes/module.inc:819
PHP 33. efq_views_views_data() includes/module.inc:819
PHP 34. _efq_views_get_field_data() sites/all/modules/efq_views/efq_views.views.inc:19
PHP 35. t() sites/all/modules/efq_views/efq_views.views.inc:252
PHP 36. check_plain() includes/bootstrap.inc:1355

The applied patch should solve the issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz’s picture

Status: Needs review » Needs work

I'd like to see us use this like Views does now, see field_views_field_default_views_data().

xatoo’s picture

Do you mean creating aliases for all other labels of a field?

bojanz’s picture

Yes. We want the efq_views experience to be as close to the Views one as possible.

xatoo’s picture

Status: Needs work » Needs review
FileSize
1.61 KB

A first try.

I just put the labels in the same group as the original, since I wouldn't know how and why an alias might apear in another group with efq_views. Or else, how to retrieve that group name.

fabsor’s picture

Status: Needs review » Reviewed & tested by the community

This approach seems fine to me. The patch works fine, so I will set it to RTBC.

Regarding the grouping of aliases: Since there are no support for relationships in efq_views right now, it doesn't make any sense to try and implement it here in my opinion, better to get this in, since it is a major usability oddity =)

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Okay, committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.