Bug 23733 - Отображение истории в wiki с кириллицей заканчивается крахом
Summary: Отображение истории в wiki с кириллицей заканчивается крахом
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: redmine (show other bugs)
Version: unstable
Hardware: all Linux
: P3 major
Assignee: Nobody's working on this, feel free to take it
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-05 23:45 MSD by Denis Yagofarov
Modified: 2010-07-22 13:42 MSD (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Yagofarov 2010-07-05 23:45:10 MSD
Если в одной из версий wiki-страницы присутствуют кириллические буквы, при сравнении этой версии с другими происходит крах.

1) v1: Test
2) v2: Teest
3) v3: Тест
4) v1 vs. v2: ** Отображает разницу **
5) v2 vs. v3: ** Падает **

Конфиги:

$ cat /etc/redmine/prodtest/database.yml
production:
  adapter: sqlite3
  database: /var/redmine/prodtest
  encoding: utf8

$ cat /etc/mongrel_cluster/sites-available/redmine-prodtest.env
export LANG=ru_RU.UTF-8
export X_ALT_SITEID="prodtest"

Пакеты:

ruby-1.9.1-alt1.r26040.1
ruby-rails-2.3.8-alt1

Пробовал конвертировать темплейт в utf8 - не сработало. 
Пробовал применить во этот патч: http://s3.amazonaws.com/activereload-lighthouse/assets/ecec90b7ed8ccc3ca7472413376ea9374a027edf/workaround-erb.diff?AWSAccessKeyId=1AJ9W2TX1B2Z7C2KYB82&Expires=1278357174&Signature=Z2%2BIPPqoJBJXwmmyCc%2BLK1M/nUQ%3D

У меня, пока, не хватает знаний починить самому.

Бектрейс:

ActionView::TemplateError (incompatible character encodings: UTF-8 and ASCII-8BIT) on line #17 of app/views/wiki/diff.rhtml:
14: 
15: <hr />
16: 
17: <%= html_diff(@diff) %>

    app/views/wiki/diff.rhtml:17:in `concat'
    app/views/wiki/diff.rhtml:17:in `_run_rhtml_app47views47wiki47diff46rhtml'
    /usr/share/ruby/vendor_ruby/1.9/action_view/renderable.rb:34:in `block in render'
    /usr/share/ruby/vendor_ruby/1.9/action_view/base.rb:306:in `with_template'
    /usr/share/ruby/vendor_ruby/1.9/action_view/renderable.rb:30:in `render'
    /usr/share/ruby/vendor_ruby/1.9/action_view/template.rb:205:in `render_template'
    /usr/share/ruby/vendor_ruby/1.9/action_view/base.rb:265:in `render'
    /usr/share/ruby/vendor_ruby/1.9/action_view/base.rb:348:in `_render_with_layout'
    /usr/share/ruby/vendor_ruby/1.9/action_view/base.rb:262:in `render'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:1250:in `render_for_file'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:936:in `render'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/benchmarking.rb:51:in `block in render_with_benchmark'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/benchmarking.rb:51:in `render_with_benchmark'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:1326:in `default_render'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:1332:in `perform_action'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/filters.rb:617:in `call_filters'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/filters.rb:610:in `perform_action_with_filters'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/benchmarking.rb:68:in `block in perform_action_with_benchmark'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/benchmarking.rb:68:in `perform_action_with_benchmark'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/rescue.rb:160:in `perform_action_with_rescue'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/flash.rb:151:in `perform_action_with_flash'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:532:in `process'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/filters.rb:606:in `process_with_filters'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:391:in `process'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/base.rb:386:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/routing/route_set.rb:438:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/dispatcher.rb:87:in `dispatch'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/dispatcher.rb:121:in `_call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/dispatcher.rb:130:in `block in build_middleware_stack'
    /usr/share/ruby/vendor_ruby/1.9/active_record/query_cache.rb:29:in `call'
    /usr/share/ruby/vendor_ruby/1.9/active_record/query_cache.rb:29:in `block in call'
    /usr/share/ruby/vendor_ruby/1.9/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
    /usr/share/ruby/vendor_ruby/1.9/active_record/query_cache.rb:9:in `cache'
    /usr/share/ruby/vendor_ruby/1.9/active_record/query_cache.rb:28:in `call'
    /usr/share/ruby/vendor_ruby/1.9/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/string_coercion.rb:25:in `call'
    /usr/share/ruby/vendor_ruby/1.9/rack/head.rb:9:in `call'
    /usr/share/ruby/vendor_ruby/1.9/rack/methodoverride.rb:24:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/params_parser.rb:15:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/session/cookie_store.rb:99:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/failsafe.rb:26:in `call'
    /usr/share/ruby/vendor_ruby/1.9/rack/lock.rb:11:in `block in call'
    <internal:prelude>:8:in `synchronize'
    /usr/share/ruby/vendor_ruby/1.9/rack/lock.rb:11:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/dispatcher.rb:106:in `call'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/cgi_process.rb:44:in `dispatch_cgi'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/dispatcher.rb:101:in `dispatch_cgi'
    /usr/share/ruby/vendor_ruby/1.9/action_controller/dispatcher.rb:27:in `dispatch'
    /usr/share/ruby/vendor_ruby/1.9/mongrel/rails.rb:76:in `block in process'
    <internal:prelude>:8:in `synchronize'
    /usr/share/ruby/vendor_ruby/1.9/mongrel/rails.rb:74:in `process'
    /usr/share/ruby/vendor_ruby/1.9/mongrel.rb:157:in `block in process_client'
    /usr/share/ruby/vendor_ruby/1.9/mongrel.rb:156:in `each'
    /usr/share/ruby/vendor_ruby/1.9/mongrel.rb:156:in `process_client'
    /usr/share/ruby/vendor_ruby/1.9/mongrel.rb:283:in `block (2 levels) in run'
Comment 1 Sir Raorn 2010-07-12 02:35:00 MSD
Патч проэкспайрился.

А как настроена компрессия wiki-страниц?  Если попробовать с ней поиграться?
Comment 2 Repository Robot 2010-07-14 07:36:06 MSD
redmine-0.9.6-alt1.r3839.1 -> sisyphus:

* Sat Jul 10 2010 Alexey I. Froloff <raorn@altlinux> 0.9.6-alt1.r3839.1
- SVN revision 3839
- Added missing deps on pwgen (closes: #23726)
- Fixed one more anti-xss html-escape issue (closes: #23728)
- Forced wiki page encoding to UTF-8 when using compression (closes: #23733)
Comment 3 Sir Raorn 2010-07-22 13:03:40 MSD
Не хватило, нужно ещё некомпрессованые страницы энфорсить.
Comment 4 Repository Robot 2010-07-22 13:42:51 MSD
redmine-1.0.0-alt1.r3858.1 -> sisyphus:

* Tue Jul 20 2010 Alexey I. Froloff <raorn@altlinux> 1.0.0-alt1.r3858.1
- 1.0.0 release (SVN revision 3858)
- Forced wiki page encoding to UTF-8 (closes: #23733)
- Fixed getopt invocation in redmine-init (closes: #23789)
- Reworked instance enumeration in redmine-rake to avoid stdin
  consumption (closes: #23790)