The field_views_field_default_views_data() function assumes that you are using the field_sql_storage module when it doesn't need to. This patch makes it a little bit easier to use alternative storage backend with views (for example http://drupal.org/project/field_sql_norevisions).

CommentFileSizeAuthor
views_sql_storage_details.patch1.57 KBalexpott
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

Status: Needs review » Needs work
  • views_handler_field_field::click_sort() calls _field_sql_storage_columnname()
  • field_views_data() and field_views_data_alter() both do if ($field['storage']['type'] != 'field_sql_storage')( {continue;}
  • field_views_field_default_views_data() has calls to _field_sql_storage_tablename() and _field_sql_storage_revision_tablename() as your patch shows, as well as _field_sql_storage_columnname() which is left in there
  • file_field_views_data_views_data_alter(), taxonomy_field_views_data_views_data_alter() and image_field_views_data_views_data_alter all call _field_sql_storage_tablename() as well

It's a bigger problem than just this, and there is much more work to be done to resolve it.

giorgio79’s picture

Project: Views (for Drupal 7) » Drupal core
Version: 7.x-3.x-dev » 8.x-dev
Component: fieldapi data » views.module

Looks like this should happen in D8 or D9?

giorgio79’s picture

Title: Remove hardcoded storage details from field.views.inc » Remove hardcoded field_sql_storage details from field.views.inc
dawehner’s picture

Project: Drupal core » Views (for Drupal 7)
Version: 8.x-dev » 7.x-3.x-dev
Component: views.module » fieldapi data

This will use a method on the storage controller, which is basically supported out of the box by chx patch.

ShadowMonster’s picture

I think It should be as some advanced configured option in 7.x - I'm developing field storage with is based on SQL one with some modifications for direct SQL encryption and at the moment I need hack core :/

pwaterz’s picture

Issue summary: View changes

Please checkout our fork here https://github.com/highwire/field_sql_norevisions. We believe it should fix this issue.