Project

General

Profile

Internal error when creating new issue or opening existing issues

Added by Peter Englmaier over 12 years ago

Hi,

I've installed several redmine instances of version 1.2.1 inside a single apache server below different sub-urls. The purpose of the installation is to try out customizations of redmine in the 'development' install. However, after several customizations and configuration work inside the redmine GUI I've got the following 'internal error' when displaying issues or trying to open new issues:

Processing IssuesController#new (for 10.73.9.137 at 2011-11-17 17:30:49) [GET]
  Parameters: {"project_id"=>"ekogu", "action"=>"new", "controller"=>"issues"}
Rendering template within layouts/base
Rendering issues/new

ActionView::TemplateError (wrong number of arguments (0 for 1)) on line #21 of app/views/issues/_attributes.rhtml:
18:                      :title => l(:label_issue_category_new), 
19:                      :tabindex => 199) if authorize_for('issue_categories', 'new') %></p>
20: <% end %>
21: <% unless @issue.assignable_versions.empty? %>
22: <p><%= f.select :fixed_version_id, version_options_for_select(@issue.assignable_versions, @issue.fixed_version), :include_blank => true %>
23: <%= prompt_to_remote(image_tag('add.png', :style => 'vertical-align: middle;'),
24:                      l(:label_version_new),

    app/models/issue.rb:458:in `assignable_versions'
    app/views/issues/_attributes.rhtml:21:in `_run_rhtml_app47views47issues47_attributes46rhtml_locals_attributes_object'
    app/views/issues/_attributes.rhtml:1:in `_run_rhtml_app47views47issues47_attributes46rhtml_locals_attributes_object'
    app/views/issues/_form.rhtml:23:in `_run_rhtml_app47views47issues47_form46rhtml_locals_f_form_object'
    app/views/issues/new.rhtml:7:in `_run_rhtml_app47views47issues47new46rhtml'
    app/helpers/application_helper.rb:771:in `labelled_tabular_form_for'
    app/views/issues/new.rhtml:3:in `_run_rhtml_app47views47issues47new46rhtml'
    app/controllers/issues_controller.rb:133:in `new'
    app/controllers/issues_controller.rb:132:in `new'
    config/initializers/mongrel.rb:62:in `dispatch_cgi'

Rendering /appl/srv/webapps/ekogu-integration/public/500.html (500 Internal Server Error)

I made several small customizations inside the redmine code, so I expected I broke something.

To find out what's going on, I cloned the application and database. With 'cloning' I mean, I made a exact copy of the install directory, purged caches, duplicated the database and run through all the steps necessary to configure and migrate the new installation like I would do with restoring a backup in a new place below a new sub-URI (basically following all the steps in the migration/upgrade guide). But surprisingly the 'clone' does not get the internal error anymore. Strange, because the two instances are absolutely identical, only the session key and database name differ.

Then I installed 1.2.2 from scratch and migrated the data from the broken install into it - and it worked without that error! I repeated all the changes I made to the redmine 1.2.1 version and the error still doesn't show up.

Problem solved? Not so: when I clone the new install to the old place (deleting the old install and db completely) - the error shows up again. Somehow it seems to be locked to the sub-url prefix.

I tried restarting apache and clearing cookies in the browser but the error remains.

I am now a bit out of ideas where the error can be. Did anybody get this? The two installations are identical in every detail. When I dump the DB there is no difference. When I diff the redmine dir, I see only expected differences like logfiles. Any ideas where I can look for information left over from the broken install?

Thanks for any help in advance,
Peter

P.s.: Some System details:
Linux SLES 11 SP1
mysql Ver 14.12 Distrib 5.0.67, for suse-linux-gnu (x86_64)
Running with apache and mongrel_cluster
redmine 1.2.2
ruby 1.8.7
gem 1.6.2
actionmailer (2.3.11)
actionpack (2.3.11)
activerecord (2.3.11)
activeresource (2.3.11)
activesupport (2.3.11)
cgi_multipart_eof_fix (2.5.0)
daemons (1.1.4)
fastthread (1.0.7)
gem_plugin (0.2.3)
i18n (0.4.2)
mongrel (1.1.5)
mongrel_cluster (1.0.5)
mysql (2.8.1)
rack (1.1.1)
rails (2.3.11)
rake (0.9.2)
rmagick (1.15.17)


Replies (2)

RE: Internal error when creating new issue or opening existing issues - Added by Peter Englmaier over 12 years ago

After some trouble shooting, I found out that the error goes away when I remove the two blocks starting with
<% unless @issue.assignable_versions.empty? %>
from views/issues/_attributes.rhtml and views/issues/_form_update.rhtml.

So apparentely, "@issue.assignable_versions.empty?" causes the error "ActionView::TemplateError (wrong number of arguments (0 for 1))"

The redmine install holds a master and a sub-project, and a single 'shared' version. Removing the version or adding versions to each project didn't change the error. So I guess the problem is, that 'assignable_versions' is not set when the issue form is evaluated. At the moment, I cannot see why.

Any help?

RE: Internal error when creating new issue or opening existing issues - Added by Peter Englmaier over 12 years ago

In the meantime I found out, that the problem only shows up when using mongrel cluster. Running the site directly with

mongrel_rails start -e production -p 6000

Does not produce the error.

Maybe mongrel cluster is keeping some stale cached data somewhere?

    (1-2/2)