instructure/canvas-lms — Issue #114: Google docs preview broken if not logged in
Author: karalabe
Created: 2011-10-08 08:54:53+00:00
State: open

For public courses - if the user is not logged in - the system displayd an error when trying to preview a document from the files section.

This is the stack trace:

```
Processing FilesController#public_url to json (for 89.37.112.7 at 2011-10-08 11:52:33) [GET]
Parameters: {"format"=>"json", "action"=>"public_url", "id"=>"64", "controller"=>"files"}

ActiveRecord::RecordNotFound (Context is required, but none found):
app/controllers/application_controller.rb:208:in `require_context'
app/controllers/application_controller.rb:56:in `set_locale'
compass (0.10.5) lib/compass/app_integration/rails/actionpack2/action_controller.rb:7:in `process'
haml (3.0.22) rails/./lib/sass/plugin/rack.rb:41:in `call'
haml (3.0.22) rails/./lib/sass/plugin/rack.rb:41:in `call'
barista (1.0.0) lib/barista/server.rb:33:in `call'
lib/request_context_generator.rb:35:in `call'
app/middleware/prevent_non_multipart_parse.rb:32:in `call'
app/middleware/load_account.rb:11:in `call'
passenger (3.0.2) lib/phusion_passenger/rack/request_handler.rb:96:in `process_request'
passenger (3.0.2) lib/phusion_passenger/abstract_request_handler.rb:513:in `accept_and_process_next_request'
passenger (3.0.2) lib/phusion_passenger/abstract_request_handler.rb:274:in `main_loop'
passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:321:in `start_request_handler'
passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `send'
passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:275:in `handle_spawn_application'
passenger (3.0.2) lib/phusion_passenger/utils.rb:479:in `safe_fork'
passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:270:in `handle_spawn_application'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:180:in `start'
passenger (3.0.2) lib/phusion_passenger/classic_rails/application_spawner.rb:149:in `start'
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:219:in `spawn_rails_application'
passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:132:in `lookup_or_add'
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:214:in `spawn_rails_application'
passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:82:in `synchronize'
passenger (3.0.2) lib/phusion_passenger/abstract_server_collection.rb:79:in `synchronize'
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:213:in `spawn_rails_application'
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:132:in `spawn_application'
passenger (3.0.2) lib/phusion_passenger/spawn_manager.rb:275:in `handle_spawn_application'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in `__send__'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:357:in `server_main_loop'
passenger (3.0.2) lib/phusion_passenger/abstract_server.rb:206:in `start_synchronously'
passenger (3.0.2) helper-scripts/passenger-spawn-server:99
```