DCLP / dclpxsltbox

Sandbox for development, testing, and review of XSLT for DCLP
http://dclp.github.io/dclpxsltbox/
1 stars 5 forks source link

Clicking "create new" for DCLP meta or text throws errors #326

Closed ryanfb closed 6 years ago

ryanfb commented 6 years ago

If I "create new" DCLP text on an existing DDB publication, I get a "we're sorry" with the exception:

undefined method `temporary_path' for #<DCLPTextIdentifier:0x48043ca2>

I also then get the same thing every time I click on the publication overview or the newly-created DCLP Text Identifier from the dashboard.

If I "create new" DCLP meta on an existing DDB publication, I get a "we're sorry" with the exception:

NumbersRDF::Timeout

At https://github.com/dclp/sosol/blob/master/app/models/identifier.rb#L211 (this doesn't seem to be an actual Numbers Server timeout in this case, it's just getting parts.nil? there every single time apparently). This is more severe as afterwards not only can I not load the publication overview or newly-created DCLP Meta Identifier, I can't even load the dashboard without throwing the error.

If these are expected to be created (or not created) in a certain order, the UI/routes should enforce that.

Backtrace for DCLP text "undefined method temporary_path":

org/jruby/RubyBasicObject.java:1555 in method_missing
gems/gems/activemodel-3.2.22.5/lib/active_model/attribute_methods.rb:407 in method_missing
gems/gems/activerecord-3.2.22.5/lib/active_record/attribute_methods.rb:149 in method_missing
app/models/dclp_text_identifier.rb:49 in to_path
app/models/identifier.rb:86 in content
app/models/identifier.rb:321 in xml_content
app/models/publication.rb:1419 in get_all_comments
org/jruby/RubyArray.java:1613 in each
gems/gems/activerecord-3.2.22.5/lib/active_record/associations/collection_proxy.rb:91 in method_missing
app/models/publication.rb:1415 in get_all_comments
app/controllers/publications_controller.rb:503 in show
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/implicit_render.rb:4 in send_action
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb:167 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rendering.rb:10 in process_action
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb:18 in process_action
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:461 in _run__1855491842__process_action__551979968__callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405 in __run_callback
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:390 in _run_process_action_callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81 in run_callbacks
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb:17 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rescue.rb:29 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:30 in process_action
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:20 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:19 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:29 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/params_wrapper.rb:207 in process_action
gems/gems/activerecord-3.2.22.5/lib/active_record/railties/controller_runtime.rb:18 in process_action
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb:121 in process
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb:46 in process
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb:203 in dispatch
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rack_delegation.rb:14 in dispatch
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb:246 in action
org/jruby/RubyProc.java:281 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:73 in dispatch
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:36 in call
gems/gems/journey-1.0.4/lib/journey/router.rb:68 in call
org/jruby/RubyArray.java:1613 in each
gems/gems/journey-1.0.4/lib/journey/router.rb:56 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:608 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/best_standards_support.rb:17 in call
gems/gems/rack-1.4.7/lib/rack/etag.rb:23 in call
gems/gems/rack-1.4.7/lib/rack/conditionalget.rb:25 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/head.rb:14 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/params_parser.rb:21 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/flash.rb:242 in call
gems/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210 in context
gems/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/cookies.rb:341 in call
gems/gems/activerecord-3.2.22.5/lib/active_record/query_cache.rb:64 in call
gems/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:479 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb:28 in call
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:408 in _run__1586004758__call__1260748068__callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405 in __run_callback
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:390 in _run_call_callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81 in run_callbacks
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb:27 in call
gems/gems/rack-1.4.7/lib/rack/sendfile.rb:102 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/remote_ip.rb:31 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/debug_exceptions.rb:16 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/show_exceptions.rb:56 in call
gems/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:32 in call_app
gems/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:18 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/request_id.rb:22 in call
gems/gems/rack-1.4.7/lib/rack/methodoverride.rb:21 in call
gems/gems/rack-1.4.7/lib/rack/runtime.rb:17 in call
gems/gems/activesupport-3.2.22.5/lib/active_support/cache/strategy/local_cache.rb:72 in call
gems/gems/rack-1.4.7/lib/rack/lock.rb:15 in call
gems/gems/railties-3.2.22.5/lib/rails/engine.rb:484 in call
gems/gems/railties-3.2.22.5/lib/rails/application.rb:231 in call

Backtrace for for DCLP meta "NumbersRDF::Timeout":

app/models/identifier.rb:211 in collection_names
app/models/hgv_identifier.rb:24 in collection_names_hash
app/models/identifier.rb:170 in titleize
app/models/identifier.rb:419 in title
app/views/publications/_publication_listing.haml:50 in _app_views_publications__publication_listing_haml___1121721869_8906
org/jruby/RubyArray.java:1613 in each
app/views/publications/_publication_listing.haml:29 in _app_views_publications__publication_listing_haml___1121721869_8906
org/jruby/RubyArray.java:1613 in each
app/views/publications/_publication_listing.haml:18 in _app_views_publications__publication_listing_haml___1121721869_8906
gems/gems/actionpack-3.2.22.5/lib/action_view/template.rb:145 in render
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:125 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_view/template.rb:143 in render
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/partial_renderer.rb:265 in render_partial
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/partial_renderer.rb:238 in render
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/abstract_renderer.rb:38 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:20 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:19 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/abstract_renderer.rb:38 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/partial_renderer.rb:237 in render
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/renderer.rb:48 in render_partial
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/renderer.rb:22 in render
gems/gems/actionpack-3.2.22.5/lib/action_view/helpers/rendering_helper.rb:26 in render
gems/gems/haml-4.0.6/lib/haml/helpers/action_view_mods.rb:10 in render_with_haml
gems/gems/haml-4.0.6/lib/haml/helpers.rb:89 in non_haml
gems/gems/haml-4.0.6/lib/haml/helpers/action_view_mods.rb:10 in render_with_haml
app/views/user/user_dashboard.haml:12 in _app_views_user_user_dashboard_haml___1086334622_8898
gems/gems/actionpack-3.2.22.5/lib/action_view/template.rb:145 in render
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:125 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_view/template.rb:143 in render
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/template_renderer.rb:48 in render_template
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/abstract_renderer.rb:38 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:20 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:19 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/abstract_renderer.rb:38 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/template_renderer.rb:47 in render_template
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/template_renderer.rb:55 in render_with_layout
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/template_renderer.rb:46 in render_template
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/template_renderer.rb:18 in render
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/renderer.rb:43 in render_template
gems/gems/actionpack-3.2.22.5/lib/action_view/renderer/renderer.rb:24 in render
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb:111 in _render_template
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/streaming.rb:225 in _render_template
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb:104 in render_to_body
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/renderers.rb:28 in render_to_body
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/compatibility.rb:50 in render_to_body
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb:89 in render
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rendering.rb:16 in render
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:40 in render
gems/gems/activesupport-3.2.22.5/lib/active_support/core_ext/benchmark.rb:5 in ms
lib/jruby-stdlib-1.7.26.jar!/META-INF/jruby.home/lib/ruby/1.9/benchmark.rb:295 in realtime
gems/gems/activesupport-3.2.22.5/lib/active_support/core_ext/benchmark.rb:5 in ms
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:40 in render
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:83 in cleanup_view_runtime
gems/gems/activerecord-3.2.22.5/lib/active_record/railties/controller_runtime.rb:24 in cleanup_view_runtime
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:39 in render
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/implicit_render.rb:10 in default_render
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/implicit_render.rb:5 in send_action
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb:167 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rendering.rb:10 in process_action
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb:18 in process_action
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:461 in _run__1737280082__process_action__1348473639__callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405 in __run_callback
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:390 in _run_process_action_callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81 in run_callbacks
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb:17 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rescue.rb:29 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:30 in process_action
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:20 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:19 in instrument
gems/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123 in instrument
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:29 in process_action
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/params_wrapper.rb:207 in process_action
gems/gems/activerecord-3.2.22.5/lib/active_record/railties/controller_runtime.rb:18 in process_action
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb:121 in process
gems/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb:46 in process
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb:203 in dispatch
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal/rack_delegation.rb:14 in dispatch
gems/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb:246 in action
org/jruby/RubyProc.java:281 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:73 in dispatch
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:36 in call
gems/gems/journey-1.0.4/lib/journey/router.rb:68 in call
org/jruby/RubyArray.java:1613 in each
gems/gems/journey-1.0.4/lib/journey/router.rb:56 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:608 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/best_standards_support.rb:17 in call
gems/gems/rack-1.4.7/lib/rack/etag.rb:23 in call
gems/gems/rack-1.4.7/lib/rack/conditionalget.rb:25 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/head.rb:14 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/params_parser.rb:21 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/flash.rb:242 in call
gems/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210 in context
gems/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/cookies.rb:341 in call
gems/gems/activerecord-3.2.22.5/lib/active_record/query_cache.rb:64 in call
gems/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:479 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb:28 in call
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:408 in _run__1586004758__call__1260748068__callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405 in __run_callback
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:390 in _run_call_callbacks
gems/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81 in run_callbacks
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb:27 in call
gems/gems/rack-1.4.7/lib/rack/sendfile.rb:102 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/remote_ip.rb:31 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/debug_exceptions.rb:16 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/show_exceptions.rb:56 in call
gems/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:32 in call_app
gems/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:18 in call
gems/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/request_id.rb:22 in call
gems/gems/rack-1.4.7/lib/rack/methodoverride.rb:21 in call
gems/gems/rack-1.4.7/lib/rack/runtime.rb:17 in call
gems/gems/activesupport-3.2.22.5/lib/active_support/cache/strategy/local_cache.rb:72 in call
gems/gems/rack-1.4.7/lib/rack/lock.rb:15 in call
gems/gems/railties-3.2.22.5/lib/rails/engine.rb:484 in call
gems/gems/railties-3.2.22.5/lib/rails/application.rb:231 in call
ryanfb commented 6 years ago

Potentially related to #304, where the resolution was just to disable advanced create, which isn't a solution we can accept for merging to papyri.info.

ryanfb commented 6 years ago

Following from discussion this morning, since DCLP meta and DLCP text use the same file, creating either for an existing publication means the publication should have both DCLP meta and text identifiers associated with the publication afterwards.

ryanfb commented 6 years ago

There's some partial work for this in this commit (adding a temporary_path method to DCLPTextIdentifier): https://github.com/ryanfb/sosol/commit/58403cc4b80cf8fbd45d61a8f283c23cab0ee912

But it doesn't fully resolve the errors.

jcowey commented 6 years ago

OK, thanks!

jcowey commented 6 years ago

At present Create New DCLP Publication works. One can create a new DCLP Publication and at least one real instance has been pushed right through the system with voting, finalizing etc.

This is the file in question:

http://litpap.info/dclp/372062