https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292011-01-08T12:19:51ZRedmineRedmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=237992011-01-08T12:19:51ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>There is no database migration and no change in wiki controller/model in 1.0-stable, so I don't have a clue.</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238012011-01-08T16:22:44ZArtem Malahov
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>There is no database migration and no change in wiki controller/model in 1.0-stable, so I don't have a clue.</p>
</blockquote>
<p>May be problem in new version of i18n?</p>
<pre>
gem install i18n -v=0.4.2
</pre> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238122011-01-09T10:54:19ZJean-Philippe Langjp_lang@yahoo.fr
<ul></ul><p>I don't think so.</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238362011-01-10T08:52:04ZArtem Malahov
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>There is no database migration and no change in wiki controller/model in 1.0-stable, so I don't have a clue.</p>
</blockquote>
<p>hello!</p>
<p>today i retest my redmine. I copy my backup and try to update it. That i see:<br /><pre>
first /vhosts # cp -R redmine.iso.vc.bak redmine.iso.vc.bak.test
first /vhosts # cd redmine.iso.vc.bak.test
first redmine.iso.vc.bak.test # svn update > upd.txt
first redmine.iso.vc.bak.test # cat upd.txt | grep wiki
U test/unit/wiki_test.rb
U test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb
U test/unit/lib/redmine/wiki_formatting/macros_test.rb
U test/unit/lib/redmine/wiki_formatting.rb
U test/unit/wiki_redirect_test.rb
U test/unit/wiki_content_test.rb
U test/unit/wiki_page_test.rb
U test/functional/wikis_controller_test.rb
U test/functional/wiki_controller_test.rb
U app/models/wiki.rb
U app/controllers/wiki_controller.rb
U app/views/wiki/history.rhtml
U app/views/wiki/diff.rhtml
</pre></p>
<p>I don't spec in svn/ruby, but i see that wiki is updated...</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238372011-01-10T08:58:55ZArtem Malahov
<ul></ul><p>And that i'am find in repository:<br /><a class="external" href="http://www.redmine.org/projects/redmine/repository/diff/trunk/app/models/wiki.rb?rev=4430&rev_to=3632">http://www.redmine.org/projects/redmine/repository/diff/trunk/app/models/wiki.rb?rev=4430&rev_to=3632</a></p>
<p>I think than this changes are bad.<br />May be problem in russian locale?</p>
<p>My lates version (1.0.3) revision is:<br /><pre>
first redmine.iso.vc.bak.test # svn info
Path: .
URL: http://redmine.rubyforge.org/svn/trunk
Repository Root: http://redmine.rubyforge.org/svn
Repository UUID: e93f8b46-1217-0410-a6f0-8f06a7374b81
Revision: 4388
Node Kind: directory
Schedule: normal
Last Changed Author: jplang
Last Changed Rev: 4388
Last Changed Date: 2010-11-08 01:38:10 +0300 (Пнд, 08 Ноя 2010)
</pre></p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238402011-01-10T09:24:27ZPeng Wang
<ul></ul><p>Yes, it took place on my installation too (from 1.0.2 to 1.1.0), editing wiki pages will result in failure</p>
<pre>
I18n::MissingInterpolationArgument (missing interpolation argument in "'%{page}' wiki页面已更\346\226\260" ({:id=>"Contacts"} given)):
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:174:in `interpolate_without_deprecated_syntax'
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n/backend/base.rb:46:in `translate'
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/gems/1.8/gems/i18n-0.4.2/lib/i18n.rb:160:in `t'
lib/redmine/i18n.rb:13:in `l'
app/models/mailer.rb:198:in `wiki_content_updated'
app/models/wiki_content_observer.rb:25:in `after_update'
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/1.8/observer.rb:185:in `notify_observers'
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/1.8/observer.rb:184:in `each'
C:/Program Files/BitNami Redmine Stack/ruby/lib/ruby/1.8/observer.rb:184:in `notify_observers'
app/controllers/wiki_controller.rb:123:in `update'
</pre> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238412011-01-10T09:52:20ZArtem Malahov
<ul></ul><p>After several attempts, I found an error:<br />problem in method .downcase - they don'n work with russian locale...</p>
<p>I am now looking for a solution...</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238432011-01-10T10:13:15ZArtem Malahov
<ul></ul><p>Artem Malahov wrote:</p>
<blockquote>
<p>After several attempts, I found an error:<br />problem in method .downcase - they don'n work with russian locale...</p>
<p>I am now looking for a solution...</p>
</blockquote>
For me solution is:
<ol>
<li>install gem unicode<br /><pre>
first models # gem install unicode
</pre></li>
<li>replace code in /app/models/wiki.rb from<br /><pre>
# find the page with the given title
def find_page(title, options = {})
title = start_page if title.blank?
title = Wiki.titleize(title).downcase
page = pages.first(:conditions => ["LOWER(title) LIKE ?", title])
if !page && !(options[:with_redirect] == false)
# search for a redirect
redirect = redirects.first(:conditions => ["LOWER(title) LIKE ?", title])
page = find_page(redirect.redirects_to, :with_redirect => false) if redirect
end
page
end
</pre><br />to<br /><pre>
# find the page with the given title
def find_page(title, options = {})
require 'unicode'
title = start_page if title.blank?
#title = Wiki.titleize(title).downcase
title = Unicode::downcase(Wiki.titleize(title))
page = pages.first(:conditions => ["LOWER(title) LIKE ?", title])
if !page && !(options[:with_redirect] == false)
# search for a redirect
redirect = redirects.first(:conditions => ["LOWER(title) LIKE ?", title])
page = find_page(redirect.redirects_to, :with_redirect => false) if redirect
end
page
end
</pre></li>
</ol> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238682011-01-10T17:56:18ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Target version</strong> set to <i>1.1.1</i></li></ul><p>Another option would be to let the database to the job:</p>
<pre><code>page = pages.first(:conditions => ["LOWER(title) LIKE LOWER(?)", title])</code></pre>
<p>Tested OK with postgresql and cyrillic.</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238712011-01-10T18:24:48ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Affected version (unused)</strong> changed from <i>1.0.5</i> to <i>1.1.0</i></li><li><strong>Affected version</strong> changed from <i>1.0.5</i> to <i>1.1.0</i></li></ul><p>Changing affected version since 1.0.5 <strong>stable</strong> is not affected.</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238722011-01-10T18:30:30ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Resolved</i></li></ul><p>Fix committed in <a class="changeset" title="Fixed: wiki pages with cyrillic characters not found with postgresql (#7245)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4680">r4680</a> in trunk. Please, can you confirm the fix?</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=238842011-01-11T05:27:30ZArtem Malahov
<ul></ul><p>Jean-Philippe Lang wrote:</p>
<blockquote>
<p>Fix committed in <a class="changeset" title="Fixed: wiki pages with cyrillic characters not found with postgresql (#7245)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4680">r4680</a> in trunk. Please, can you confirm the fix?</p>
</blockquote>
<p>yes. i update my revision and got a changes! Thank you!</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=241552011-01-16T14:45:45ZJean-Philippe Langjp_lang@yahoo.fr
<ul><li><strong>Subject</strong> changed from <i>After update (1.0.5) wiki fail</i> to <i>Wiki fails to find pages with cyrillic characters using postgresql</i></li><li><strong>Status</strong> changed from <i>Resolved</i> to <i>Closed</i></li><li><strong>Resolution</strong> set to <i>Fixed</i></li></ul><p>Merged in 1.1-stable in <a class="changeset" title="Merged r4680 from trunk." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/4728">r4728</a>.<br />Thanks for the feedback.</p> Redmine - Defect #7245: Wiki fails to find pages with cyrillic characters using postgresqlhttps://www.redmine.org/issues/7245?journal_id=279772011-04-15T16:25:22ZEtienne Massip
<ul><li><strong>Category</strong> set to <i>I18n</i></li></ul>