When viewing Image fields, and submiting the images are deleted.
1. Import the following CCK and Views.
2. Create few nodes of Photos
3. Invoke the Views
4. Submit - images gone...
CCK
$content[type] = array (
'name' => 'Photo',
'type' => 'photo',
'description' => 'Photos of real styles with real models',
'title_label' => 'Title',
'body_label' => '',
'min_word_count' => '0',
'help' => '',
'submitagain' => 1,
'node_options' =>
array (
'status' => true,
'promote' => false,
'sticky' => false,
'revision' => false,
),
'comment' => '2',
'comment_upload' => '0',
'upload' => '0',
'old_type' => 'photo',
'orig_type' => '',
'module' => 'node',
'custom' => '1',
'modified' => '1',
'locked' => '0',
'ant' => 1,
'ant_pattern' => '[field_model_name-raw] ([field_model_age-raw])',
'ant_php' => 0,
);
$content[fields] = array (
0 =>
array (
'widget_type' => 'image',
'label' => 'Image',
'weight' => '-4',
'max_resolution' => 0,
'image_path' => '',
'custom_alt' => 0,
'custom_title' => 1,
'description' => '\'official\' image of the style',
'group' => false,
'required' => '0',
'multiple' => '0',
'field_name' => 'field_image',
'field_type' => 'image',
'module' => 'imagefield',
),
1 =>
array (
'widget_type' => 'text',
'label' => 'Model name',
'weight' => '-3',
'rows' => '1',
'description' => '',
'default_value_widget' =>
array (
'field_model_name' =>
array (
0 =>
array (
'value' => '',
),
),
),
'default_value_php' => '',
'group' => false,
'required' => '1',
'multiple' => '0',
'text_processing' => '0',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'field_name' => 'field_model_name',
'field_type' => 'text',
'module' => 'text',
),
2 =>
array (
'widget_type' => 'number',
'label' => 'Model age',
'weight' => '-2',
'description' => '',
'default_value_widget' =>
array (
'field_model_age' =>
array (
0 =>
array (
'value' => '',
),
),
),
'default_value_php' => '',
'group' => false,
'required' => '1',
'multiple' => '0',
'min' => '',
'max' => '',
'prefix' => '',
'suffix' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'field_name' => 'field_model_age',
'field_type' => 'number_integer',
'module' => 'number',
),
3 =>
array (
'widget_type' => 'text',
'label' => 'Caption',
'weight' => '0',
'rows' => '4',
'description' => '',
'default_value_widget' =>
array (
'field_caption' =>
array (
0 =>
array (
'value' => '',
),
),
),
'field_caption' =>
array (
0 =>
array (
'format' => 1,
),
),
'default_value_php' => '',
'group' => false,
'required' => '0',
'multiple' => '0',
'text_processing' => '1',
'max_length' => '',
'allowed_values' => '',
'allowed_values_php' => '',
'field_name' => 'field_caption',
'field_type' => 'text',
'module' => 'text',
),
);
--------
VIEWS
$view = new stdClass();
$view->name = 'Photos_per_Style_Editable';
$view->description = 'Edit photos (per style)';
$view->access = array (
0 => '3',
1 => '4',
);
$view->view_args_php = '';
$view->page = FALSE;
$view->page_title = '';
$view->page_header = '';
$view->page_header_format = '1';
$view->page_footer = '';
$view->page_footer_format = '1';
$view->page_empty = '';
$view->page_empty_format = '1';
$view->page_type = 'editablefields_table';
$view->url = 'edit_photos';
$view->use_pager = TRUE;
$view->nodes_per_page = '5';
$view->block = TRUE;
$view->block_title = '';
$view->block_header = '';
$view->block_header_format = '1';
$view->block_footer = '';
$view->block_footer_format = '1';
$view->block_empty = 'No photos uploaded yet...';
$view->block_empty_format = '1';
$view->block_type = 'editablefields_list';
$view->nodes_per_block = '10';
$view->block_more = FALSE;
$view->block_use_page_header = FALSE;
$view->block_use_page_footer = FALSE;
$view->block_use_page_empty = FALSE;
$view->sort = array (
);
$view->argument = array (
array (
'type' => 'ReferencedByFilter',
'argdefault' => '2',
'title' => 'Edit photos of style %1',
'options' => 'field_photos_reference',
'wildcard' => '*',
'wildcard_substitution' => '(All styles)',
),
);
$view->field = array (
array (
'tablename' => 'node_data_field_image',
'field' => 'field_image_fid',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'editable',
),
array (
'tablename' => 'node_data_field_caption',
'field' => 'field_caption_value',
'label' => '',
'handler' => 'content_views_field_handler_group',
'options' => 'editable',
),
);
$view->filter = array (
array (
'tablename' => 'node',
'field' => 'status',
'operator' => '=',
'options' => '',
'value' => '1',
),
);
$view->exposed_filter = array (
);
$view->requires = array(node_data_field_image, node_data_field_caption, node);
$views[$view->name] = $view;
Comments
Comment #1
markfoodyburton commentedThis must be a problem with the interaction between the Images field type and E.F.
I'm going to need time to fix this, which is not something I have right now :-(
I can TRY and help you fix it if you have time?
Contact me and I'll do my best....
Comment #2
amitaibuI'm afraid I'm not a developer so I might not be the best man yo fix it... I'm a fashion-designer though, so if you need some cool jackets, you can contact me ;)
Comment #3
ellanylea commentedCCK Imagefield images are still being deleted after bulk update through Views in 5.x-3.1.
Subscribing...
Comment #4
Frederic wbase commentedlol, maintainer of og? Nice show at drupalcon london :-)
Comment #5
amitaibu> I'm afraid I'm not a developer so I might not be the best man yo fix it
Apparently I've learned how to develop ;)
Comment #6
Frederic wbase commented@Amitaibu: LOL
Comment #7
joelpittetClosing legacy issue. Reopen as needed.