How to have no enclosure?

Created on 15 January 2018, over 6 years ago
Updated 17 November 2023, 7 months ago

Sorry - I know this is a remedial question, but I need to figure it out, and have found no solutions yet.

I need to provide our sign company a csv with no enclosure character. I have tried leaving the enclosure field blank, but I get this error:
Drupal\Component\Serialization\Exception\InvalidDataTypeException: League\Csv\AbstractCsv::setEnclosure() expects enclosure to be a single character ࠏ given in Drupal\csv_serialization\Encoder\CsvEncoder->encode() (line 154 of /var/www/husbandry.sandiegozoo.org/htdocs/modules/csv_serialization/src/Encoder/CsvEncoder.php).

I get the same error when I try using \s. When I use a space, all spaces in the results are doubled as well as enclosing periods being added. When I use a period, all periods are doubled, as well as enclosing periods being added. (I tried the latter to attempt to wrap my head around what was happening with spaces.)

I am sure that I am simply missing something, but can anyone lend a hand, or point me in the right direction?

πŸ’¬ Support request
Status

Fixed

Version

1.2

Component

Miscellaneous

Created by

πŸ‡ΊπŸ‡ΈUnited States justkristin

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡ΉPortugal introfini

    It seems that isn't that easy at the moment.

    This is how I accomplished it:

    function MYMODULE_views_post_render(ViewExecutable $view, array &$output, CachePluginBase $cache)
    {
      if ($view->id() == 'tb_commerce_orders' && $view->current_display == 'data_export_2') {
        $value = str_replace("|", "", $output["#markup"]->__toString());
        $new_output = ViewsRenderPipelineMarkup::create($value);
        $output["#markup"] = $new_output;
      }
    }
    
  • Status changed to Fixed 7 months ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024