I have created a rest export type view and select the csv format.

When the view has some results then it is working fine but when the view return no results then I get the following error.

Fatal error: Invalid placeholder (!message) in string: %type: !message in %function (line %line of %file). in /[path to drupal]/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 242

Array
(
    [%type] => Notice
    [!message] => Undefined offset: 0
    [%function] => Drupal\csv_serialization\Encoder\CsvEncoder->extractHeaders()
    [%file] => /[path to drupal]/modules/contrib/csv_serialization/src/Encoder/CsvEncoder.php
    [%line] => 145
)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hmdnawaz created an issue. See original summary.

hmdnawaz’s picture

Status: Active » Needs review
FileSize
615 bytes
hmdnawaz’s picture

Issue summary: View changes
heykarthikwithu’s picture

Status: Needs review » Reviewed & tested by the community

checked this patch, works fine :)

  • hmdnawaz authored 6e80bf0 on 8.x-1.x
    Issue #2647926 by hmdnawaz: undefined offset: 0 in CsvEncoder->...
grasmash’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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