We've used Semantic Views extensively on our projects, and always seemed to work fairly well. However, we ran into a serious issue where the results returned from the view were completely wrong.
The view we've created contains an entity relationship to another content type, and the fields being displayed include ones from the related type. After much investigation, we realized that switching from "Semantic Views: Fields" to "Fields" fixed the problem.
We debugged template_preprocess_semanticviews_view_fields
in semanticviews.theme.inc
, and uncovered a major issue. Semantic Views is using a process for capturing $field_output
that has not been used since Views 6.x.2.6!
The change can be seen here between 2.6 and 2.7:
Views 6.x-2.6:
http://cgit.drupalcode.org/views/tree/theme/theme.inc?h=6.x-2.6&id=c7e8b...
Views 6.x-2.7:
http://cgit.drupalcode.org/views/tree/theme/theme.inc?h=6.x-2.7&id=04e86...
Switching to the 6.x-2.7 method (which is also the current 7.x-3.x method) fixes the issue. As well, the approach to calculating a value for $empty
is changed, and the if
conditional is more properly formatted in views (while replacing $vars['options']['hide_empty']
with $vars['options']['skip_blank']
):
http://cgit.drupalcode.org/views/tree/theme/theme.inc?id=42fe4029ca7d741...
I will post a patch in a few minutes, but I wonder about the current state of the module? This thread poses the question about Semantic Views being made obsolete by Views 3 (https://www.drupal.org/node/1013876), and @bangpound mentions about it being a bridge (https://www.drupal.org/node/1013876#comment-4061724).
Are we at a point that any key features not in Views need to be posted to the Views issue queue, and allow this module to be phased out?
Comment | File | Size | Author |
---|---|---|---|
#2 | semanticviews-view_fields_preprocess-2690421-2.patch | 1.31 KB | ron_s |
Comments
Comment #2
ron_s CreditAttribution: ron_s commentedHere is a patch for review. Thanks.
Comment #3
giupenni CreditAttribution: giupenni commentedWorks!
Comment #5
Scyther CreditAttribution: Scyther commentedCommited.