- 🇪🇸Spain budalokko Girona
Closing as this is being worked in 🐛 Random validation errors on file upload Fixed .
Hello,
I faced an issue when the unique identifier added with '--' is not excluded during the form submit.
The issue happened when i tried using plupload widget in an ajax form.
The file is NOT readable using the ID provided in form (mine has id 'file123') and the $form_state->getUserInput() i am getting is the following:
Array (
... [edit-file123--TBfrz4xbz_E_0_tmpname] => o_1as77bvhu1r6k1qbp19b88o01t0ia.html [edit-file123--TBfrz4xbz_E_0_name] => test.html [edit-file123--TBfrz4xbz_E_0_status] => done [edit-file123--TBfrz4xbz_E_count] => 1 [form_build_id] => form-sfxD47aUbSXEYjHECUFQ71kx8XAYUb0nVJPxBVjn4yE [form_token] => 03DASuCvBYJ3aDgySxtNr9E_kZB-IAIJRCnVRUJbpw8 [form_id] => decreto-content-modify-bpa-edit-form [_triggering_element_name] => op [_triggering_element_value] => Save [_drupal_ajax] => 1 [ajax_page_state] => Array ( [theme] => decreto_theme [theme_token] => [libraries] => bootstrap/popover,bootstrap/tooltip,calendar/calendar.theme,ckeditor/drupal.ckeditor,ckeditor/drupal.ckeditor.plugins.drupalimagecaption,contextual/drupal.contextual-links,contextual/drupal.contextual-toolbar,core/drupal.active-link,core/drupal.dialog.ajax,core/drupal.dialog.ajax,core/html5shiv,core/jquery.form,decreto_content_modify/meeting-edit,decreto_content_modify/meeting-edit,decreto_context_menu/decreto-stretchy-navigation,decreto_theme/global-styling,examples/examples.icons,filter/drupal.filter,plupload/plupload,shortcut/drupal.shortcut,system/base,toolbar/toolbar,toolbar/toolbar.escapeAdmin,tour/tour,user/drupal.user.icons,views/views.module ) [file123] =>
...
)
and my form looks like this:
...
$form['file123'] = array(
'#type' => 'plupload',
'#title' => $this->t('Upload files'),
'#autoupload' => TRUE,
'#upload_validators' => array(
'file_validate_extensions' => array('txt pdf doc docx html'),
),
'#plupload_settings' => array(
'runtimes' => 'html5',
'chunk_size' => '1mb',
),
);
...
Closed: duplicate
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Closing as this is being worked in 🐛 Random validation errors on file upload Fixed .