Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fputcsv(): escape must be a character when exporting orders #10004

Closed
jerome2710 opened this issue Oct 25, 2021 · 3 comments
Closed

fputcsv(): escape must be a character when exporting orders #10004

jerome2710 opened this issue Oct 25, 2021 · 3 comments

Comments

@jerome2710
Copy link

Description

When trying to export orders from the element-index, fputcsv fails as $this->escapeChar is an empty string.

yii\base\ErrorException: fputcsv(): escape must be a character
craftcms/commerce#8 /xxx/vendor/craftcms/cms/src/web/CsvResponseFormatter.php(103): yii\base\ErrorHandler::handleError
craftcms/commerce#7 /xxx/vendor/craftcms/cms/src/web/ErrorHandler.php(84): craft\web\ErrorHandler::handleError
craftcms/commerce#6 [internal](0): fputcsv
craftcms/commerce#5 /xxx/vendor/craftcms/cms/src/web/CsvResponseFormatter.php(103): craft\web\CsvResponseFormatter::format
craftcms/commerce#4 /xxx/vendor/yiisoft/yii2/web/Response.php(1100): yii\web\Response::prepare
craftcms/commerce#3 /xxx/vendor/craftcms/cms/src/web/Response.php(284): craft\web\Response::prepare
craftcms/commerce#2 /xxx/vendor/yiisoft/yii2/web/Response.php(344): yii\web\Response::send
craftcms/commerce#1 /xxx/vendor/yiisoft/yii2/base/Application.php(398): yii\base\Application::run
#0 /index.php(40): null

Steps to reproduce

  1. Navigate to /admin/commerce/orders
  2. Use the export function in the bottom right corner (I'm using raw data in CSV)

Additional info

  • Craft CMS version: 3.7.17.1
  • Craft Commerce version: 3.4.6
  • PHP version: 7.2.34
  • Database driver & version: MySQL 5.5.68
  • Plugins & versions: various
@lukeholder lukeholder transferred this issue from craftcms/commerce Oct 25, 2021
@andris-sevcenko
Copy link
Contributor

Thanks for reporting! This has already been brought to our attention here - #9958 (comment)

This has been fixed as of 3.7.17.2

@jerome2710
Copy link
Author

Great! Thank you for pointing this out, #9958 did not pop-up in my search results.

@andris-sevcenko
Copy link
Contributor

No problem at all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants