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

Editing an asset throws "An unknown error occurred." #2768

Closed
tomastech opened this issue Apr 18, 2018 · 1 comment
Closed

Editing an asset throws "An unknown error occurred." #2768

tomastech opened this issue Apr 18, 2018 · 1 comment

Comments

@tomastech
Copy link

tomastech commented Apr 18, 2018

Description

I have few images in jpg and png format. They are sitting under local folder @web/assets @webroot/assets.

When I go into Assets > [select image] > Edit Asset and try to update filename or title, following error flashes at the top "An unknown error occurred." Just clicking save button without any changes triggers this error.

Looking at my devtools console reports the following:

POST https://example.test/index.php?p=admin/actions/elements/save-element 500 ()

// Form Data
includeTableAttributesForSource: folder:1
siteId: 1
elementId: 66
namespace: editor_XtQItnkq3Y
elementId: 66
siteId: 1
editor_XtQItnkq3Y[newFilename]: sample-image-01.png
editor_XtQItnkq3Y[title]: Sample Image 01
editor_XtQItnkq3Y[fieldLayoutId]: 3

// Response
{"error":"Argument 1 passed to craft\\helpers\\Assets::getFileKindByExtension() must be of the type string, null given, called in /home/vagrant/sites/example/vendor/craftcms/cms/src/elements/Asset.php on line 1215"}

My setup has two "sites" (multi-language), default site being in English and another in French.

Steps to reproduce

  1. Navigate to /admin/assets
  2. Choose existing volume and select an image
  3. Click on action cog and choose "Edit asset"
  4. Click "Save"
  5. Notice "An unknown error occurred." error is shown

Additional info

  • Craft version: 3.0.3
  • PHP version: 7.2.3
  • Database driver & version: MySQL 5.7.21
  • Plugins & versions:
    • Imager v2.0.0
    • Mailchimp Subscribe 2.0.0
    • Minify 1.2.8
    • Redactor 1.1.0
    • SEO 3.2.4
    • SimpleMap 3.3.3
    • Typed link field 1.0.7
@ostark
Copy link
Contributor

ostark commented Apr 18, 2018

Fixed here #2764
Update to 3.0.3.1

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

3 participants