Cannot adding field
| Project: | DraggableViews |
| Version: | 6.x-3.x-dev |
| Component: | Documentation |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
I'm attempting to follow the directions:
Quick install:
1) Activate Draggableviews module at yoursite?q=admin/build/modules
2) Navigate to views edit-page and click the currently enabled style plugin ("Basic settings" section)
Choose Draggable Table and click Update button
3) Click the "+" at the "Fields" section and choose "Draggableviews: Value #1" -> Click Add button
4) Enter style plugin settings by clicking the little cogwheel next to "Draggable Table" style plugin
5) Click "Add order field" button and choose "Value #1" from the list
Click Update button
6) Save the view and you're done
but I get stuck at #3. Daggable views does not show up when I click the + in the Fields section.

#1
I just tried setting up the latest drupal, views and draggableviews and it works for me. I also tried updating from 6.x-3.1. Probably your drupal is not up to date?
However, this sounds like a caching problem. Try to empty the views cache (http://yoursite.com?q=admin/build/views/tools or use devel module).
Good luck :)
sevi
#2
First, I have to apologize for my horrible grammar in the title. That's what happens when you work late I guess.
Second, I tried clearing all caches, including views, and I'm still having this issue. Draggableviews: Value #1 simply doesn't show up when I attempt to add fields.
Here is my exported view (with table style currently).
$view = new view;$view->name = 'user_list';
$view->description = 'A simple user listing.';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'users';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
'name' => array(
'id' => 'name',
'table' => 'users',
'field' => 'name',
),
'value' => array(
'label' => 'Main Character Class',
'exclude' => 0,
'id' => 'value',
'table' => 'profile_values_profile_main_character_class',
'field' => 'value',
'relationship' => 'none',
),
'rid' => array(
'label' => 'Rank',
'type' => 'separator',
'separator' => ' / ',
'empty' => '',
'exclude' => 0,
'id' => 'rid',
'table' => 'users_roles',
'field' => 'rid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'picture' => array(
'label' => 'Avatar',
'exclude' => 0,
'id' => 'picture',
'table' => 'users',
'field' => 'picture',
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'name' => array(
'order' => 'ASC',
'id' => 'name',
'table' => 'users',
'field' => 'name',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('arguments', array(
'rid' => array(
'default_action' => 'ignore',
'style_plugin' => 'default_summary',
'style_options' => array(
'count' => 1,
'override' => 0,
'items_per_page' => '25',
),
'wildcard' => 'all',
'wildcard_substitution' => 'All',
'title' => '%1',
'default_argument_type' => 'fixed',
'default_argument' => '',
'validate_type' => 'none',
'validate_fail' => 'summary asc',
'break_phrase' => 0,
'add_table' => 0,
'require_value' => 0,
'reduce_duplicates' => 0,
'id' => 'rid',
'table' => 'users_roles',
'field' => 'rid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'default_options_div_prefix' => '',
'default_argument_user' => 0,
'default_argument_fixed' => '',
'default_argument_php' => '',
'validate_argument_node_type' => array(
'blog' => 0,
'poll' => 0,
'activitystream' => 0,
'forum' => 0,
'book' => 0,
'page' => 0,
'story' => 0,
),
'validate_argument_node_access' => 0,
'validate_argument_nid_type' => 'nid',
'validate_argument_vocabulary' => array(
'1' => 0,
'2' => 0,
),
'validate_argument_type' => 'tid',
'validate_argument_php' => '',
),
));
$handler->override_option('filters', array(
'uid' => array(
'operator' => 'not in',
'value' => array(
'0' => 0,
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'uid',
'table' => 'users',
'field' => 'uid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'rid' => array(
'operator' => 'or',
'value' => array(
'3' => '3',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'rid',
'table' => 'users_roles',
'field' => 'rid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('items_per_page', 500);
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
'grouping' => '',
'override' => 1,
'sticky' => 0,
'order' => 'asc',
'columns' => array(
'name' => 'name',
'value' => 'value',
'rid' => 'rid',
'picture' => 'picture',
),
'info' => array(
'name' => array(
'sortable' => 1,
'separator' => '',
),
'value' => array(
'sortable' => 1,
'separator' => '',
),
'rid' => array(
'separator' => '',
),
'picture' => array(
'sortable' => 0,
'separator' => '',
),
),
'default' => '-1',
));
$handler = $view->new_display('page', 'Page', 'page_1');
$handler->override_option('path', 'members');
$handler->override_option('menu', array(
'type' => 'none',
'title' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'weight' => 0,
));
$handler = $view->new_display('block', 'Block', 'block_1');
$handler->override_option('block_description', '');
$handler->override_option('block_caching', -1);
#3
I really don't know O_o
Did you already try installing Drupal new from scratch? This is not a very elegant solution to solve your problem but maybe it helps :)
#4
Unfortunately that isn't really a viable option for my site.
#5
I guess this comes from function draggableviews_views_data() in views/draggableviews.views.inc.
It seems there's nothing beeing exported to views from hook_views_data().
Check the module settings page at ?q=admin/settings/draggableviews. Maybe the number is set to 0..?
#6
Tried once again clearing the views cache, and making sure that ?q=admin/settings/draggableviews was set (in my case it was at 3, but I changed to 4 and clicked save just to be safe). I still don't get a field to add.
#7
Hmm, still don't know O_o.
Try the attached patch. It will output all the settings returned to views from draggableviews (assumed the function draggableviews_views_data gets called).
You have to clear the views cache to see the outputs of this patch.
#8
well, it's kinda a patch... so needs review seems appropriate.
#9
Code changed very much in the meanwhile.
Create a new issue if this error persists.