プロジェクト

全般

プロフィール

Vote #71291

完了

ActionView::TemplateError (can't convert Fixnum into String)

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
急いで
担当者:
-
カテゴリ:
Projects_11
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
11
version_id:
42
issue_org_id:
10135
author_id:
49019
assigned_to_id:
1
comments:
8
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
39
ステータス-->[Closed]

説明

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:     
45: <% end %> 46: app/helpers/application_helper.rb:233:in `render_project_jump_box' app/helpers/application_helper.rb:250:in `project_tree_options_for_select' app/models/project.rb:664:in `project_tree' app/models/project.rb:660:in `each' app/models/project.rb:660:in `project_tree' app/helpers/application_helper.rb:260:in `project_tree' app/helpers/application_helper.rb:242:in `project_tree_options_for_select' app/helpers/application_helper.rb:232:in `render_project_jump_box' app/views/layouts/base.rhtml:43:in `_run_rhtml_app47views47layouts47base46rhtml' /usr/lib/ruby/1.8/webrick/httpserver.rb:104:in `service' /usr/lib/ruby/1.8/webrick/httpserver.rb:65:in `run' /usr/lib/ruby/1.8/webrick/server.rb:173:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start' /usr/lib/ruby/1.8/webrick/server.rb:162:in `start_thread' /usr/lib/ruby/1.8/webrick/server.rb:95:in `start' /usr/lib/ruby/1.8/webrick/server.rb:92:in `each' /usr/lib/ruby/1.8/webrick/server.rb:92:in `start' /usr/lib/ruby/1.8/webrick/server.rb:23:in `start' /usr/lib/ruby/1.8/webrick/server.rb:82:in `start'

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.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリProjects_11 にセット
  • 対象バージョン1.3.2_42 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0