Support #1991
How to install this plugin, error 500.
0%
Description
Hi,
First you all congratulations for your help, very good job.
Following your steps, does not work (error 500) when I press the button “contact” menu user.
Steps:
Copy contact_form directory to #{RAILS_ROOT}/vendor/plugins
Run: rake db:migrate:plugins RAILS_ENV=production
Restart Redmine (note with my: restart apache no?)
can you tell me if you missing something? should not use this comandp?
script / plugin install ... web.git ...
thanks and great job!
History
#1 Updated by Ivan Moya Juarez over 12 years ago
- File plugin_contactform_error.png View added
I do not go well the menu as you:
http://projects.andriylesyuk.com/attachments/download/177
I get the following: (see attached image).
thanks Andriy
#2 Updated by Andriy Lesyuk over 12 years ago
- Status changed from New to Open
Hi! Thanks for your feedback!
If you mean “translation missing...” – that’s because currently there is no Spanish translation of the plugin (well... it is! but missing many labels)... See source:config/locales/es.yml
Not sure about the reason of 500 message... Definitely you need to enable “translation_missing: es, label_enable_contact_us”! Tell me if this helps.
#3 Updated by Ivan Moya Juarez over 12 years ago
- File es_spanish.yml View added
Now go well the menu “contact form” but when I give to “save” I get the error 500.
And when I go to the menu of a user, and give the button “contact” also I get the error 500.
you know it can be?
thank you very much.
PS: I attached the translation into Spanish
#4 Updated by Andriy Lesyuk over 12 years ago
Thanks for translation!
On 500 error Rails write debug messages to logs... Can you paste them here?
#5 Updated by Ivan Moya Juarez over 12 years ago
thanks
my log production.log
Processing ContactFormController#index (for 213.176.161.214 at 2012-02-28 19:14:20) [GET]
Parameters: {“action"⇒“index”, “id"⇒“5”, “controller"⇒“contact_form”}
Rendering template within layouts/base
Rendering contact_form/index
ActionView::TemplateError (undefined method `count’ for #<Array:0xb5a2b7a4>) on line #27 of vendor/plugins/contact_form/app/views/contact_form/index.rhtml:
24: <% @email.custom_field_values.each do |value| >
25: <p><%= custom_field_tag_with_label(:contact_form, value) %></p>
26: < end >
27: < if @projects.count > 0 >
28: <p><%= f.select(:project_id, @projects.collect { |p| [ p.name, p.id ] }, :include_blank ⇒ true) %></p>
29: < end %>
30: <p><%= f.text_area(:message, :cols ⇒ 80, :rows ⇒ 15,
vendor/plugins/contact_form/app/views/contact_form/index.rhtml:27:in `_run_rhtml_vendor47plugins47contact_form47app47views47contact_form47index46rhtml'
vendor/plugins/contact_form/app/views/contact_form/index.rhtml:14:in `_run_rhtml_vendor47plugins47contact_form47app47views47contact_form47index46rhtml'
passenger (2.2.15) lib/phusion_passenger/rack/request_handler.rb:92:in `process_request'
passenger (2.2.15) lib/phusion_passenger/abstract_request_handler.rb:207:in `main_loop'
passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:441:in `start_request_handler'
passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:381:in `handle_spawn_application'
passenger (2.2.15) lib/phusion_passenger/utils.rb:252:in `safe_fork'
passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:377:in `handle_spawn_application'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:163:in `start'
passenger (2.2.15) lib/phusion_passenger/railz/application_spawner.rb:222:in `start'
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:253:in `spawn_rails_application'
passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:126:in `lookup_or_add'
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:247:in `spawn_rails_application'
passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:80:in `synchronize'
passenger (2.2.15) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:246:in `spawn_rails_application'
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:145:in `spawn_application'
passenger (2.2.15) lib/phusion_passenger/spawn_manager.rb:278:in `handle_spawn_application'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `__send__'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:352:in `main_loop'
passenger (2.2.15) lib/phusion_passenger/abstract_server.rb:196:in `start_synchronously'
#6 Updated by Andriy Lesyuk over 12 years ago
Hm... Try replacing @projects.count
in contact_form/app/views/contact_form/index.rhtml
by @projects.size
.
#7 Updated by Ivan Moya Juarez over 12 years ago
Change modificated and working! now sends emails, m. thanks!
but when I change the parameters in Administration / Settings / Contact Form and give it to save, it gives the error 500. I think it’s a problem with line 50 (if errors.count == 0), the document contact_form_controller.rb
log:
Processing ContactFormController # settings (for 80.37.109.109 at 2/29/2012 13:01: 07) [POST]
Parameters: {“commit” ⇒ “Save”, “action” ⇒ “settings”, “authenticity_token” ⇒ “VWVors TAJN8R3VO5yfSLRp2ole2hOjQfhjC0Fv5Qo1 + =“, “controller” ⇒ “contact_form”, “s ettings” ⇒ {” contact_us_title “⇒” label_contact_me “,” contact_us_custom_title “⇒” C ontact us “,” emails_footer “⇒” Mail sent by a form http://zonapriva da.philideas.org. “,” users_contact_form “⇒” 1 “,” contact_us_recipient “⇒” 13 “,” hi de_email_default “⇒” 1 “,” contact_us_custom_email “⇒” “,” contact_us_enabled “⇒” 1 “,” emails_header “⇒” “},” tab “⇒” contact_form ”}
NoMethodError (undefined method `count 'for []: Array):
vendor / plugins / contact_form / app / controllers / contact_form_controller.rb: 50: in `settings’
passenger (2.2.15) lib / phusion_passenger / rack / request_handler.rb: 92: in `proces s_request '
passenger (2.2.15) lib / phusion_passenger / abstract_request_handler.rb: 207: in `m ain_loop '
passenger (2.2.15) lib / phusion_passenger / Railz / application_spawner.rb: 441: in `start_request_handler '
passenger (2.2.15) lib / phusion_passenger / Railz / application_spawner.rb: 381: in `handle_spawn_application '
passenger (2.2.15) lib / phusion_passenger / utils.rb: 252: in `safe_fork '
passenger (2.2.15) lib / phusion_passenger / Railz / application_spawner.rb: 377: in `handle_spawn_application '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 352: in `__send__ '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 352: in `main_loop '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 196: in `start_sync hronously '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 163: in `start '
passenger (2.2.15) lib / phusion_passenger / Railz / application_spawner.rb: 222: in `start '
passenger (2.2.15) lib / phusion_passenger / spawn_manager.rb: 253: in `spawn_rails_ application '
passenger (2.2.15) lib / phusion_passenger / abstract_server_collection.rb: 126: in `lookup_or_add '
passenger (2.2.15) lib / phusion_passenger / spawn_manager.rb: 247: in `spawn_rails_ application '
passenger (2.2.15) lib / phusion_passenger / abstract_server_collection.rb: 80: in `synchronize '
passenger (2.2.15) lib / phusion_passenger / abstract_server_collection.rb: 79: in `synchronize '
passenger (2.2.15) lib / phusion_passenger / spawn_manager.rb: 246: in `spawn_rails_ application '
passenger (2.2.15) lib / phusion_passenger / spawn_manager.rb: 145: in `spawn_applic ation '
passenger (2.2.15) lib / phusion_passenger / spawn_manager.rb: 278: in `handle_spawn Application '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 352: in `_send__ '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 352: in `main_loop '
passenger (2.2.15) lib / phusion_passenger / abstract_server.rb: 196: in `start_sync hronously '
Rendering / var/www/vhosts/philideas.org/subdomains/zonaprivada/httpdocs/public/5 00.html (500 Internal Server Error)
#8 Updated by Andriy Lesyuk over 12 years ago
Yeah!.. Also change to .size
!..
#9 Updated by Ivan Moya Juarez over 12 years ago
Change applied.
now it all works, thank you very much!
Thanks for helping me resolve this error! and for your time!
greeting! and thank you very much andriy!
you can close ticket
#10 Updated by Andriy Lesyuk over 12 years ago
- Status changed from Open to Closed