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.'),
        ];
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpp created an issue. See original summary.

mpp’s picture

Status: Active » Needs review
FileSize
723 bytes
MerryHamster’s picture

After installing module and creating a view (data export), I couldn't add path and file name.
this patch helped, it works for me, thanks

StefanPr’s picture

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

Priority: Normal » Major

Breaks main functionality without this patch, raising priority
Patch from #2 fixes issue, thx @mpp!

Pancho’s picture

Agree this small patch correctly fixes a major bug. RTBC

  • jhedstrom committed a23f542 on 8.x-1.x authored by mpp
    Issue #2919460 by mpp: Undefined index: filename in DataExport.php
    
jhedstrom’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

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