Bug 1338023 - Service :Dialog : Js Error when clicked on All Service Dialog
Summary: Service :Dialog : Js Error when clicked on All Service Dialog
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.6.0
Assignee: Martin Hradil
QA Contact: Matouš Mojžíš
URL:
Whiteboard: service:dialog
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-05-20 18:47 UTC by Shveta
Modified: 2016-06-29 16:05 UTC (History)
7 users (show)

Fixed In Version: 5.6.0.9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-06-29 16:05:02 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
js error (178.99 KB, image/png)
2016-05-20 18:47 UTC, Shveta
no flags Details
error (153.23 KB, image/png)
2016-05-20 18:49 UTC, Shveta
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Shveta 2016-05-20 18:47:58 UTC
Created attachment 1160031 [details]
js error

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Create few service dialogs
2. Create one service dialog with empty name field Under elements
3. Validation message is shown
4. Now without doing cancel , go to Automate - Customization --Js error is shown .
Spinner keeps spinning and configuration button is not displayed.

Actual results:


Expected results:


Additional info:
Build 5.6.0.7-beta2.6.20160516171555_b1be31f

Comment 2 Shveta 2016-05-20 18:49:12 UTC
Go to some other link and navigate back to Automate- Customization .
Error is shown.

Logs 
=================
[----] I, [2016-05-20T14:48:02.922826 #19183:94b90c]  INFO -- : Processing by MiqAeCustomizationController#explorer as HTML
[----] F, [2016-05-20T14:48:03.411883 #19183:94b90c] FATAL -- : Error caught: [NoMethodError] undefined method `[]' for nil:NilClass
/var/www/miq/vmdb/app/controllers/miq_ae_customization_controller/dialogs.rb:1019:in `dialog_edit_set_form_vars'
/var/www/miq/vmdb/app/controllers/miq_ae_customization_controller.rb:254:in `get_specific_node_info'
/var/www/miq/vmdb/app/controllers/miq_ae_customization_controller.rb:245:in `get_node_info'
/var/www/miq/vmdb/app/controllers/miq_ae_customization_controller.rb:192:in `set_active_elements'
/var/www/miq/vmdb/app/controllers/application_controller.rb:2509:in `build_accordions_and_trees'
/var/www/miq/vmdb/app/controllers/miq_ae_customization_controller.rb:112:in `explorer'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal/basic_implicit_render.rb:4:in `send_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/abstract_controller/base.rb:181:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal/rendering.rb:30:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/abstract_controller/callbacks.rb:20:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:126:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:506:in `block (2 levels) in compile'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:455:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:101:in `__run_callbacks__'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:750:in `_run_process_action_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/abstract_controller/callbacks.rb:19:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal/rescue.rb:20:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/notifications.rb:164:in `block in instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/notifications/instrumenter.rb:21:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/notifications.rb:164:in `instrument'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal/instrumentation.rb:30:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal/params_wrapper.rb:248:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activerecord/lib/active_record/railties/controller_runtime.rb:18:in `process_action'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/abstract_controller/base.rb:126:in `process'
/opt/rh/cfme-gemset/gems/actionview-5.0.0.rc1/lib/action_view/rendering.rb:30:in `process'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal.rb:190:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_controller/metal.rb:262:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/routing/route_set.rb:50:in `dispatch'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/routing/route_set.rb:32:in `serve'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/journey/router.rb:39:in `block in serve'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/journey/router.rb:26:in `each'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/journey/router.rb:26:in `serve'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/routing/route_set.rb:725:in `call'
/opt/rh/cfme-gemset/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:186:in `call!'
/opt/rh/cfme-gemset/gems/omniauth-1.3.1/lib/omniauth/strategy.rb:164:in `call'
/opt/rh/cfme-gemset/gems/omniauth-1.3.1/lib/omniauth/builder.rb:63:in `call'
/opt/rh/cfme-gemset/gems/secure_headers-3.0.3/lib/secure_headers/middleware.rb:10:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/etag.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/conditional_get.rb:25:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/head.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/session/abstract/id.rb:222:in `context'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/session/abstract/id.rb:216:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/cookies.rb:613:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/callbacks.rb:38:in `block in call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:97:in `__run_callbacks__'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:750:in `_run_call_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/callbacks.rb:90:in `run_callbacks'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/callbacks.rb:36:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/remote_ip.rb:79:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/debug_exceptions.rb:49:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/show_exceptions.rb:31:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.rc1/lib/rails/rack/logger.rb:36:in `call_app'
/opt/rh/cfme-gemset/gems/railties-5.0.0.rc1/lib/rails/rack/logger.rb:26:in `call'
/opt/rh/cfme-gemset/gems/request_store-1.3.1/lib/request_store/middleware.rb:9:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/request_id.rb:24:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/method_override.rb:22:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/runtime.rb:22:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/activesupport/lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call'
/opt/rh/cfme-gemset/bundler/gems/rails-a44497f6c9ef/actionpack/lib/action_dispatch/middleware/executor.rb:12:in `call'
/opt/rh/cfme-gemset/gems/rack-2.0.0.rc1/lib/rack/sendfile.rb:111:in `call'
/opt/rh/cfme-gemset/gems/railties-5.0.0.rc1/lib/rails/engine.rb:522:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/configuration.rb:224:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:561:in `handle_request'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:406:in `process_client'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/server.rb:271:in `block in run'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `call'
/opt/rh/rh-ruby22/root/usr/share/gems/gems/puma-3.3.0/lib/puma/thread_pool.rb:111:in `block in spawn_thread'
/opt/rh/cfme-gemset/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `call'
/opt/rh/cfme-gemset/gems/logging-1.8.2/lib/logging/diagnostic_context.rb:323:in `block in create_with_logging_context'
[----] I, [2016-05-20T14:48:03.428774 #19183:94b90c]  INFO -- :   Rendering layouts/exception.html.haml within layouts/application
[----] I, [2016-05-20T14:48:03.432889 #19183:94b90c]  INFO -- :   Rendered layouts/_exception_contents.html.haml (0.3ms)
[----] I, [2016-05-20T14:48:03.433120 #19183:94b90c]  INFO -- :   Rendered layouts/exception.html.haml within layouts/application (4.1ms)
[----] I, [2016-05-20T14:48:03.433556 #19183:94b90c]  INFO -- :   Rendered layouts/_doctype.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.436435 #19183:94b90c]  INFO -- :   Rendered stylesheets/_template50.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.440172 #19183:94b90c]  INFO -- :   Rendered layouts/_i18n_js.html.haml (2.5ms)
[----] I, [2016-05-20T14:48:03.447481 #19183:94b90c]  INFO -- :   Rendered layouts/_user_options.html.haml (6.2ms)
[----] I, [2016-05-20T14:48:03.447886 #19183:94b90c]  INFO -- :   Rendered layouts/_spinner.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.448316 #19183:94b90c]  INFO -- :   Rendered layouts/_lightbox_panel.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.448504 #19183:94b90c]  INFO -- :   Rendered layouts/_header.html.haml (7.8ms)
[----] I, [2016-05-20T14:48:03.482433 #19183:94b90c]  INFO -- :   Rendered layouts/_vertical_navbar.html.haml (33.4ms)
[----] I, [2016-05-20T14:48:03.494425 #19183:94b90c]  INFO -- :   Rendered layouts/_x_form_buttons.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.494629 #19183:94b90c]  INFO -- :   Rendered layouts/_x_pagingcontrols.html.haml (0.4ms)
[----] I, [2016-05-20T14:48:03.496820 #19183:94b90c]  INFO -- :   Rendered layouts/_dynatree.html.haml (0.3ms)
[----] I, [2016-05-20T14:48:03.496978 #19183:94b90c]  INFO -- :   Rendered shared/_tree.html.haml (0.7ms)
[----] I, [2016-05-20T14:48:03.497122 #19183:94b90c]  INFO -- :   Rendered shared/_explorer_tree.html.haml (1.2ms)
[----] I, [2016-05-20T14:48:03.498484 #19183:94b90c]  INFO -- :   Rendered layouts/_dynatree.html.haml (0.2ms)
[----] I, [2016-05-20T14:48:03.498634 #19183:94b90c]  INFO -- :   Rendered shared/_tree.html.haml (0.6ms)
[----] I, [2016-05-20T14:48:03.498745 #19183:94b90c]  INFO -- :   Rendered shared/_explorer_tree.html.haml (0.9ms)
[----] I, [2016-05-20T14:48:03.500043 #19183:94b90c]  INFO -- :   Rendered layouts/_dynatree.html.haml (0.2ms)
[----] I, [2016-05-20T14:48:03.500197 #19183:94b90c]  INFO -- :   Rendered shared/_tree.html.haml (0.6ms)
[----] I, [2016-05-20T14:48:03.500305 #19183:94b90c]  INFO -- :   Rendered shared/_explorer_tree.html.haml (0.9ms)
[----] I, [2016-05-20T14:48:03.501413 #19183:94b90c]  INFO -- :   Rendered layouts/_dynatree.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.501561 #19183:94b90c]  INFO -- :   Rendered shared/_tree.html.haml (0.5ms)
[----] I, [2016-05-20T14:48:03.501723 #19183:94b90c]  INFO -- :   Rendered shared/_explorer_tree.html.haml (0.8ms)
[----] I, [2016-05-20T14:48:03.502021 #19183:94b90c]  INFO -- :   Rendered layouts/listnav/_explorer.html.haml (6.6ms)
[----] I, [2016-05-20T14:48:03.502150 #19183:94b90c]  INFO -- :   Rendered layouts/_listnav.html.haml (7.1ms)
[----] I, [2016-05-20T14:48:03.502343 #19183:94b90c]  INFO -- :   Rendered layouts/_content.html.haml (53.6ms)
[----] I, [2016-05-20T14:48:03.502922 #19183:94b90c]  INFO -- :   Rendered layouts/_adv_search.html.haml (0.1ms)
[----] I, [2016-05-20T14:48:03.503109 #19183:94b90c]  INFO -- :   Rendered layouts/_footer.html.haml (0.5ms)
[----] I, [2016-05-20T14:48:03.503685 #19183:94b90c]  INFO -- : Completed 500 Internal Server Error in 581ms (Views: 90.7ms | ActiveRecord: 0.0ms)
[----] I, [2016-05-20T14:48:05.470324 #19183:94ab4c]  INFO -- : Started POST "/dashboard/window_sizes?width=1920&height=909" for 127.0.0.1 at 2016-05-20 14:48:05 -0400
[----] I, [2016-05-20T14:48:05.472917 #19183:94ab4c]  INFO -- : Processing by DashboardController#window_sizes as JS
[----] I, [2016-05-20T14:48:05.473068 #19183:94ab4c]  INFO -- :   Parameters: {"width"=>"1920", "height"=>"909"}
[----] I, [2016-05-20T14:48:05.526204 #19183:94ab4c]  INFO -- : Completed 200 OK in 53ms (ActiveRecord: 0.0ms)

Comment 3 Shveta 2016-05-20 18:49:37 UTC
Created attachment 1160032 [details]
error

Comment 5 Harpreet Kataria 2016-05-20 20:52:38 UTC
Martin,

It looks like when trying to leave Dialog editor by clicking on one of maintabs or second level menus when there are unsaved changes it doesn't prompt the user to check if they want to Abandon Changes, also need to make sure that x_active_tree and active node gets reset appropriately in this case.

Let me know if you need help looking into this or recreating the issue.

Thanks,
~Harpreet

Comment 7 CFME Bot 2016-05-26 18:05:30 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/aa75cda06b610741aea4dda477eaa30e38ed875e

commit aa75cda06b610741aea4dda477eaa30e38ed875e
Author:     Martin Hradil <mhradil>
AuthorDate: Tue May 24 14:36:23 2016 +0000
Commit:     Martin Hradil <mhradil>
CommitDate: Thu May 26 13:23:28 2016 +0000

    MiqAeCustomization#explorer - reset state
    
    We're only ever calling `explorer` by accessing the main screen, which should never use the dialog_edit_tree -> forces :dialogs_tree if available
    
    + specs checking that main_div is not empty, and the right tree is set
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1338023

 app/controllers/miq_ae_customization_controller.rb |  4 +++
 .../miq_ae_customization_controller_spec.rb        | 32 ++++++++++++++++++++++
 2 files changed, 36 insertions(+)

Comment 8 Shveta 2016-06-01 23:57:50 UTC
Fixed.
Verified in 5.6.0.9-rc2.20160531154046_b4e2f6d

Comment 10 errata-xmlrpc 2016-06-29 16:05:02 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1348


Note You need to log in before you can comment on or make changes to this bug.