Vote #71291
完了ActionView::TemplateError (can't convert Fixnum into String)
0%
説明
Hi
I have migrated my Redmine 1.0.2 to 1.2.1. Everything was good and the migrate DB generated no error or warming,
For the testing purpose i ran the redmine in webrick
The login page appear and I can login, but the next page got a 500.html error with the folling log.
Please help me its urgent
Thanks
Shahul
ERROR LOG IS:
ActionView::TemplateError (can't convert Fixnum into String) on line #43 of app/views/layouts/base.rhtml: 40: <%= link_to l(:label_search), {:controller => 'search', :action => 'index', :id => @project}, :accesskey => accesskey(:search) %>: 41: <%= text_field_tag 'q', @question, :size => 20, :class => 'small', :accesskey => accesskey(:quick_search) %> 42: <% end %> 43: <%= render_project_jump_box %> 44:
journals
You upgraded to 1.2.1 but you report this issue against 1.2.3. So what version are you using?
--------------------------------------------------------------------------------
And please, don't assign issues.
--------------------------------------------------------------------------------
sorry, i have upgraded my redmine from 1.0.2 to 1.2.3
--------------------------------------------------------------------------------
Hi i have the same issue.
I upgraded from 1.0.1 to 1.1.3.
I found out that all project related templating e.g. "link_to_project", "render_project_jump_box", ..., is not working.
Is that maybe an ruby package with an false version?
My installed packeges are:
<pre>
actionmailer (3.2.1, 2.3.11)
actionpack (3.2.1, 2.3.11)
activemodel (3.2.1)
activerecord (3.2.1, 2.3.11)
activeresource (3.2.1, 2.3.11)
activesupport (3.2.1, 2.3.11)
acts-as-taggable-on (2.1.1)
arel (3.0.0)
builder (3.0.0)
bundler (1.0.21)
daemon_controller (0.2.5)
erubis (2.7.0)
fastthread (1.0.7)
file-tail (1.0.5)
hike (1.2.1)
i18n (0.6.0)
journey (1.0.1)
json (1.6.5)
mail (2.4.1)
mime-types (1.17.2)
multi_json (1.0.4)
oniguruma (1.1.0)
passenger (3.0.2)
plist (3.1.0)
polyglot (0.3.3)
rack (1.4.1, 1.2.1, 1.1.3)
rack-cache (1.1)
rack-ssl (1.3.2)
rack-test (0.6.1)
rails (2.3.11)
railties (3.2.1)
rake (0.8.7)
rdoc (3.12)
sprockets (2.1.2)
spruz (0.2.2)
textpow (0.10.1)
thor (0.14.6)
treetop (1.4.10)
tzinfo (0.3.31)
</pre>
Thx for the help.
--------------------------------------------------------------------------------
OK, found. You must have at least one project with a legacy numerical identifier (which is no longer valid).
The fix is committed in r8804, but it can be easily applied locally:
<pre>
Index: app/models/project.rb
===================================================================
--- app/models/project.rb (revision 8776)
+++ app/models/project.rb (working copy)
@@ -274,7 +274,7 @@
def to_param
# id is used for projects with a numeric identifier (compatibility)
- @to_param ||= (identifier.to_s =~ %r{^\d*$} ? id : identifier)
+ @to_param ||= (identifier.to_s =~ %r{^\d*$} ? id.to_s : identifier)
end
def active?
</pre>
This patch is against current trunk but you should be able to locate this piece of code in 1.1.3 or 1.2.3.
Alternatively, you can change your project identifier(s) to non-numerical ones.
--------------------------------------------------------------------------------
Hi thx for the fix,
i found the problem by my self and added before all numeric identifiers a letter. ;)
But i spent 4 hours to found it. xD
--------------------------------------------------------------------------------
thank u so much Jean-Philippe Lang, the issue has been fixed and its works for me
Thanks
Shahul
--------------------------------------------------------------------------------
Merged. Thanks for the feedback.
--------------------------------------------------------------------------------