agileware-jp / redmine_work_days

Redmine Work Days Plugin
18 stars 8 forks source link

Upgrading to Redmine 3.4 #14

Closed takaxp closed 7 years ago

takaxp commented 7 years ago

When I upgraded my Redmine to the latest 3.4 with redmine_work_days plugin, the gantt page cannot be displayed since an Internal Server Error occurred. Production log says as follows:

  Rendered plugins/redmine_work_days/app/views/gantts/3.x/show.html.erb (268.3ms)
  Rendered plugins/redmine_work_days/app/views/gantts/show.html.erb within layouts/base (268.7ms)
Completed 500 Internal Server Error in 290ms (ActiveRecord: 12.8ms)

ActionView::Template::Error (undefined method `link_to_content_update' for #<#<Class:0x007f981f5f99c0>:0x000000050fe6c8>):
    333: <table style="width:100%">
    334: <tr>
    335:   <td style="text-align:left;">
    336:     <%= link_to_content_update("\xc2\xab " + l(:label_previous),
    337:                                params.merge(@gantt.params_previous),
    338:                                :accesskey => accesskey(:previous)) %>
    339:   </td>
  plugins/redmine_work_days/app/views/gantts/3.x/show.html.erb:336:in `_plugins_redmine_work_days_app_views_gantts___x_show_html_erb___786734221022208622_70145669133820'

Then, I changed plugins/redmine_work_days/app/views/gantts/3.x/show.html.erb as shown below.

<table style="width:100%">
<tr>
  <td style="text-align:left;">
    <%= link_to("\xc2\xab " + l(:label_previous),
        {:params => params.merge(@gantt.params_previous)},
    :accesskey => accesskey(:previous)) %>
  </td>
  <td style="text-align:right;">
    <%= link_to(l(:label_next) + " \xc2\xbb",
        {:params => params.merge(@gantt.params_next)},
    :accesskey => accesskey(:next)) %>
  </td>
</tr>
</table>

It seems to work well at least in my environment but I'm not a ruby coder and also Redmine specialist so please check the codes and update them appropriately.

Best regards, Takaaki

urimaro commented 7 years ago

@takaxp Thank you for your report. Please try latest version. 😉

takaxp commented 7 years ago

@urimaro @zh @springkuma Many thanks to all of you for the quick reactions. I just confirmed the merged codes are provided from the repository and it works well in my server. Great plugin and team. Thanks again :)