Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When creating a new view a warning occurs. In turn this causes the ajax callback to fail.
Proposed resolution
Use the class' getOption:
$form['filename'] = [
'#type' => 'textfield',
'#title' => $this->t('Filename'),
'#default_value' => $this->getOption('filename'),
'#description' => $this->t('The filename that will be suggested to the browser for downloading purposes. You may include replacement patterns from the list below.'),
];
Comment | File | Size | Author |
---|---|---|---|
#2 | views_data_export_fixed_filename_warning-2919460-2-d8.patch | 723 bytes | mpp |
|
Comments
Comment #2
mpp CreditAttribution: mpp commentedComment #3
MerryHamster CreditAttribution: MerryHamster commentedAfter installing module and creating a view (data export), I couldn't add path and file name.
this patch helped, it works for me, thanks
Comment #4
StefanPr CreditAttribution: StefanPr at ezCompany commentedComment #5
StryKaizerBreaks main functionality without this patch, raising priority
Patch from #2 fixes issue, thx @mpp!
Comment #6
PanchoAgree this small patch correctly fixes a major bug. RTBC
Comment #8
jhedstromThanks!