Project

General

Profile

When using the file-protocol in an issue an Error 500 appears

Added by Elvys Melo Duarte Almeida over 7 years ago

Hello,

we have a strange behavior when we edit an issue and we insert a link of type file///

In a specific example I edited the issue indicating to a file

file:///D:/__Projects/flashcon/__doc__/doxygen/html/class_u_i_1_1_base_tab_model.html

After the changes were submitted the issue showed the error message Redmine 500 error

Internal error

An error occurred on the page you were trying to access.
If you continue to experience problems please contact your Redmine administrator for assistance.

If you are the Redmine administrator, check your log files for details about the error.

In the log file, following text were found:

...
...
Completed 500 Internal Server Error in 502ms (ActiveRecord: 47.3ms)

ActionView::Template::Error (wrong number of arguments (2 for 1)):
    21:       </div>
    22:     <% end %>
    23:     <% end %>
    24:     <%= render_notes(issue, journal, :reply_links => reply_links) unless journal.notes.blank? %>
    25:     </div>
    26:   </div>
    27:   <%= call_hook(:view_issues_history_journal_bottom, { :journal => journal }) %>
  plugins/wiking/lib/wiking_application_helper_patch.rb:340:in `block in parse_redmine_links_with_wiking'
...
...

I googled trying to find out what the problem came from, and I found a site where a user says to remove sprockets_better_errors from the gem-files.

Well, to be short - in our Gemfile there isn't such a gem.

In Gemfile.lock there are the following entries:

    sprockets-rails
    sprockets (3.7.1)
    sprockets-rails (3.2.0)
    sprockets (>= 3.0.0)

I found out that sprocket-rails provides Sprockets implementation for Rails 4.x so it should run with our rail version ( 4.2.7.1 ).

A recursive grep was run in the redmine-folder for "sprockets*" showed that the sprockets appears in the Gemfile.lock, only.

My work-around:

I removed using phpMyAdmin the string file:///D:/__Projects/flashcon/__doc__/doxygen/html/class_u_i_1_1_base_tab_model.html from the proper journal-entry and then the issue was shown normally.

Afterwards I inserted the string again but this time in a pre-tag, and it worked. E.g.

<pre>
     file:///D:/...
</pre>
</pre

My hint is that the module(s) responsible to create links finds the file-protocol ant it crashs. But I'm not a ruby-developer and I don't know where to start.

Our environment:

  • OS: Debian GNU/Linux 8.8 (jessie)

The output of RAILS_ENV=production bin/about

sh: 1: darcs: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
Environment:
  Redmine version                3.3.3.stable
  Ruby version                   2.1.5-p273 (2014-11-13) [x86_64-linux-gnu]
  Rails version                  4.2.7.1
  Environment                    production
  Database adapter               Mysql2
SCM:
  Subversion                     1.8.10
  Git                            2.1.4
  Filesystem                     
Redmine plugins:
  redmine_latex_mathjax_macro    0.3.0
  redmine_per_project_sender     0.2.3
  redmine_scm                    0.4.1
  redmine_wiki_extensions        0.7.0
  wiking                         1.0.0b

Replies (1)

RE: When using the file-protocol in an issue an Error 500 appears - Added by Elvys Melo Duarte Almeida over 7 years ago

Hello everybody,

I found the cause of the problem:

The wiking version we used is not compatible with Redmine 3.x

I replaced the one we used with the present version online ( Ref. http://projects.andriylesyuk.com/project/redmine/wiking (Note: It is still on working! )).

Now the commit is shown, well.

Maybe this information can help someone else.

Bye.

    (1-1/1)