# Trying to edit user.hbs with no results

**URL:** <https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204>\
**Category:** Development\
**Created:** [2016年四月25日 23:52 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204 "2016-04-25T23:52:52Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月25日 23:52 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/1 "2016-04-25T23:52:52Z")

</div>

I am trying to modify the user.hbs file my plugin. Doing the standard `plugins/myplugin/assets/javascripts/discourse/templates/user/user.hbs` and copying the original code and modifying what I need. However, the result is that nothing changes. I am just moving `publicUserFields` above bio. Any ideas why?

Also, more advanced conversation on this topic that I would be curious to know: Could one create a widget to alter the profile using a virtual dom approach?

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 17:17 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/2 "2016-04-26T17:17:09Z")

</div>

Do you have this in a github repo that you can link to?

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 17:32 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/3 "2016-04-26T17:32:12Z")

</div>

I do now 🙂… simply putting publicUserFields above bio with no change though.

> <https://github.com/stevenpslade/discourse-alt-profile-layout-new/blob/master/assets/javascripts/discourse/templates/user/user.hbs>

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 17:39 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/4 "2016-04-26T17:39:42Z")

</div>

I’m wondering if you need to register it in a plugin.rb file

```plaintext
register_asset "javascripts/discourse/templates/user/user.hbs"

```

Much like we did for SP (look around line 138)

> <https://github.com/sitepoint/discourse-theme/blob/3ed0e82813e2b5b40eb42cda33ed95f9b8694dd0/plugin.rb>

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 17:48 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/5 "2016-04-26T17:48:32Z")

</div>

Hmm, added that in and still no changes.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 18:09 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/6 "2016-04-26T18:09:12Z")

</div>

Okay, I need screenshots, as I pulled down your repo and applied it to my local install, it works…

 ![](https://global.discourse-cdn.com/meta/original/3X/b/c/bc978bf5acfbd5b97b323996bba1c4f770bb3647.png)

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 18:14 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/7 "2016-04-26T18:14:13Z")

</div>

Perhaps maybe one of my other plugins are competing with this plugin. The good news is that it works for you.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 18:14 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/8 "2016-04-26T18:14:43Z")

</div>

Or you are not seeing the change because that page is heavily cached, clear your browser cache and check it again.

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 18:27 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/9 "2016-04-26T18:27:53Z")

</div>

I did a search of my entire local Discourse for all instances of the user.hbs code. The two results were in my plugin and the following: `discourse/jsapp/templates/user/user.hbs`

We would have expected the other one to be `assets/javascripts/discourse/templates/user/user.hbs`, right?

So what is jsapp? This could be the reason it is not working for me, because the plugin path does not match what I have on my local discourse.

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 18:34 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/10 "2016-04-26T18:34:51Z")

</div>

jsapp (to my knowledge, @eviltrout, correct me where I’m wrong), is the compiled version of Discourse. So it is what actually gets executed, but the code for altering exists in app/assets/javascripts/discourse/templates/user.

You might want to clear your Discourse cache too, `rm -Rf tmp/cache/` which would be inside your discourse implementation.

Are you running this locally using the Ubuntu Development guide or via Docker?

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 18:39 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/11 "2016-04-26T18:39:48Z")

</div>

Ubuntu Development. Cleared Chrome cache and `rm -Rf tmp/cache/` as well. Here is the screenshot of mine using the plugin that works for you.

 ![](https://global.discourse-cdn.com/meta/original/3X/8/0/80cb546be8c297d4a9ab9ec55dacbc12d3d049d0.png)

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 18:58 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/12 "2016-04-26T18:58:17Z")

</div>

Any errors in the JavaScript console, in the /logs?

And you git cloned into the /plugin folder?

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 19:04 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/13 "2016-04-26T19:04:03Z")

</div>

I just removed all other plugins and the problem is resolved. So it seems as though one of my other plugins is interfering 😁

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 19:06 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/14 "2016-04-26T19:06:08Z")

</div>

Well, that’s something. 🙂 Now the fun chore of re-enabling them one by one to see which one is interfering 🙂

---

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [2016年四月26日 20:30 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/15 "2016-04-26T20:30:17Z")

</div>

So I removed all my plugins except the profile alternate layout. Then I slowly added them all back in one by one. Everything working correctly. Updated profile layout to make sure change would work, everything working correctly. 😂

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [2016年四月26日 20:32 UTC](https://meta.discourse.org/t/trying-to-edit-user-hbs-with-no-results/43204/16 "2016-04-26T20:32:30Z")

</div>

lol, then it shall remain a mystery. Oh well, at least you are operation then 🙂
