There was an error retrieving from server: error
Had been using tracks.tra.in for awhile, decided to install my own instance last night on my Ubuntu 12.04 server using passenger + Apache2. I followed the instructions on Github and seem to have a rather well working instance except I have noticed a couple of things as I was setting up data in my new install.
First, after I had entered some projects I decided I wanted to set one as hidden. I navigated to the Project page that displays all the projects, I clicked the edit button beside the project and selected the hidden button and clicked update. The message "There was an error retrieving from server: error" flashed in the top right corner. The interesting thing is when I refreshed the page using the refresh button in the browser, the project had been moved into the hidden section instead of active.
However, If I actually navigate to the individual project's page and select the link for editing that project's settings and choose hidden then the project updates and I get the green "Project saved" message flashes in the top right corner.
Another interesting thing about this is that back on the Projects page that lists all the projects, I can edit one of the hidden projects and make them active and I do not get an error. It leads me to believe it has something to do specifically with the code that is calling to create the hidden attribute on the project and only when it is called from the all projects page.
I was able to use Firebug and firebug does show what is going on, but I am not at the level to really understand or identify the problem. If someone would like to try to replicate the behavior and view the Firebug report I have my Tracks install set as open to public so you can create an account and test what I am reporting... The site is: http://twepeater.sytes.net/signup
Secondly, I noticed on the tracks.tra.in install I was previously using when I was on the all projects page there were little "Drag" buttons beside each project so they could be reordered. I didn't see those on my install, should they have been there or was this something specific that the webmaster for that coded into the package himself. I also noticed other things such as In the menus the statistics, reoccuring events, etc. showed up in drop down menus instead of as small icons, is this also normal for the current version. I pulled the code down from github last night using the git clone https://github.com/TracksApp/tracks.git command given in the instructions.
Finally thanks for any help and assitance in helping me resolve these concerns. If you need additional information please let me know.
First, after I had entered some projects I decided I wanted to set one as hidden. I navigated to the Project page that displays all the projects, I clicked the edit button beside the project and selected the hidden button and clicked update. The message "There was an error retrieving from server: error" flashed in the top right corner. The interesting thing is when I refreshed the page using the refresh button in the browser, the project had been moved into the hidden section instead of active.
However, If I actually navigate to the individual project's page and select the link for editing that project's settings and choose hidden then the project updates and I get the green "Project saved" message flashes in the top right corner.
Another interesting thing about this is that back on the Projects page that lists all the projects, I can edit one of the hidden projects and make them active and I do not get an error. It leads me to believe it has something to do specifically with the code that is calling to create the hidden attribute on the project and only when it is called from the all projects page.
I was able to use Firebug and firebug does show what is going on, but I am not at the level to really understand or identify the problem. If someone would like to try to replicate the behavior and view the Firebug report I have my Tracks install set as open to public so you can create an account and test what I am reporting... The site is: http://twepeater.sytes.net/signup
Secondly, I noticed on the tracks.tra.in install I was previously using when I was on the all projects page there were little "Drag" buttons beside each project so they could be reordered. I didn't see those on my install, should they have been there or was this something specific that the webmaster for that coded into the package himself. I also noticed other things such as In the menus the statistics, reoccuring events, etc. showed up in drop down menus instead of as small icons, is this also normal for the current version. I pulled the code down from github last night using the git clone https://github.com/TracksApp/tracks.git command given in the instructions.
Finally thanks for any help and assitance in helping me resolve these concerns. If you need additional information please let me know.
Leave a comment
on 2013-02-17 22:19 *
By wolfravenous
When I upgraded to the 2.1.4 code base this error still persists.
Hi
I just tried on your site. The footer states that you are running 2.1.3
I tried to reproduce your error, but I couldn't. I have created a test project, went to the Projects page, edited the project to hidden and got the green OK message. Could you copy-and-past the errors from your firebug console? Maybe there are errors in your production.log in /path/to/tracks/log directory?
The DRAG handle was replaced by the dotted vertical line. Less visible, but it is still there :-) Tracks.tra.in was bases on an older Tracks version, so yes you will see various changes. Try to look up the release notes of 2.0 and 2.1 to see what's new.
I just tried on your site. The footer states that you are running 2.1.3
I tried to reproduce your error, but I couldn't. I have created a test project, went to the Projects page, edited the project to hidden and got the green OK message. Could you copy-and-past the errors from your firebug console? Maybe there are errors in your production.log in /path/to/tracks/log directory?
The DRAG handle was replaced by the dotted vertical line. Less visible, but it is still there :-) Tracks.tra.in was bases on an older Tracks version, so yes you will see various changes. Try to look up the release notes of 2.0 and 2.1 to see what's new.
on 2013-02-18 06:42 *
By wolfravenous
Thanks for your reply and for quickly clearing up my concerns for the structure changes... I had not even seen the two little dots of lines used to replace the drag bar, heehe, even if I had I would have probably just thought of them as visual effects until I read the changlogs :)
I find it really strange that the footer is still showing 2.1.3 on my install because just last night I updated to 2.1.4 via the instructions on the getontracks webpage. The zip file I used was TracksApp-tracks-v2.1.4-0-g1a8be7d. Is the footer message stored in the database? I did not preform a rake migrate db on the new code I installed for two reasons, one the webpage instructions said I didn't need to since there were no db changes between 2.1.3 and 2.1.4 and secondly I already had a couple of other users with accounts I didn't want to destroy by dropping the old db content to do a new rake. I had opened another ticket yesterday for an issue with montly recurring todos, but I closed it after updating last night fixed that issue so I am almost certain I am using the 2.1.4 code base instead of the 2.1.3.
Now as for my error, I am really shocked that you were not able to reproduce the error on my system, but I will past the firebug output and my log output below for you to review. Not sure about the fire bug output, but the log output looks as if the first passage is when I select the edit option, the edit console is rendered and then when I choose to select the "hidden" option and update in the second passage it gives something about a Template Error, an undefined method and a NilClass. I am hoping you will understand this and that it will be helpful to you. Thanks for your assistance in resolving my issues..
method put
source_view project_list
_source_view project_list
authenticity_token jabOMDi3UBcvSGxEWQ6cHQA+OyTOP6CTFOA8DNjeJ9w=
authenticity_token jabOMDi3UBcvSGxEWQ6cHQA+OyTOP6CTFOA8DNjeJ9w=
project[default_context_n... At Home
project[default_tags]
project[description] Complete the installation of the thresholds in the house.
project[name] Thresholds
project[state] hidden
wants_render true
Source
_method=put&authenticity_token=jabOMDi3UBcvSGxEWQ6cHQA%2BOyTOP6CTFOA8DNjeJ9w%3D&_source_view=project_list&project%5Bname%5D=Thresholds&project%5Bdescription%5D=Complete+the+installation+of+the+thresholds+in+the+house.&project%5Bstate%5D=hidden&project%5Bdefault_context_name%5D=At+Home&project%5Bdefault_tags%5D=&wants_render=true&0=_&1=s&2=o&3=u&4=r&5=c&6=e&7=_&8=v&9=i&10=e&11=w&12=%3D&13=p&14=r&15=o&16=j&17=e&18=c&19=t&20=_&21=l&22=i&23=s&24=t&authenticity_token=jabOMDi3UBcvSGxEWQ6cHQA%2BOyTOP6CTFOA8DNjeJ9w%3D&_source_view=project_list
"NetworkError: 500 Internal Server Error - http://twepeater.sytes.net/projects/41"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<h1>We're sorry, but something went wrong.</h1>
<p>The Tracks application failed with error 500. More details can be found in the log file of Tracks</p>
</div>
</body>
</html>
Processing ProjectsController#edit (for 50.55.237.53 at 2013-02-18 09:10:51) [GET]
Parameters: {"_source_view"=>"project_list", "id"=>"41", "_"=>"1361196651830"}
Rendering projects/edit
Completed in 18ms (View: 12, DB: 2) | 200 OK [http://twepeater.sytes.net/projects/41/edit?_source_view=project_list&_=1361196651830]
Processing ProjectsController#update (for 50.55.237.53 at 2013-02-18 09:11:09) [PUT]
Parameters: {"_source_view"=>"project_list", "wants_render"=>"true", "10"=>"e", "11"=>"w", "12"=>"=", "13"=>"p", "14"=>"r", "15"=>"o", "16"=>"j", "1
7"=>"e", "18"=>"c", "19"=>"t", "id"=>"41", "authenticity_token"=>"jabOMDi3UBcvSGxEWQ6cHQA+OyTOP6CTFOA8DNjeJ9w=", "20"=>"_", "21"=>"l", "22"=>"i", "23"
=>"s", "24"=>"t", "0"=>"_", "1"=>"s", "2"=>"o", "3"=>"u", "4"=>"r", "5"=>"c", "6"=>"e", "7"=>"_", "8"=>"v", "9"=>"i", "project"=>{"state"=>"hidden", "
description"=>"Complete the installation of the thresholds in the house.", "name"=>"Thresholds", "default_tags"=>"", "default_context_name"=>"At Home"
}}
Rendering projects/update.js.erb
ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #15 of app/views/projects/_project_listing.rhtml:
12: <div class="project_description">
13: <span class="<%= needsreview_class( project ) %>">
14: <%= link_to_project( project ) %>
15: <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %>
16: </span>
17: </div>
18: </div>
app/controllers/application_controller.rb:109:in `count_undone_todos'
app/controllers/application_controller.rb:93:in `eval'
app/controllers/application_controller.rb:109:in `count_undone_todos'
app/controllers/application_controller.rb:93:in `count_undone_todos_phrase'
app/helpers/application_helper.rb:102:in `count_undone_todos_phrase'
app/helpers/application_helper.rb:110:in `count_undone_todos_and_notes_phrase'
app/views/projects/_project_listing.rhtml:15:in `_run_rhtml_app47views47projects47_project_listing46rhtml_locals_object_project_listing_suppress_drag_handle'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:306:in `with_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:30:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable_partial.rb:20:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:30:in `benchmark'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable_partial.rb:19:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/template.rb:205:in `render_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable_partial.rb:44:in `render_partial'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/partials.rb:184:in `render_partial'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:267:in `render'
app/views/projects/update.js.erb:86
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:306:in `with_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:30:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/template.rb:205:in `render_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:265:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:1252:in `render_for_file'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:936:in `render_without_benchmark'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:51:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/projects_controller.rb:224:in `update'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:135:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:135:in `custom'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:179:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:179:in `respond'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:173:in `each'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:173:in `respond'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:107:in `respond_to'
app/controllers/projects_controller.rb:223:in `update'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:1333:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:1333:in `perform_action_without_filters'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/filters.rb:617:in `call_filters'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/flash.rb:151:in `perform_action'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:532:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:532:in `process_without_filters'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/filters.rb:606:in `process'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:391:in `process'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:386:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/routing/route_set.rb:438:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:87:in `dispatch'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:121:in `_call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/string_coercion.rb:25:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/string_coercion.rb:25:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/params_parser.rb:15:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/session/abstract_store.rb:177:in `call'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/query_cache.rb:29:in `call'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/query_cache.rb:9:in `cache'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/query_cache.rb:28:in `call'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/failsafe.rb:26:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:106:in `call'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb:470:in `safe_fork'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `__send_'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:180:in `start'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `__send_'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/var/lib/gems/1.8/gems/passenger-3.0.19/helper-scripts/passenger-spawn-server:99
Rendering /var/www/tracks/public/500.html (500 Internal Server Error)
I find it really strange that the footer is still showing 2.1.3 on my install because just last night I updated to 2.1.4 via the instructions on the getontracks webpage. The zip file I used was TracksApp-tracks-v2.1.4-0-g1a8be7d. Is the footer message stored in the database? I did not preform a rake migrate db on the new code I installed for two reasons, one the webpage instructions said I didn't need to since there were no db changes between 2.1.3 and 2.1.4 and secondly I already had a couple of other users with accounts I didn't want to destroy by dropping the old db content to do a new rake. I had opened another ticket yesterday for an issue with montly recurring todos, but I closed it after updating last night fixed that issue so I am almost certain I am using the 2.1.4 code base instead of the 2.1.3.
Now as for my error, I am really shocked that you were not able to reproduce the error on my system, but I will past the firebug output and my log output below for you to review. Not sure about the fire bug output, but the log output looks as if the first passage is when I select the edit option, the edit console is rendered and then when I choose to select the "hidden" option and update in the second passage it gives something about a Template Error, an undefined method and a NilClass. I am hoping you will understand this and that it will be helpful to you. Thanks for your assistance in resolving my issues..
FIREBUG POST DATA:
method put
source_view project_list
_source_view project_list
authenticity_token jabOMDi3UBcvSGxEWQ6cHQA+OyTOP6CTFOA8DNjeJ9w=
authenticity_token jabOMDi3UBcvSGxEWQ6cHQA+OyTOP6CTFOA8DNjeJ9w=
project[default_context_n... At Home
project[default_tags]
project[description] Complete the installation of the thresholds in the house.
project[name] Thresholds
project[state] hidden
wants_render true
Source
_method=put&authenticity_token=jabOMDi3UBcvSGxEWQ6cHQA%2BOyTOP6CTFOA8DNjeJ9w%3D&_source_view=project_list&project%5Bname%5D=Thresholds&project%5Bdescription%5D=Complete+the+installation+of+the+thresholds+in+the+house.&project%5Bstate%5D=hidden&project%5Bdefault_context_name%5D=At+Home&project%5Bdefault_tags%5D=&wants_render=true&0=_&1=s&2=o&3=u&4=r&5=c&6=e&7=_&8=v&9=i&10=e&11=w&12=%3D&13=p&14=r&15=o&16=j&17=e&18=c&19=t&20=_&21=l&22=i&23=s&24=t&authenticity_token=jabOMDi3UBcvSGxEWQ6cHQA%2BOyTOP6CTFOA8DNjeJ9w%3D&_source_view=project_list
"NetworkError: 500 Internal Server Error - http://twepeater.sytes.net/projects/41"
FIREBUG RESPONSE DATA:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>We're sorry, but something went wrong (500)</title>
<style type="text/css">
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
div.dialog {
width: 25em;
padding: 0 4em;
margin: 4em auto 0 auto;
border: 1px solid #ccc;
border-right-color: #999;
border-bottom-color: #999;
}
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
</style>
</head>
<body>
<!-- This file lives in public/500.html -->
<div class="dialog">
<h1>We're sorry, but something went wrong.</h1>
<p>The Tracks application failed with error 500. More details can be found in the log file of Tracks</p>
</div>
</body>
</html>
TRACKS LOG FILE ERROR OUTPUT:
Processing ProjectsController#edit (for 50.55.237.53 at 2013-02-18 09:10:51) [GET]
Parameters: {"_source_view"=>"project_list", "id"=>"41", "_"=>"1361196651830"}
Rendering projects/edit
Completed in 18ms (View: 12, DB: 2) | 200 OK [http://twepeater.sytes.net/projects/41/edit?_source_view=project_list&_=1361196651830]
Processing ProjectsController#update (for 50.55.237.53 at 2013-02-18 09:11:09) [PUT]
Parameters: {"_source_view"=>"project_list", "wants_render"=>"true", "10"=>"e", "11"=>"w", "12"=>"=", "13"=>"p", "14"=>"r", "15"=>"o", "16"=>"j", "1
7"=>"e", "18"=>"c", "19"=>"t", "id"=>"41", "authenticity_token"=>"jabOMDi3UBcvSGxEWQ6cHQA+OyTOP6CTFOA8DNjeJ9w=", "20"=>"_", "21"=>"l", "22"=>"i", "23"
=>"s", "24"=>"t", "0"=>"_", "1"=>"s", "2"=>"o", "3"=>"u", "4"=>"r", "5"=>"c", "6"=>"e", "7"=>"_", "8"=>"v", "9"=>"i", "project"=>{"state"=>"hidden", "
description"=>"Complete the installation of the thresholds in the house.", "name"=>"Thresholds", "default_tags"=>"", "default_context_name"=>"At Home"
}}
Rendering projects/update.js.erb
ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #15 of app/views/projects/_project_listing.rhtml:
12: <div class="project_description">
13: <span class="<%= needsreview_class( project ) %>">
14: <%= link_to_project( project ) %>
15: <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %>
16: </span>
17: </div>
18: </div>
app/controllers/application_controller.rb:109:in `count_undone_todos'
app/controllers/application_controller.rb:93:in `eval'
app/controllers/application_controller.rb:109:in `count_undone_todos'
app/controllers/application_controller.rb:93:in `count_undone_todos_phrase'
app/helpers/application_helper.rb:102:in `count_undone_todos_phrase'
app/helpers/application_helper.rb:110:in `count_undone_todos_and_notes_phrase'
app/views/projects/_project_listing.rhtml:15:in `_run_rhtml_app47views47projects47_project_listing46rhtml_locals_object_project_listing_suppress_drag_handle'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:306:in `with_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:30:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable_partial.rb:20:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:30:in `benchmark'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable_partial.rb:19:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/template.rb:205:in `render_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable_partial.rb:44:in `render_partial'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/partials.rb:184:in `render_partial'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:267:in `render'
app/views/projects/update.js.erb:86
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:34:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:306:in `with_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/renderable.rb:30:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/template.rb:205:in `render_template'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_view/base.rb:265:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:1252:in `render_for_file'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:936:in `render_without_benchmark'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:51:in `render'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:51:in `render'
app/controllers/projects_controller.rb:224:in `update'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:135:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:135:in `custom'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:179:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:179:in `respond'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:173:in `each'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:173:in `respond'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/mime_responds.rb:107:in `respond_to'
app/controllers/projects_controller.rb:223:in `update'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:1333:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:1333:in `perform_action_without_filters'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/filters.rb:617:in `call_filters'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/filters.rb:610:in `perform_action_without_benchmark'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/benchmarking.rb:68:in `perform_action_without_rescue'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/rescue.rb:160:in `perform_action_without_flash'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/flash.rb:151:in `perform_action'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:532:in `send'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:532:in `process_without_filters'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/filters.rb:606:in `process'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:391:in `process'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/base.rb:386:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/routing/route_set.rb:438:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:87:in `dispatch'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:121:in `_call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:130:in `build_middleware_stack'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/string_coercion.rb:25:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/string_coercion.rb:25:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/params_parser.rb:15:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/session/abstract_store.rb:177:in `call'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/query_cache.rb:29:in `call'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/connection_adapters/abstract/query_cache.rb:34:in `cache'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/query_cache.rb:9:in `cache'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/query_cache.rb:28:in `call'
vendor/cache/ruby/1.8/gems/activerecord-2.3.17/lib/active_record/connection_adapters/abstract/connection_pool.rb:361:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/failsafe.rb:26:in `call'
vendor/cache/ruby/1.8/gems/actionpack-2.3.17/lib/action_controller/dispatcher.rb:106:in `call'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:516:in `accept_and_process_next_request'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/utils.rb:470:in `safe_fork'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `__send_'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:180:in `start'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `__send_'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
/var/lib/gems/1.8/gems/passenger-3.0.19/lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
/var/lib/gems/1.8/gems/passenger-3.0.19/helper-scripts/passenger-spawn-server:99
Rendering /var/www/tracks/public/500.html (500 Internal Server Error)
on 2013-02-18 07:45 *
By wolfravenous
I am pulling out one specific section from the log file output above to focus on and will paste and highlight part of it below. The first line I highlighted indicates a TemplateError and something about NilClass, I am assuming that Nil in this instance means empty and the reference is line 15, Then below in the other highlighted line 15 it indicates something to do with counting the todos and notes. When I encounter this error the project had no todos in it, it had no notes associated with it. I am going to see if I get the error when I create a project with a todo and attempt to hide the project from the Projects page. If I don't then I think we can pinpoint it to being something that has to do with the fact the project is an empty project with no todos yet. This situation would probably not be a common one, for a beginning user of Tracks, but since I am moving data manually from an XML export into this version, my workflow was to create all the contexts first, secondly create all the projects, then I will create the todos and assign them to the correct project and context.
ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #15 of app/views/projects/_project_listing.rhtml:
12: <div class="project_description">
13: <span class="<%= needsreview_class( project ) %>">
14: <%= link_to_project( project ) %>
15: <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %>
16: </span>
17: </div>
18: </div>
ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #15 of app/views/projects/_project_listing.rhtml:
12: <div class="project_description">
13: <span class="<%= needsreview_class( project ) %>">
14: <%= link_to_project( project ) %>
15: <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %>
16: </span>
17: </div>
18: </div>
on 2013-02-18 08:09 *
By wolfravenous
Ok, I created a project with a todo in it, then tried to hide that project using the edit console for that project on the Projects page, I still got the same type error, I will paste the log output below. However, what I really find baffling is this. When I click the update button the edit console remains and I get the error message flash red in the corner. If I hit the update button again, I get the same error message flashing in the corner, no matter how many times I hit the update button the error doesn't change, However, when I refresh the page the project is now listed in the Hidden Projects section instead of active, so the post call from hitting the update button to actually hide the project preformed it's function, so maybe the error has something to do with the edit console going away or the page creating the new project entry in the Hidden Projects section of the Projects page???
ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #15 of app/views/projects/_project_listing.rhtml:
12: <div class="project_description">
13: <span class="<%= needsreview_class( project ) %>">
14: <%= link_to_project( project ) %>
15: <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %>
16: </span>
17: </div>
18: </div>
TRACKS PRODUCTION.LOG TEXT:
ActionView::TemplateError (undefined method `[]' for nil:NilClass) on line #15 of app/views/projects/_project_listing.rhtml:
12: <div class="project_description">
13: <span class="<%= needsreview_class( project ) %>">
14: <%= link_to_project( project ) %>
15: <%= " (" + count_undone_todos_and_notes_phrase(project) + ")" %>
16: </span>
17: </div>
18: </div>
on 2013-02-18 08:16 *
By wolfravenous
Just another quick FYI of something I tried to test. I noticed under Admin>Manage Users that irbalt had created a test project but no contexts or todos, so I tried making a test project under my account and not assigning a default context, just to see if having a default context was part of the problem, but still got the same error.
on 2013-02-18 09:27 *
By wolfravenous
Update, I thought since the line 15 in the file app/views/projects/_project_listing.rhtml seemed to be the offending line of code I would try without it. I created a backup copy of the file, then removed line 15 altogether from the file. This line is the code that creates the number of undone todos beside the project's name in parenthesis on the Projects page. Then I restarted Apache and then tried to hide a project on the Projects page and I did NOT get the error this time. However, I also don't see the number of remaining todos, So this is the offending line of code, but I am not sure if it is the code or if it is an issue with my database and the way that information in it relates to the code.
I have tried it with this line of code before with a project that had todos, so it would not be a problem that the todo value is zero, however it might be how that "zero" amount is represented in the database as either "none", "NULL" or "0"... since this line also refers to the notes it might be that the way note data is being stored in the database is causing me an issue. Will look at some of my database entries.. I will restore the backed up file to the error producing state and then test some database modifications.
I have tried it with this line of code before with a project that had todos, so it would not be a problem that the todo value is zero, however it might be how that "zero" amount is represented in the database as either "none", "NULL" or "0"... since this line also refers to the notes it might be that the way note data is being stored in the database is causing me an issue. Will look at some of my database entries.. I will restore the backed up file to the error producing state and then test some database modifications.
on 2013-02-18 13:44 *
By wolfravenous
Still trying to track down where this error is coming from. I have tried entering different attributes to the project:
added a test note --> still got the error
added a test todo --> still got the error
added a test todo with a note --> still got the error.
Then I tried creating another user for myself. With the other user I do not get the error, only with my site Admin account. Just as irbalt indicated above. This error seems to only show up for my admin user account. I will look around in the MySQL backend and look for variances in my admin account vs. this new account.
added a test note --> still got the error
added a test todo --> still got the error
added a test todo with a note --> still got the error.
Then I tried creating another user for myself. With the other user I do not get the error, only with my site Admin account. Just as irbalt indicated above. This error seems to only show up for my admin user account. I will look around in the MySQL backend and look for variances in my admin account vs. this new account.
on 2013-02-18 14:11 *
By wolfravenous
I discovered the nil value that is creating the error.
Under Admin>Prefrences under the Tracks Behavior tab
I had set the option
Show hidden projects in sidebar:
false
When I set this to true I do not get the error, when I set it back to false I get the error again.
I had changed this setting because I really had no desire to view the hidden projects on side in my home screen view, however, I would rather have the hidden projects showing up than the error every time I defer a project by editing it to "hidden"
@lrbalt if you are interested in trying to replicate the error on my system now all you have to do is flip that "Show hidden projects in sidebar:" option to false and you should see the error. Feel free to use my system to Firebug this error, I have already posted all relevant Tracks production log text above. Thanks for your help, I am just glad I was able to track down the source of the nil value that was prompting the error, I will leave it to the experts to adjust the code accordingly :)
Under Admin>Prefrences under the Tracks Behavior tab
I had set the option
Show hidden projects in sidebar:
false
When I set this to true I do not get the error, when I set it back to false I get the error again.
I had changed this setting because I really had no desire to view the hidden projects on side in my home screen view, however, I would rather have the hidden projects showing up than the error every time I defer a project by editing it to "hidden"
@lrbalt if you are interested in trying to replicate the error on my system now all you have to do is flip that "Show hidden projects in sidebar:" option to false and you should see the error. Feel free to use my system to Firebug this error, I have already posted all relevant Tracks production log text above. Thanks for your help, I am just glad I was able to track down the source of the nil value that was prompting the error, I will leave it to the experts to adjust the code accordingly :)
Thanks for your extensive investigation. I think I have a clue where the error might be. You are correct that the update takes place, the error is in the rendering code in the reply (Tracks stores the changes in the database and then generates javascript to update the webpage in your browser. The first step went ok, the error in the second step).
I have just released Tracks 2.2. You might want to update :-)
I have just released Tracks 2.2. You might want to update :-)
it is fixed by adding
init_project_hidden_todo_counts(['project'])
to app/controllers/project_controller.rb on line 223: https://github.com/TracksApp/tracks/blob/master/app/controllers/projects_controller.rb#L223
init_project_hidden_todo_counts(['project'])
to app/controllers/project_controller.rb on line 223: https://github.com/TracksApp/tracks/blob/master/app/controllers/projects_controller.rb#L223
on 2013-02-19 10:39 *
By wolfravenous
@lrbalt I inserted the code into the indicated file and it did correct the problem, I am now able to set the preference not to show hidden projects in side bar and also hide a project from the Projects page without the error. Thanks a bunch!
I am going to go ahead and close this ticket since the problem is fixed and you indicated the new code has been incorporated into a newer release version. Again thanks for the assistance in resolving this issue.
- Just a note for others, the actually space for the code insertion did NOT show up on my txt editor as line 223, instead it was 200. This could be because of different github changes, version updates, etc. The point being read all the surrounding code above and below and make sure you are inserting the fix where it should go in the controller file if fixing this manually.**
I am going to go ahead and close this ticket since the problem is fixed and you indicated the new code has been incorporated into a newer release version. Again thanks for the assistance in resolving this issue.
on 2013-02-19 10:40 *
By wolfravenous
Status changed from New to Fixed
Status changed from New to Fixed
(In tracks-tickets:3482af5072085bc1bdb04dd5fd25c49eb939a34a) fix #1393 by calculating todo count for hidden projects too
Branch: master
Branch: master