Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error 500 when reading -any- repository file #21

Open
DemmyDemon opened this issue Jul 10, 2012 · 3 comments
Open

Error 500 when reading -any- repository file #21

DemmyDemon opened this issue Jul 10, 2012 · 3 comments

Comments

@DemmyDemon
Copy link

Whenever I open any repositry file, I get an error 500.
My redmine log shows:

ActionView::TemplateError (uninitialized constant Redmine::CodesetUtil) on line #15 of vendor/plugins/redmine_ultraviolet/app/views/common/_file.rhtml: 12: </style> 13: 14: <div class="uv-file"> 15: <%= syntax_highlight( filename, Redmine::CodesetUtil.to_utf8_by_setting(content) ) %> 16: </div> 17: 18: <% content_for :header_tags do %>

I know this is because my Redmine is old as dirt (1.1.2~bpo60+1, Debian Squeeze backports), but it would be awesomesauce if it was stated somewhere that 1.4.2 (or whatever it is) is the required Redmine version.

So yeah, put my issue down as either "incomplete documentation" or "not backwards compatible" depending on how much work you want to do :-D

@epitron
Copy link
Owner

epitron commented Jul 10, 2012

Ugh. That stupid CodesetUtil line was there to fix a bug in 1.4. Now it broke all the old ones? FFFFFFFFFFFFFFFFFFFFFFFFFFFFFF.........

I don't have one redmine install to test with anymore, let alone the 6 of them necessary to service all the old releases.

Can you grep the Redmine 1.1 codebase for any "utf8" commands, and tell me which one I should be using?

@DemmyDemon
Copy link
Author

Hopefully, this is what you wanted:

fvold@webkonsept:/usr/share/redmine$ find . -name \*.rb -exec grep -Hn utf8 {} \; ./test/unit/changeset_test.rb:224: def test_comments_should_be_converted_to_utf8 ./test/unit/changeset_test.rb:232: def test_invalid_utf8_sequences_in_comments_should_be_stripped ./vendor/gems/coderay-0.9.7/lib/coderay/scanners/php.rb:117: utf8_decode utf8_encode var_dump var_export ./lib/redmine/scm/adapters/mercurial_adapter.rb:109: cmd = "#{HG_BIN} --debug --encoding utf8 -R #{target('')} log -C --style #{shell_quote self.class.template_path}" ./app/models/changeset.rb:79: write_attribute(:committer, self.class.to_utf8(arg.to_s)) ./app/models/changeset.rb:168: to_utf8(str.to_s.strip) ./app/models/changeset.rb:249: def self.to_utf8(str) ./app/helpers/repositories_helper.rb:119: def to_utf8(str) ./app/helpers/attachments_helper.rb:31: def to_utf8(str) ./app/helpers/timelog_helper.rb:147: csv << headers.collect {|c| to_utf8(c) } ./app/helpers/timelog_helper.rb:169: row << to_utf8(format_criteria_value(criterias[level], value)) ./app/helpers/timelog_helper.rb:186: def to_utf8(s)
(edited: I suddenly realized you might want the line numbers for some reason)
(edited again: It really is fine by me if you say "Well, old-as-dirt is not supported", but it'd be nice if you said so in the documentation)

@DemmyDemon
Copy link
Author

As for "should be using", I haven't the foggiest idea. Haven't done any Ruby programming since the nineties, and even then it was only to the "Hello world" level.
I tried figuring it out, but that failed horribly, I'm afraid.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants