Internal error on Setting Page and user profil

Added by Slavi Sl over 3 years ago

Hello,
when i open domain.com/my/account page i have "Internal error",
in log file: redmine/log/production.log:


Started GET "/my/account" for 78.130.201.101 at 2014-01-06 20:08:09 +0300
Processing by MyController#account as HTML
  Current user: admin (id=1)
  Rendered my/account.html.erb within layouts/base (80.4ms)
Completed 500 Internal Server Error in 86.2ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
    16:   <p><%= f.text_field :firstname, :required => true %></p>
    17:   <p><%= f.text_field :lastname, :required => true %></p>
    18:   <p><%= f.text_field :mail, :required => true %></p>
    19:   <p><%= f.select :language, lang_options_for_select %></p>
    20:   <% if Setting.openid? %>
    21:   <p><%= f.text_field :identity_url  %></p>
    22:   <% end %>
  lib/redmine/views/labelled_form_builder.rb:34:in `select'
  app/views/my/account.html.erb:19:in `block in _app_views_my_account_html_erb__156702642_112175960'
  app/helpers/application_helper.rb:977:in `labelled_form_for'
  app/views/my/account.html.erb:9:in `_app_views_my_account_html_erb__156702642_112175960'

Started GET "/my/account" for 78.130.201.101 at 2014-01-06 20:08:10 +0300
Processing by MyController#account as HTML
  Current user: admin (id=1)
  Rendered my/account.html.erb within layouts/base (6.7ms)
Completed 500 Internal Server Error in 12.6ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
    16:   <p><%= f.text_field :firstname, :required => true %></p>
    17:   <p><%= f.text_field :lastname, :required => true %></p>
    18:   <p><%= f.text_field :mail, :required => true %></p>
    19:   <p><%= f.select :language, lang_options_for_select %></p>
    20:   <% if Setting.openid? %>
    21:   <p><%= f.text_field :identity_url  %></p>
    22:   <% end %>
  lib/redmine/views/labelled_form_builder.rb:34:in `select'
  app/views/my/account.html.erb:19:in `block in _app_views_my_account_html_erb__156702642_112175960'
  app/helpers/application_helper.rb:977:in `labelled_form_for'
  app/views/my/account.html.erb:9:in `_app_views_my_account_html_erb__156702642_112175960'

My Ruby version is: ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
Redmine: 2.4.2 (2013-12-23)

and error in admin setting page


Started GET "/" for 78.130.201.101 at 2014-01-06 20:35:31 +0300
Processing by WelcomeController#index as HTML
  Current user: admin (id=1)
  Rendered news/_news.html.erb (2.5ms)
  Rendered welcome/index.html.erb within layouts/base (6.2ms)
  Rendered plugins/progressive_projects_list/app/views/application/_progressive_sidebar.html.erb (0.0ms)
  Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (2.0ms)
Completed 200 OK in 102.0ms (Views: 92.7ms | ActiveRecord: 3.4ms)
Started GET "/admin" for 78.130.201.101 at 2014-01-06 20:35:34 +0300
Processing by AdminController#index as HTML
  Current user: admin (id=1)
  Rendered admin/_menu.html.erb (4.0ms)
  Rendered admin/index.html.erb within layouts/admin (4.4ms)
  Rendered plugins/progressive_projects_list/app/views/application/_progressive_sidebar.html.erb (0.0ms)
  Rendered plugins/progressive_projects_list/app/views/application/_progressive_recent_projects.html.erb (1.5ms)
  Rendered layouts/base.html.erb (15.4ms)
Completed 200 OK in 25.4ms (Views: 19.4ms | ActiveRecord: 2.2ms)
Started GET "/settings" for 78.130.201.101 at 2014-01-06 20:35:40 +0300
Processing by SettingsController#index as HTML
  Current user: admin (id=1)
  Rendered settings/_general.html.erb (12.7ms)
  Rendered settings/_display.html.erb (6.9ms)
  Rendered common/_tabs.html.erb (42.0ms)
  Rendered settings/edit.html.erb within layouts/admin (43.1ms)
Completed 500 Internal Server Error in 154.3ms

