# Username template cannot found

**URL:** <https://meta.discourse.org/t/username-template-cannot-found/214224>\
**Category:** Product Support\
**Created:** [January 8, 2022, 9:39am UTC](https://meta.discourse.org/t/username-template-cannot-found/214224 "2022-01-08T09:39:53Z")\
**Posts on this page:** 1\
**Showing post:** 9

<div class="post-metadata">

**Author:** ![f1r4s](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/f1r4s/32/245347_2.png) [@f1r4s](https://meta.discourse.org/u/f1r4s)\
**Post date:** [January 11, 2022, 6:58pm UTC](https://meta.discourse.org/t/username-template-cannot-found/214224/9 "2022-01-11T18:58:58Z")

</div>

Your correct; anyway this is a backup and i restore it and it’s working fine.. the issue only with badge images; and i try to run the command

```plaintext
rake uploads:clean_up
rake posts:rebake

```

but still same issue..

```plaintext
[2] pry(main)> Discourse.system_user.create_user_profile
ActiveRecord::RecordNotUnique: PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "user_profiles_pkey"
DETAIL: Key (user_id)=(-1) already exists.

from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'
Caused by PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "user_profiles_pkey"
DETAIL: Key (user_id)=(-1) already exists.

from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/rack-mini-profiler-2.3.3/lib/patches/db/pg.rb:69:in `exec_params'
[3] pry(main)> 

```

---

_[View the full topic](https://meta.discourse.org/t/username-template-cannot-found/214224)._
