# テーマ追加失敗で、そのテーマは永久に追加不可

**URL:** https://meta.discourse.org/t/failing-to-add-a-theme-permanently-prevents-that-theme-from-being-added/293061
**Category:** Bug
**Created:** [2024 年 1 月 26 日午後 2:53 UTC](https://meta.discourse.org/t/failing-to-add-a-theme-permanently-prevents-that-theme-from-being-added/293061 "2024-01-26T14:53:28Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![Firepup650](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/firepup650/32/465200_2.png) [@Firepup650](https://meta.discourse.org/u/Firepup650)
#### Post date: [2024 年 1 月 26 日午後 2:53 UTC](https://meta.discourse.org/t/failing-to-add-a-theme-permanently-prevents-that-theme-from-being-added/293061/1 "2024-01-26T14:53:28Z")

</div>

新しいフォーラムで、ファイル拡張子の1つが原因でテーマの追加に失敗しました。問題を修正しようとして一時的に `*` を許可したところ、テーマの追加時に 500 エラーが発生するようになりました。

メッセージ

```plaintext
Failed to process hijacked response correctly : ActiveRecord::RecordNotUnique : PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_child_themes_on_parent_theme_id_and_child_theme_id"
DETAIL: Key (parent_theme_id, child_theme_id)=(50, 35) already exists.

```

バックトレース

```plaintext
rack-mini-profiler-3.3.0/lib/patches/db/pg.rb:69:in `exec_params'
rack-mini-profiler-3.3.0/lib/patches/db/pg.rb:69:in `exec_params'
activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:768:in `block (2 levels) in exec_no_cache'
activesupport-7.0.8/lib/active_support/concurrency/share_lock.rb:187:in `yield_shares'
activesupport-7.0.8/lib/active_support/dependencies/interlock.rb:41:in `permit_concurrent_loads'
activerecord-7.0.8/lib/active_record/connection_adapters/postgresql_adapter.rb:767:in `block in exec_no_cache'
activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `handle_interrupt'
activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:25:in `synchronize'
activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `handle_interrupt'
activesupport-7.0.8/lib/active_support/concurrency/load_interlock_aware_monitor.rb:21:in `synchronize'

```

---

_[View the full topic](https://meta.discourse.org/t/failing-to-add-a-theme-permanently-prevents-that-theme-from-being-added/293061)._
