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

views_sql_storage_details.patch1.57 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 1,336 pass(es).
[ View ]


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» 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» Remove hardcoded field_sql_storage details from
dawehner’s picture

Project:Drupal core» Views
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 We believe it should fix this issue.