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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ron_s created an issue. See original summary.

ron_s’s picture

Status: Active » Needs review
FileSize
1.31 KB

Here is a patch for review. Thanks.

giupenni’s picture

Works!

  • Scyther committed d1687c3 on 7.x-1.x authored by ron_s
    Issue #2690421 by ron_s: Fields preprocessing breaks views, returns...
Scyther’s picture

Status: Needs review » Fixed

Commited.

  • Scyther committed 8eee117 on 8.x-2.x authored by ron_s
    Issue #2690421 by ron_s: Fields preprocessing breaks views, returns...

Status: Fixed » Closed (fixed)

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