roberttdev / dactyl4

DACTYL in Rails 4
MIT License
1 stars 0 forks source link

When deleting a group, the deletion of data points does not appear to be recursive #2

Closed wsloand closed 10 years ago

wsloand commented 10 years ago

Steps to reproduce:

Result:

wsloand commented 10 years ago

Potential associated error email:

{"action"=>"show", "controller"=>"groups", "document_id"=>"27", "id"=>"49"}

ActiveRecord::RecordNotFound

Couldn't find Group with 'id'=49

/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:320:in raise_record_not_found_exception!' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:420:infind_one' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:404:in find_with_ids' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:68:infind' /home/ubuntu/documentcloud/app/controllers/groups_controller.rb:13:in show' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/implicit_render.rb:4:insend_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/abstract_controller/base.rb:189:in process_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/rendering.rb:10:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/abstract_controller/callbacks.rb:20:in block in process_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:113:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:113:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:299:inblock (2 levels) in halting' /home/ubuntu/documentcloud/app/controllers/application_controller.rb:186:in notify_exceptions' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:424:inblock in make_lambda' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:298:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:298:inblock in halting' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:166:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:166:inblock in halting' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:229:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:229:inblock in halting' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:229:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:229:inblock in halting' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:149:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:149:inblock in halting_and_conditional' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:86:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:86:inrun_callbacks' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/abstract_controller/callbacks.rb:19:in process_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/rescue.rb:29:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/instrumentation.rb:31:in block in process_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/notifications.rb:159:inblock in instrument' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/notifications/instrumenter.rb:20:in instrument' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/notifications.rb:159:ininstrument' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/instrumentation.rb:30:in process_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/params_wrapper.rb:250:inprocess_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/railties/controller_runtime.rb:18:in process_action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/abstract_controller/base.rb:136:inprocess' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionview-4.1.0/lib/action_view/rendering.rb:30:in process' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal.rb:195:indispatch' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/rack_delegation.rb:13:in dispatch' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal.rb:231:inblock in action' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:80:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:80:indispatch' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:48:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:71:inblock in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:in each' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/journey/router.rb:59:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/routing/route_set.rb:676:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/etag.rb:23:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/conditionalget.rb:25:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/head.rb:11:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/params_parser.rb:27:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/flash.rb:254:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in context' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/cookies.rb:560:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/query_cache.rb:36:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/connection_adapters/abstract/connection_pool.rb:621:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:29:inblock in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/callbacks.rb:82:in run_callbacks' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/callbacks.rb:27:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/remote_ip.rb:76:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/debug_exceptions.rb:17:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/show_exceptions.rb:30:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/rack/logger.rb:38:incall_app' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in block in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:inblock in tagged' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:26:in tagged' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/tagged_logging.rb:68:intagged' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/rack/logger.rb:20:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_dispatch/middleware/request_id.rb:21:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/runtime.rb:17:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activesupport-4.1.0/lib/active_support/cache/strategy/local_cache_middleware.rb:26:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/rack-1.5.2/lib/rack/sendfile.rb:112:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/engine.rb:514:in call' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/railties-4.1.0/lib/rails/application.rb:144:incall' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/lib/phusion_passenger/rack/thread_handler_extension.rb:74:in process_request' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/lib/phusion_passenger/request_handler/thread_handler.rb:141:inaccept_and_process_next_request' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/lib/phusion_passenger/request_handler/thread_handler.rb:109:in main_loop' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/passenger-4.0.41/lib/phusion_passenger/request_handler.rb:448:inblock (3 levels) in start_threads'

roberttdev commented 10 years ago

We are going to have to overhaul the whole cascading delete structure when implementing the multi-reference point, so this will have to wait until that is complete.

wsloand commented 10 years ago

This appears mostly resolved. The only remaining issue is that during the same session the document view does not update and the yellow highlighted regions are not removed. After saving and exiting then re-entering the document, they are gone.

wsloand commented 10 years ago

The issue that during the same session highlight remains appears to still be there. The javascript console in Chrome shows this line after deleteing the group.

Failed to load resource: the server responded with a status of 404 (Not Found)

When trying to click on the yellow area after deletion, the following appears:

https://54.197.224.62/documents/31/groups/105 Uncaught TypeError: Cannot read property 'handleDVSelect' of undefined editor.js:38 dc.ui.ViewerDEControlPanel.Backbone.View.extend.handleAnnotationSelect editor.js:38 dc.ui.AnnotationEditor.Backbone.View.extend.selectAnnotationPoint editor.js:12 (anonymous function) viewer.js:373 r.each.r.forEach viewer.js:232 DV.model.Annotations.fireSelectCallbacks viewer.js:373 DV.Annotation.show viewer.js:268 DV._.extend.annotationBridgeShow viewer.js:430 h viewer.js:22 v viewer.js:3 e.event.handle viewer.js:54 p.handle.m viewer.js:48

And, I get an email with the following:

{"action"=>"show", "controller"=>"groups", "document_id"=>"31", "id"=>"105"}

ActiveRecord::RecordNotFound

Couldn't find Group with 'id'=105

/home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:320:in raise_record_not_found_exception!' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:420:infind_one' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:404:in find_with_ids' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/activerecord-4.1.0/lib/active_record/relation/finder_methods.rb:68:infind' /home/ubuntu/documentcloud/app/controllers/groups_controller.rb:27:in show' /home/ubuntu/.rvm/gems/ruby-2.1.1/gems/actionpack-4.1.0/lib/action_controller/metal/implicit_render.rb:4:insend_action' [[[ and more that I can send on request ]]]

roberttdev commented 10 years ago

Ugh, this fix just does not want to take in Jammit. I'm going to have to find a way around this buggy process.

wsloand commented 10 years ago

Looks great!