# Image Filter Plugin: Error 500 when uploading asset to theme component

**URL:** https://meta.discourse.org/t/image-filter-plugin-error-500-when-uploading-asset-to-theme-component/167356
**Category:** Support
**Created:** [October 16, 2020, 12:06pm UTC](https://meta.discourse.org/t/image-filter-plugin-error-500-when-uploading-asset-to-theme-component/167356 "2020-10-16T12:06:35Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Terrapop](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Terrapop](https://meta.discourse.org/u/Terrapop)
#### Post date: [October 16, 2020, 12:06pm UTC](https://meta.discourse.org/t/image-filter-plugin-error-500-when-uploading-asset-to-theme-component/167356/1 "2020-10-16T12:06:35Z")

</div>

![image](https://global.discourse-cdn.com/meta/original/3X/5/a/5a7b90da231cb8797657a460efb0f3ac24953198.png)

Just tried to upload an image asset to a newly created theme component and I get an error 500.

We’re on the latest version of Discourse, [standard Install](https://meta.discourse.org/t/142537?silent=true) on a DO droplet. Image uploads in posts work.

Logs provide this error:

**Failed to process hijacked response correctly : unexpected return**

> **Summary**
>
> /var/www/discourse/plugins/discourse-image-filter/plugin.rb:66:in `block (2 levels) in activate!’
> 
> /var/www/discourse/lib/plugin/instance.rb:404:in `block in on’
> 
> /var/www/discourse/lib/discourse\_event.rb:14:in `block in trigger’
> 
> /usr/local/lib/ruby/2.6.0/set.rb:338:in `each\_key’
> 
> /usr/local/lib/ruby/2.6.0/set.rb:338:in `each’
> 
> /var/www/discourse/lib/discourse\_event.rb:13:in `trigger’
> 
> /var/www/discourse/lib/upload\_creator.rb:134:in `block in create\_for’
> 
> /var/www/discourse/lib/distributed\_mutex.rb:33:in `block in synchronize’
> 
> /var/www/discourse/lib/distributed\_mutex.rb:29:in `synchronize’
> 
> /var/www/discourse/lib/distributed\_mutex.rb:29:in `synchronize’
> 
> /var/www/discourse/lib/distributed\_mutex.rb:14:in `synchronize’
> 
> /var/www/discourse/lib/upload\_creator.rb:45:in `create\_for’
> 
> /var/www/discourse/app/controllers/admin/themes\_controller.rb:25:in `block (2 levels) in upload\_asset’
> 
> /var/www/discourse/app/controllers/admin/themes\_controller.rb:23:in `open’
> 
> /var/www/discourse/app/controllers/admin/themes\_controller.rb:23:in `block in upload\_asset’
> 
> /var/www/discourse/lib/hijack.rb:56:in `instance\_eval’
> 
> /var/www/discourse/lib/hijack.rb:56:in `block in hijack’
> 
> /var/www/discourse/lib/scheduler/defer.rb:94:in `block in do\_work’
> 
> rails\_multisite-2.5.0/lib/rails\_multisite/connection\_management.rb:76:in `with\_connection’
> 
> /var/www/discourse/lib/scheduler/defer.rb:89:in `do\_work’
> 
> /var/www/discourse/lib/scheduler/defer.rb:79:in `block (2 levels) in start\_thread’

Anybody?

---

<div class="post-metadata">

### Author: ![Terrapop](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Terrapop](https://meta.discourse.org/u/Terrapop)
#### Post date: [October 16, 2020, 12:18pm UTC](https://meta.discourse.org/t/image-filter-plugin-error-500-when-uploading-asset-to-theme-component/167356/2 "2020-10-16T12:18:11Z")

</div>

Found the problem. It’s caused by the image-filter-plugin.

@fzngagan you may want to look into this. The plugin causes errors when uploading assets to components when enabled.

---

<div class="post-metadata">

### Author: ![fzngagan](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fzngagan/32/259349_2.png) [@fzngagan](https://meta.discourse.org/u/fzngagan)
#### Post date: [October 18, 2020, 12:00pm UTC](https://meta.discourse.org/t/image-filter-plugin-error-500-when-uploading-asset-to-theme-component/167356/3 "2020-10-18T12:00:49Z")

</div>

This commit should fix the issue.  
[https://github.com/paviliondev/discourse-image-filter/commit/69c3c65eedfdac4be7bc55b8b537bf7956af0fa4](https://github.com/paviliondev/discourse-image-filter/commit/69c3c65eedfdac4be7bc55b8b537bf7956af0fa4)

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [May 15, 2024, 4:33pm UTC](https://meta.discourse.org/t/image-filter-plugin-error-500-when-uploading-asset-to-theme-component/167356/4 "2024-05-15T16:33:32Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
