System user avatar does not work


(Alexander) #1

I’m on latest tests-passed. System user avatar does not show up.

Looked in properties of avatar. URL path is like http://examples.com/user_avatar/example.com/system/25/7_1.png

If I try 301 Moved Permanently then I’m redirected to https://meta-s3-cdn.freetls.fastly.net/optimized/3X/5/1/5102f29a732becacd8677ff8b05c6ec22a2ea560_1_25x25.png and everything is ok. Is it a bug?


(Jeff Atwood) #2

Did you install this Discourse yourself? Did you follow our official install guide?

I’ve seen no issue with the system avatar on the installs we do, either hosted or with digital ocean.

Note that it can take a little while for the avatar to show up after the initial install, though.


(Alexander) #3

Myself. Yes, I followed the official guide. When I opened site for the first time (before creating admin account), the system avatar was as S letter. After I created account and logged in the avatar has gone. Avatar is still missing. Where can I find that 7_1.png?

It is fresh install and by the way I see errors in /logs. Not sure something related to avatar, but may be this logs can be useful:

First:

**PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, ** 

/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.0.0.3.pre/lib/logster/logger.rb:74:in `add_with_opts'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/logster-1.0.0.3.pre/lib/logster/logger.rb:35:in `add'
/usr/local/lib/ruby/2.0.0/logger.rb:454:in `error'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:460:in `translate_exception_class'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:475:in `rescue in log'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `log'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `exec_no_cache'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:588:in `execute_and_clear'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql_adapter.rb:737:in `column_definitions'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/postgresql/schema_statements.rb:186:in `columns'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/connection_adapters/schema_cache.rb:43:in `columns'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/attributes.rb:93:in `columns'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/model_schema.rb:260:in `column_names'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:226:in `aggregate_column'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:392:in `build_count_subquery'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:249:in `execute_simple_calculation'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:221:in `perform_calculation'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:127:in `calculate'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activerecord-4.2.4/lib/active_record/relation/calculations.rb:42:in `count'
/var/www/discourse/config/initializers/06-ensure_login_hint.rb:2:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `block in load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:268:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:652:in `block in load_config_initializer'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/notifications.rb:166:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:651:in `load_config_initializer'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:616:in `block (2 levels) in <class:Engine>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/engine.rb:615:in `block in <class:Engine>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `instance_exec'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:30:in `run'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:55:in `block in run_initializers'
/usr/local/lib/ruby/2.0.0/tsort.rb:150:in `block in tsort_each'
/usr/local/lib/ruby/2.0.0/tsort.rb:183:in `block (2 levels) in each_strongly_connected_component'
/usr/local/lib/ruby/2.0.0/tsort.rb:210:in `block (2 levels) in each_strongly_connected_component_from'
/usr/local/lib/ruby/2.0.0/tsort.rb:219:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.0.0/tsort.rb:209:in `block in each_strongly_connected_component_from'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:44:in `tsort_each_child'
/usr/local/lib/ruby/2.0.0/tsort.rb:203:in `each_strongly_connected_component_from'
/usr/local/lib/ruby/2.0.0/tsort.rb:182:in `block in each_strongly_connected_component'
/usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each'
/usr/local/lib/ruby/2.0.0/tsort.rb:180:in `each_strongly_connected_component'
/usr/local/lib/ruby/2.0.0/tsort.rb:148:in `tsort_each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/initializable.rb:54:in `run_initializers'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application.rb:352:in `initialize!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `public_send'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/railtie.rb:194:in `method_missing'
/var/www/discourse/config/environment.rb:5:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `block in require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:240:in `load_dependency'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.4/lib/active_support/dependencies.rb:274:in `require'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application.rb:328:in `require_environment!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/railties-4.2.4/lib/rails/application.rb:457:in `block in run_tasks_blocks'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:201:in `block in invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:199:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:199:in `invoke_prerequisites'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:178:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/rake:23:in `load'
/var/www/discourse/vendor/bundle/ruby/2.0.0/bin/rake:23:in `<main>'

Second:

Job exception: undefined method `suspended?' for nil:NilClass 

/var/www/discourse/lib/post_creator.rb:86:in `valid?'
/var/www/discourse/lib/post_creator.rb:123:in `create'
/var/www/discourse/lib/post_creator.rb:168:in `create'
/var/www/discourse/lib/system_message.rb:26:in `create'
/var/www/discourse/app/jobs/regular/send_system_message.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

(Robin Ward) #4

You are missing the users table in the database, which is a sign that you didn’t create or migrate your database.


(Alexander) #5

Thank you @eviltrout! But there is nothing about users table creation in official guide. My installation is 100% clean without any plugins or hacks.


(Robin Ward) #6

Which install guide did you follow? They should all have a part that creates and initializes the database.


(Alexander) #7

I used this one discourse/INSTALL-cloud.md at master · discourse/discourse · GitHub


(Robin Ward) #8

In that install it should have happened as part of the ./launcher bootstrap app step. If it didn’t, I suggest trying a new install.


(Alexander) #9

Ok, I will one more time (thanks to snapshots :smile: ). But I did new install 2 or 3 times already :frowning:


(Alexander) #10

I’ve just done clean install with test-passed and I see the same two errors on /logs. Then I did clean install with stable branch (1.4.2) and I see just the first error on /logs:

**PG::UndefinedTable: ERROR: relation "users" does not exist LINE 5: WHERE a.attrelid = '"users"'::regclass ^ : SELECT a.attname, **

With 1.4.2 the system user avatar works. Also I noticed that logout menu item is absent in 1.4.2. What else can I try to get rid of that errors? Or is this a bug? Thanks.


(Alexander) #11

Sorry for bumping this up, but is that error is critical? How it can be that users table is absent with clean install?


(Régis Hanol) #12

Something is definitely messed up with your install. What happens if you ssh into your server (as root) and then

cd /var/discourse
git pull
./launcher rebuild app

(Alexander) #14

Rebuilding completed successfully - same result. I really don’t understand how it can be messed up with such a straightforward install guide :smile: The only difference with official install guide is that I’m using Ubuntu 15.10 x64 and not Ubuntu 14.04 x64.

So I’ve just decided to do clean install with test-passed and while bootstrapping app I noticed this error:

So this error comes from the very beginning while bootstrapping.


(Jeff Atwood) #15

Correct and it can be ignored – it is not a real “error”.