I'm using Views 7.x-3.3 to display lists of entities (not nodes). The filter does not appear in the list. I assume this is because it is under "node" and I am not using nodes. I'm not an expert in Views API, but if someone can point me in the right direction I can take a stab at patching this...

Comments

micnap’s picture

Are there any plans to add support for entities to this module?

Thanks,
Mickey

spessex’s picture

I'm having the same issue. I'm using it to display Profile2 types and unfortunately cannot appear to see the option for a filter?

ibullock’s picture

I required this module's functionality for profiles as well and found a really quick work around for the module.

(Note: This is for the Drupal 6 version of the module.)

In views_dynamic_fields.module change function code starting at line 32:

/**
 * Implementation of hook_views_data_alter()
 */
function views_dynamic_fields_views_data_alter(&$data)
{
  // Register a dummy field to attach the dynamic_fields filter
  $data['users']['dyfield'] = array( //users works for Profile, Members etc.
    'title' => t('Dynamic Fields'),
    'help' => t("List of fields displayed in a view"),
    'filter' => array(
      'handler' => 'views_handler_filter_dynamic_fields',
    ),
  );

  /* Keep original code for any views using with nodes. */

  // Register a dummy field to attach the dynamic_fields filter
  $data['node']['dyfield'] = array( 
    'title' => t('Dynamic Fields'),
    'help' => t("List of fields displayed in a view"),
    'filter' => array(
      'handler' => 'views_handler_filter_dynamic_fields',
    ),
  );
}
micnap’s picture

I ended up using the dataTables module instead. It's client side instead of server side but gave me all the functionality that I needed, including the ability to show/hide columns, reorder columns, search, and download data.

Mickey

donSchoe’s picture

Issue summary: View changes
Status: Active » Needs work

Code in #3 is not working for Drupal 7, anyways this will be worked on for the next 7.x release.

donSchoe’s picture

Title: Support for Entities » Add support for all entities (incl. users)
Category: Bug report » Task

  • Commit 9f4259a on 7.x-1.x by donSchoe:
    Issue #1492166 by Chris Gillis: Add support for all entities (inlc....
donSchoe’s picture

Assigned: Unassigned » donSchoe
Status: Needs work » Fixed

#3 was working fine, I just had a typo. This should be fixed by now.

Demo: http://alex.parliamentwatch.org/drupal-7/dynamic-user-fields

Please report back if you still have issues with user views.

Status: Fixed » Closed (fixed)

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

discipolo’s picture

can we make this work for commerce_product entities aswell?

donSchoe’s picture

@discipolo, can you open a new ticket and include information about commerce_product entities? I'm not used to commerce.

dboulet’s picture

Status: Closed (fixed) » Needs review
Related issues: +#2289005: Support commerce_product entitites
StatusFileSize
new1.72 KB

Sorry to re-open this issue, but I’d like to propose an alternative solution. Instead of adding support for each type of entity one at a time, we could add the dynamic fields filter to all base tables supported by Views—thereby supporting all query-able entities out of the box. I’ve attached a patch to demonstrate.

david_garcia’s picture

Status: Needs review » Reviewed & tested by the community
hondaman900’s picture

I've encountered this issue trying to use this module with Views of EntityForm submissions. It's not appearing in the available filters list. I opened a separate ticket for that issue.