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

Display errors on asset index generation #3012

Closed
ul8 opened this issue Jun 20, 2018 · 1 comment
Closed

Display errors on asset index generation #3012

ul8 opened this issue Jun 20, 2018 · 1 comment
Assignees
Labels
assets 📁 features related to asset management bug

Comments

@ul8
Copy link
Contributor

ul8 commented Jun 20, 2018

Description

When the manual asset index generation is running into issues, the backend process will helpfully provide useful error messages while the CP ignores them and pretends everything is fine (no error messages, just a way too quick finishing of the progress bar.

Suggestion: Print the errors in a scrollable element.

Steps to reproduce

  1. Add files that throw an error to an asset volume. In my example, I had file names with character encodings not matching my server setup (legacy files imported from a 10+ years old project originally coming from Windows). Example file name: '$'\326''zsecilmis_3529.jpg. Corrected file name is: Özsecilmis_3529.jpg
  2. Trigger a manual asset indexing.

Additional info

This was the response I got in this example:

{"name":"Exception","message":"Malformed UTF-8 characters, possibly incorrectly encoded.","code":5,"type":"yii\\base\\InvalidArgumentException","file":"/path/to/vendor/yiisoft/yii2/helpers/BaseJson.php","line":133,"stack-trace":["#0 /path/to/vendor/yiisoft/yii2/helpers/BaseJson.php(67): yii\\helpers\\BaseJson::handleJsonError(5)","#1 /path/to/vendor/yiisoft/yii2/web/JsonResponseFormatter.php(119): yii\\helpers\\BaseJson::encode(Array, 320)","#2 /path/to/vendor/yiisoft/yii2/web/JsonResponseFormatter.php(104): yii\\web\\JsonResponseFormatter->formatJson(Object(craft\\web\\Response))","#3 /path/to/vendor/yiisoft/yii2/web/Response.php(1044): yii\\web\\JsonResponseFormatter->format(Object(craft\\web\\Response))","#4 /path/to/vendor/craftcms/cms/src/web/Response.php(185): yii\\web\\Response->prepare()","#5 /path/to/vendor/yiisoft/yii2/web/Response.php(337): craft\\web\\Response->prepare()","#6 /path/to/vendor/yiisoft/yii2/base/Application.php(392): yii\\web\\Response->send()","#7 /path/to/web/index.php(42): yii\\base\\Application->run()","#8 {main}"]}

PHP 7.0.30
MySQL 5.7.22
Craft Pro 3.0.12

@brandonkelly brandonkelly added bug assets 📁 features related to asset management labels Jun 21, 2018
@andris-sevcenko
Copy link
Contributor

This has been improved in later Craft versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assets 📁 features related to asset management bug
Projects
None yet
Development

No branches or pull requests

3 participants