I'm looking for a part-time remote job.

Hire me


I'm the author of:

Mastering Redmine is a comprehensive guide with tips, tricks and best practices, and an easy-to-learn structure.

Check the book's project or

Buy the book

Social pages of the book:

By buying this book you also donate to Redmine (see this page).


Follow me:

Bug #2098

Failure in XLS Export (undefined method `find_custom_field_template' for #<XlsExportController)

Added by Tib Onu over 11 years ago. Updated over 7 years ago.

Status:
In Progress
Priority:
Major
Assignee:
Category:
-
Target version:
Start date:
07 Sep 2012
Due date:
% Done:

90%

Redmine version:
External issue:

Description

I’m getting the error below when trying to export the list of issues using the XLS Export plugin. This only happens with projects having custom fields. I tried with Extended Fields 0.1.0 as well as with the latest SVN snapshot (0.1.1 from Sep 7, 2012) - both with the same result.

Environment

ruby 1.8.7 (2011-06-30 patchlevel 352) [i386-linux]

*** LOCAL GEMS ***

actionmailer (2.3.14, 2.3.11)
actionpack (2.3.14, 2.3.11)
activemodel (3.0.9)
activerecord (2.3.14, 2.3.11)
activeresource (2.3.14, 2.3.11)
activesupport (3.0.9, 2.3.14, 2.3.11)
builder (2.1.2)
bundler (1.1.3)
coderay (1.0.6)
daemon_controller (0.2.6)
fastercsv (1.5.4)
fastthread (1.0.7)
i18n (0.5.0, 0.4.2)
mysql (2.8.1)
mysql2 (0.2.7)
net-ldap (0.3.1)
passenger (3.0.7)
rack (1.2.3, 1.1.3, 1.1.2, 1.1.0)
rack-test (0.5.7)
rails (2.3.14)
rake (0.9.2.2, 0.8.7)
ruby-ole (1.2.11.4)
ruby-openid (2.1.8)
rubyzip (0.9.9)
spreadsheet (0.7.3)
tzinfo (0.3.33)

Redmine 1.4.1.stable.9617

Extended fields 0.1.0 or latest from SVN 0.1.1 (Sep 7, 2012)
Issues XLS export 0.2.1

Error trace

Processing XlsExportController#export_current (for 10.11.31.114 at 2012-09-07 09:26:02) [GET]
  Parameters: {"action"=>"export_current", "controller"=>"xls_export", "project_id"=>"myprojectname"}

NoMethodError (undefined method `find_custom_field_template' for #<XlsExportController:0xb593c140>):
  vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:116:in `export_to_string'
  vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:50:in `export_current'
  passenger (3.0.7) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
  passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
  passenger (3.0.7) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/utils.rb:479:in `safe_fork'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:180:in `start'
  passenger (3.0.7) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
  passenger (3.0.7) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
  passenger (3.0.7) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
  passenger (3.0.7) helper-scripts/passenger-spawn-server:99


Related issues

Related to Extended Fields - Bug #2359: Extended fields plugin breaks PDF export In Progress 29 Jan 2015
Related to Extended Fields - Bug #2261: issues PDF view and descriptions Incomplete 04 Nov 2013
Related to Extended Fields - Bug #2318: Issues as pdf In Progress 25 Jun 2014

Associated revisions

Revision 77 (diff)
Added by Andriy Lesyuk about 11 years ago

Added support for XLS Export plugin (#2098)

Revision 124 (diff)
Added by Andriy Lesyuk over 7 years ago

Explicitly include ExtendedFieldsHelper (#2318, #2359, #2098)

History

#1 Updated by Andriy Lesyuk over 11 years ago

  • Status changed from New to Incomplete

What version of Redmine is this?

#2 Updated by Tib Onu over 11 years ago

Redmine 1.4.1.stable.9617

#3 Updated by Andriy Lesyuk over 11 years ago

  • Status changed from Incomplete to Open
  • Target version set to 0.2.0b

#4 Updated by Andriy Lesyuk over 11 years ago

  • Status changed from Open to In Progress

Could you please try adding:

include ExtendedFieldsHelper

After:

include CustomFieldsHelper

in redmine_xls_export/app/controllers/xls_export_controller.rb? And tell me if it solves the issue?

#5 Updated by Andriy Lesyuk over 11 years ago

Any update?

#6 Updated by Andriy Lesyuk over 11 years ago

  • Target version deleted (0.2.0b)

#7 Updated by Andriy Lesyuk over 11 years ago

  • Status changed from In Progress to Incomplete

#8 Updated by Zoltan Varga about 11 years ago

Have the same problem here.
Redmine version 1.3.2
I included the ExtendedFieldsHelper in xls_export_controller.rb.

Processing XlsExportController#export_current (for 192.168.1.77 at 2012-12-18 11:17:20) [GET]
  Parameters: {"controller"=>"xls_export", "action"=>"export_current"}

NoMethodError (undefined method `find_custom_field_template' for #<XlsExportController:0x7f1177842ee0>):
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:2236:in `each_with_index'
  vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:116:in `export_to_string'
  vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:50:in `export_current'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `perform_action_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
 /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

Thank you for your help.

#9 Updated by Andrea Valle about 11 years ago

On redmine 2.2,
I added 'include ExtendedFieldsHelper’

and it solved!

My configuration:

Environment:
Redmine version 2.2.0.stable
Ruby version 1.8.7 (x86_64-linux)
Rails version 3.2.9
Environment production
Database adapter MySQL
Redmine plugins:
extended_fields 0.2.1
redmine_dnoise_workload 0.0.1
redmine_importer 1.0
redmine_plugin_views_revisions 0.0.1
redmine_xls_export 0.2.1

#10 Updated by Zoltan Varga about 11 years ago

After adding the “include ExtendedFieldsHelper” line the error looks like this:

Processing XlsExportController#index (for 192.168.11.171 at 2013-01-11 15:35:19) [POST]
  Parameters: {"commit"=>"Export", "settings"=>{"separate_journals"=>"1", "watchers"=>"1", "export_name"=>"issues_export", "group"=>"1", "time"=>"1", "query_columns_only"=>"1", "description"=>"1", "attachments"=>"1", "relations"=>"1", "journal"=>"1", "issues_limit"=>"200", "generate_name"=>"1"}, "controller"=>"xls_export", "action"=>"index", "authenticity_token"=>"ymmytL2YZg64jOihH2p7siG3dykMtyTV3vqs5/MKH34=", "issues_export_offset"=>"0"}

NameError (undefined local variable or method `controller' for #<XlsExportController:0x7f6e76231450>):
  /usr/lib/ruby/vendor_ruby/active_record/base.rb:2236:in `each_with_index'
  vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:117:in `export_to_string'
  vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:39:in `index'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:1333:in `perform_action_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:617:in `call_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:610:in `perform_action_without_benchmark'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
  /usr/lib/ruby/vendor_ruby/action_controller/rescue.rb:160:in `perform_action_without_flash'
  /usr/lib/ruby/vendor_ruby/action_controller/flash.rb:151:in `perform_action'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `send'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:532:in `process_without_filters'
  /usr/lib/ruby/vendor_ruby/action_controller/filters.rb:606:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:391:in `process'
  /usr/lib/ruby/vendor_ruby/action_controller/base.rb:386:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/routing/route_set.rb:438:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:87:in `dispatch'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:121:in `_call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:130:in `build_middleware_stack'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:29:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:9:in `cache'
  /usr/lib/ruby/vendor_ruby/active_record/query_cache.rb:28:in `call'
  /usr/lib/ruby/vendor_ruby/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/string_coercion.rb:25:in `call'
  /usr/lib/ruby/vendor_ruby/rack/head.rb:9:in `call'
  /usr/lib/ruby/vendor_ruby/rack/methodoverride.rb:24:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/params_parser.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/session/cookie_store.rb:99:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/failsafe.rb:26:in `call'
  /usr/lib/ruby/vendor_ruby/rack/lock.rb:15:in `call'
  /usr/lib/ruby/vendor_ruby/action_controller/dispatcher.rb:106:in `call'
  /usr/lib/ruby/1.8/phusion_passenger/rack/request_handler.rb:92:in `process_request'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:418:in `start_request_handler'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:358:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/utils.rb:184:in `safe_fork'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:354:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:163:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/railz/application_spawner.rb:213:in `start'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:262:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:256:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:255:in `spawn_rails_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:154:in `spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/spawn_manager.rb:287:in `handle_spawn_application'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `__send__'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:352:in `main_loop'
  /usr/lib/ruby/1.8/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
  /usr/lib/phusion_passenger/passenger-spawn-server:61

Rendering /usr/share/redmine/public/500.html (500 Internal Server Error)

#11 Updated by Andriy Lesyuk about 11 years ago

  • Target version set to 0.2.1

#12 Updated by Andriy Lesyuk about 11 years ago

  • Target version deleted (0.2.1)
  • % Done changed from 0 to 50

I failed to install the XLS Export plugin – gives errors not related to the Extended Fields.

Tib Onu, did adding the line solve the problem?

Zoltan Varga, please try removing Extended Fields and checking if you still get the error. Maybe it’s not related to Extended Fields...

#13 Updated by Jeffrey Clark about 11 years ago

The error coming from extended fields. Here’s the last part of the full application exception:

redmine/plugins/extended_fields/lib/extended_fields_helper_patch.rb:28:in `show_value'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:189:in `issues_to_xls2'

Indicates that the problem is 'controller' is not defined in the monkey patched show_value method. I'm not a rails guru by any means, but it looks like the double patch (custom_fields and then patching the patch) is causing problems?

#14 Updated by Andriy Lesyuk about 11 years ago

Indicates that the problem is 'controller’ is not defined in the monkey patched show_value method. I’m not a rails guru by any means, but it looks like the double patch (custom_fields and then patching the patch) is causing problems?

The show_value is patched only once, so does not look like. But the theory about controller looks reasonable, thanks!

#15 Updated by Andriy Lesyuk about 11 years ago

In fact, there is one more controller, which can be undefined... Could you please help making sure, which one?

For this:

  1. Try removing:
                elsif controller
                    # Redmine 1.x.x
                    if controller.respond_to?(:template)
                        format_extension = ".#{controller.template.template_format}" 
                    # Redmine 2.x.x
                    elsif controller.respond_to?(:lookup_context)
                        format_extension = ".#{controller.lookup_context.formats.first}" 
                    end
    
  2. Remove :controller => controller, from:
                        safe_buffer.new(render(:partial => template,
                                               :locals  => { :controller   => controller,
                                                             :project      => @project,
                                                             :request      => request,
                                                             :custom_field => custom_value }))
    

Try after each change!

#16 Updated by Jeffrey Clark about 11 years ago

After commenting out as requested:

ActionController::DoubleRenderError in Xls exportController#export_current

Can only render or redirect once per action

actionpack-2.3.14/lib/action_controller/base.rb:891:in `render_without_benchmark'
actionpack-2.3.14/lib/action_controller/benchmarking.rb:51:in `render'
activesupport-2.3.14/lib/active_support/core_ext/benchmark.rb:17:in `ms'
benchmark.rb:308:in `realtime'
activesupport-2.3.14/lib/active_support/core_ext/benchmark.rb:17:in `ms'
actionpack-2.3.14/lib/action_controller/benchmarking.rb:51:in `render'
redmine/vendor/plugins/extended_fields/lib/extended_custom_fields_helper_patch.rb:33:in `show_value'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:188:in `issues_to_xls2'
activerecord-2.3.14/lib/active_record/attribute_methods.rb:211:in `each_with_index'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:166:in `each'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:166:in `each_with_index'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:166:in `issues_to_xls2'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:141:in `each'
redmine/vendor/plugins/redmine_xls_export/lib/xls_export.rb:141:in `issues_to_xls2'
redmine/vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:116:in `export_to_string'
redmine/vendor/plugins/redmine_xls_export/app/controllers/xls_export_controller.rb:50:in `export_current'

... and more framework stuff.

#17 Updated by Jeffrey Clark about 11 years ago

After commenting out the safe_buffer render, and just letting it return the core, no double render error.

Basically, because redmine_xls_export is not executing the helper method (show_value) inside a view, the patched show_value method is using the controller render method instead of the view render method which can only be called once.

#18 Updated by Andriy Lesyuk almost 11 years ago

  • Target version set to 0.2.2

#19 Updated by Andriy Lesyuk over 10 years ago

Do you still experience the issue with controller? Anyone?

#20 Updated by Andriy Lesyuk over 10 years ago

  • Target version deleted (0.2.2)

#21 Updated by Riccardo Rocca about 10 years ago

Using Redmine 2.4.1

I had to remove extended_fields to succeed in exporting to xls (redmine_xls_export, as modified by two-pack).

error:

#22 Updated by Massimo Rossello almost 10 years ago

The following patch works for me

diff --git a/plugins/extended_fields/lib/extended_fields_helper_patch.rb b/plugins/extended_fields/lib/extended_fields_helper_patch.rb
index 369d852..9841684 100644
--- a/plugins/extended_fields/lib/extended_fields_helper_patch.rb
+++ b/plugins/extended_fields/lib/extended_fields_helper_patch.rb
@@ -2,6 +2,8 @@ require_dependency 'custom_fields_helper'

 module ExtendedFieldsHelperPatch

+    include ExtendedFieldsHelper
+
     def self.included(base)
         base.send(:include, InstanceMethods)
         base.class_eval do

Environment:
Redmine version 2.4.2.stable
Ruby version 1.9.3-p392 (2013-02-22) [x86_64-linux]
Rails version 3.2.16
Environment production
Database adapter Mysql2
SCM:
Subversion 1.7.9
Mercurial 2.6.3
Git 1.8.5.3
Filesystem
Redmine plugins:
....
....
extended_fields 0.2.2
....
redmine_xls_export 0.2.1.t5

#23 Updated by Andriy Lesyuk almost 10 years ago

Thanks, Massimo Rossello!

Riccardo Rocca, Jeffrey Clark, Zoltan Varga, Tib Onu, could you please test Massimo’s solution?..

#24 Updated by Olivier Houdas over 9 years ago

Thank you Massimo for the very useful tip!

I experienced the following 500 error when exporting a list of issues to PDF format:

NoMethodError (undefined method `find_custom_field_template' for #<IssuesController:0x000000088beec8>):
  lib/redmine/export/pdf.rb:302:in `block in calc_col_width'
  app/helpers/issues_helper.rb:29:in `block in issue_list'
  app/helpers/issues_helper.rb:25:in `each'
  app/helpers/issues_helper.rb:25:in `issue_list'
  lib/redmine/export/pdf.rb:300:in `calc_col_width'
  lib/redmine/export/pdf.rb:428:in `issues_to_pdf'
  app/controllers/issues_controller.rb:97:in `block (2 levels) in index'
  app/controllers/issues_controller.rb:90:in `index'

I fixed it by including the same line as yours into /lib/extended_issues_controller_patch.rb

require_dependency 'issues_controller'
module ExtendedIssuesControllerPatch
include ExtendedFieldsHelper
def self.included(base)

and it solved the issue.

#25 Updated by Andriy Lesyuk over 7 years ago

  • Related to Bug #2359: Extended fields plugin breaks PDF export added

#26 Updated by Andriy Lesyuk over 7 years ago

  • Related to Bug #2261: issues PDF view and descriptions added

#27 Updated by Andriy Lesyuk over 7 years ago

#28 Updated by Andriy Lesyuk over 7 years ago

  • Description updated (diff)

#29 Updated by Andriy Lesyuk over 7 years ago

  • Status changed from Incomplete to In Progress
  • Target version set to 0.2.4
  • % Done changed from 50 to 90

I applied the fix in slightly different way, see r124. Kindly check, if it works.

Also available in: Atom PDF

Terms of use | Privacy policy