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?
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.
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?
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.