ActionView::Template::Error (incompatible character encodings: UTF-8 and ASCII-8BIT):
    3: <div class="box tabular settings">
    4: <p><%= setting_select :ui_theme, Redmine::Themes.themes.collect {|t| [t.name, t.id]}, :blank => :label_default, :label => :label_theme %></p>
    5: 
    6: <p><%= setting_select :default_language, lang_options_for_select(false) %></p>
    7: 
    8: <p><%= setting_select :start_of_week, [[day_name(1),'1'], [day_name(6),'6'], [day_name(7),'7']], :blank => :label_language_based %></p>
    9: <% locale = User.current.language.blank? ? ::I18n.locale : User.current.language %>
  app/helpers/settings_helper.rb:40:in `setting_select'
  app/views/settings/_display.html.erb:6:in `block in _app_views_settings__display_html_erb__757413382_112048560'
  app/views/settings/_display.html.erb:1:in `_app_views_settings__display_html_erb__757413382_112048560'
  app/views/common/_tabs.html.erb:24:in `block in _app_views_common__tabs_html_erb___762764141_103488560'
  app/views/common/_tabs.html.erb:23:in `each'
  app/views/common/_tabs.html.erb:23:in `_app_views_common__tabs_html_erb___762764141_103488560'
  app/helpers/application_helper.rb:272:in `render_tabs'
  app/views/settings/edit.html.erb:3:in `_app_views_settings_edit_html_erb___319733134_109551710'
  app/controllers/settings_controller.rb:28:in `index'

*** LOCAL GEMS ***

actionmailer (4.0.2, 3.2.16)
actionpack (4.0.2, 3.2.16)
activemodel (4.0.2, 3.2.16)
activerecord (4.0.2, 3.2.16)
activerecord-deprecated_finders (1.0.3)
activeresource (4.0.0, 3.2.16)
activesupport (4.0.2, 3.2.16)
acts-as-taggable-on (3.0.0, 2.4.1, 2.3.3, 2.3.1)
arel (5.0.0, 4.0.1, 3.0.3)
atomic (1.1.14)
bigdecimal (1.2.3, 1.1.0)
builder (3.2.2, 3.1.4, 3.0.4, 3.0.0)
bundler (1.5.1)
capybara (2.2.0, 2.1.0)
celluloid (0.15.2)
childprocess (0.3.9)
cliver (0.3.2)
coderay (1.1.0)
daemon_controller (1.1.8)
daemons (1.1.9)
database_cleaner (1.2.0)
diff-lcs (1.2.5)
erubis (2.7.0)
eventmachine (1.0.3)
ffi (1.9.3)
formatador (0.2.4)
fuubar (1.3.2)
guard (2.2.5)
guard-rspec (4.2.3)
haml (4.0.4)
hike (1.2.3)
i18n (0.6.9)
io-console (0.4.2, 0.3)
journey (1.0.4)
jquery-rails (3.0.4, 2.0.3)
json (1.8.1, 1.5.5)
kgio (2.8.1)
listen (2.4.0)
lumberjack (1.0.4)
mail (2.5.4)
metaclass (0.0.1)
method_decorators (0.9.3)
method_source (0.8.2)
mime-types (2.0, 1.25.1)
mini_portile (0.5.2)
minitest (4.7.5, 2.5.1)
mocha (0.14.0)
money (5.0.0)
multi_json (1.8.2)
mysql2 (0.3.14)
net-ldap (0.3.1)
nokogiri (1.6.1)
passenger (4.0.32)
poltergeist (1.5.0)
polyglot (0.3.3)
pry (0.9.12.4)
rack (1.5.2, 1.4.5)
rack-cache (1.2)
rack-openid (1.4.1)
rack-ssl (1.3.3)
rack-test (0.6.2)
rails (4.0.2, 3.2.16)
rails-observers (0.1.2)
railties (4.0.2, 3.2.16)
raindrops (0.12.0)
rake (10.1.1, 0.9.2.2)
rb-fsevent (0.9.4)
rb-inotify (0.9.3)
rb-readline (0.5.0)
rdoc (3.12.2, 3.9.5)
redmine_acts_as_taggable_on (1.0.0)
rmagick (2.13.2)
rspec (2.14.1)
rspec-core (2.14.7)
rspec-expectations (2.14.4)
rspec-mocks (2.14.4)
rspec-rails (2.14.1)
ruby-ole (1.2.11.7)
ruby-openid (2.3.0)
ruby-progressbar (1.4.0)
rubygems-update (2.2.0)
rubyzip (1.1.0)
selenium-webdriver (2.39.0)
shoulda (3.3.2)
shoulda-context (1.0.2)
shoulda-matchers (1.4.1)
slop (3.4.7)
spreadsheet (0.6.9, 0.6.8)
sprockets (2.10.1, 2.2.2)
sprockets-rails (2.0.1)
sqlite3 (1.3.8)
test-unit (2.5.5)
thor (0.18.1)
thread_safe (0.1.3)
tilt (1.4.1)
timers (1.1.0)
treetop (1.4.15)
tzinfo (0.3.38)
unicorn (4.7.0)
vcard (0.2.12)
websocket (1.0.7)
websocket-driver (0.3.2)
xpath (2.0.0)
ya2yaml (0.31)
yard (0.8.7.3)

Replies (3)

RE: Internal error on Setting Page and user profil - Added by Slavi Sl over 3 years ago

sorry for my english :)
Reviewed several similar topics but found no problem with db encoding
i try to check SQL db:

mysql> SELECT default_character_set_name FROM information_schema.SCHEMATA S
    -> WHERE schema_name = "redmine";
+----------------------------+
| default_character_set_name |
+----------------------------+
| utf8                       |
+----------------------------+
1 row in set (0.02 sec)

RE: Internal error on Setting Page and user profil - Added by Alex Wilhelmy over 3 years ago

Hi Slavi,

I vaguely remember to have encountered the same problem. I think it was a permission problem on directory level in your install directory. Check for tmp and files having sufficient permissions. Remember that write permissions for www-data:www-data are required.

Hope this helps

Alex

RE: Internal error on Setting Page and user profil - Added by Tshegofatso Legwale over 1 year ago

So I installed redmine 3.2.3 on ubuntu 14.04
after hours of searching, with regards to not being able to access the settings page on a fresh install of redmine. I found out that my redmine symbolic link was owned by www-data:

lrwxrwxrwx 1 www-data www-data    34 Jun  5 19:12 redmine -> /opt/redmine/redmine-3.2.3/public/

only to find out that, this was not the same result for the content of that symbolic link:

user@ubuntu:/var/www/html/redmine$ ll
total 56
drwxrwxr-x  8 user user 4096 Jun  5 09:30 ./
drwxrwxr-x 18 user user 4096 Jun  5 19:01 ../
-rw-rw-r--  1 user user  459 Jun  5 09:30 404.html
-rw-rw-r--  1 user user  648 Jun  5 09:30 500.html
-rwxrwxr-x  1 user user  473 Jun  5 09:30 dispatch.fcgi.example*
-rw-rw-r--  1 user user 7886 Jun  5 09:30 favicon.ico
drwxrwxr-x 51 user user 4096 Jun  5 09:30 help/
-rw-rw-r--  1 user user 1453 Jun  5 09:30 htaccess.fcgi.example
drwxrwxr-x  4 user user 4096 Jun  5 09:30 images/
drwxrwxr-x  4 user user 4096 Jun  5 09:30 javascripts/
drwxrwxr-x  2 user user 4096 Jun  5 09:30 plugin_assets/
drwxrwxr-x  3 user user 4096 Jun  5 09:30 stylesheets/
drwxrwxr-x  4 user user 4096 Jun  5 09:30 themes/

killing the link with command unlink,
changing the ownership of my /op/redmine/redmine-3.2.3 to be owned by www-data for everything and creating the symbolic link fixed the settings issue for me!

user@ubuntu:/var/www/html/redmine$ ll
total 56
drwxrwxr-x  8 www-data www-data 4096 Jun  5 09:30 ./
drwxrwxr-x 18 www-data www-data 4096 Jun  5 19:01 ../
-rw-rw-r--  1 www-data www-data  459 Jun  5 09:30 404.html
-rw-rw-r--  1 www-data www-data  648 Jun  5 09:30 500.html
-rwxrwxr-x  1 www-data www-data  473 Jun  5 09:30 dispatch.fcgi.example*
-rw-rw-r--  1 www-data www-data 7886 Jun  5 09:30 favicon.ico
drwxrwxr-x 51 www-data www-data 4096 Jun  5 09:30 help/
-rw-rw-r--  1 www-data www-data 1453 Jun  5 09:30 htaccess.fcgi.example
drwxrwxr-x  4 www-data www-data 4096 Jun  5 09:30 images/
drwxrwxr-x  4 www-data www-data 4096 Jun  5 09:30 javascripts/
drwxrwxr-x  2 www-data www-data 4096 Jun  5 09:30 plugin_assets/
drwxrwxr-x  3 www-data www-data 4096 Jun  5 09:30 stylesheets/
drwxrwxr-x  4 www-data www-data 4096 Jun  5 09:30 themes/

trust this will assist someone

(1-3/3)