Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when you visit manage users #2

Open
anusharanganathan opened this issue Jun 14, 2022 · 1 comment
Open

Error when you visit manage users #2

anusharanganathan opened this issue Jun 14, 2022 · 1 comment

Comments

@anusharanganathan
Copy link
Contributor

anusharanganathan commented Jun 14, 2022

Expected behavior

When navigating to Site administration -> Manage users (http://localhost:3000/spotlight/admin_users) the page to manage users should be displayed

Actual behavior

Page throws a 500 missing template error

Steps to reproduce the behavior

Go to User menu -->  Site administration --> Manage users --> page to manage users. 
See the following 500 error
`ActionView::Template::Error (undefined method `invited_to_sign_up?' for #<User:0x000055c2b0e16b58>`

Stack trace

[2022-06-14T22:39:50.767301 #25]  INFO -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6] Started GET "/spotlight/admin_users" for 172.26.0.1 at 2022-06-14 22:39:50 +0000
[2022-06-14T22:39:50.769393 #25]  INFO -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6] Processing by Spotlight::AdminUsersController#index as HTML
[2022-06-14T22:39:50.785577 #25]  INFO -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6]   Rendering /usr/local/bundle/gems/blacklight-spotlight-3.3.0/app/views/spotlight/admin_users/index.html.erb within layouts/spotlight/spotlight
[2022-06-14T22:39:50.817364 #25]  INFO -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6]   Rendered /usr/local/bundle/gems/blacklight-spotlight-3.3.0/app/views/spotlight/admin_users/index.html.erb within layouts/spotlight/spotlight (31.7ms)
[2022-06-14T22:39:50.817617 #25]  INFO -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6] Completed 500 Internal Server Error in 48ms (ActiveRecord: 5.4ms)
[2022-06-14T22:39:50.819009 #25] FATAL -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6]   
[2022-06-14T22:39:50.819052 #25] FATAL -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6] ActionView::Template::Error (undefined method `invited_to_sign_up?' for #<User:0x000055c2b0e16b58>
Did you mean?  invite_pending?):
[2022-06-14T22:39:50.819224 #25] FATAL -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6]     11:       <tbody class="table">
[fef2d191-13cf-49c9-b622-0ec300a01fb6]     12:         <% @site.roles.map(&:user).each do |user| %>
[fef2d191-13cf-49c9-b622-0ec300a01fb6]     13:           <tr>
[fef2d191-13cf-49c9-b622-0ec300a01fb6]     14:             <td class="<%= 'invite-pending' if user.invite_pending? %>">
[fef2d191-13cf-49c9-b622-0ec300a01fb6]     15:               <%= user.email %>
[fef2d191-13cf-49c9-b622-0ec300a01fb6]     16:               <span class='badge badge-warning pending-label'><%= t('.pending') %></span>
[fef2d191-13cf-49c9-b622-0ec300a01fb6]     17:             </td>
[2022-06-14T22:39:50.819256 #25] FATAL -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6]   
[2022-06-14T22:39:50.819321 #25] FATAL -- : [fef2d191-13cf-49c9-b622-0ec300a01fb6] activemodel (5.2.8) lib/active_model/attribute_methods.rb:430:in `method_missing'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] blacklight-spotlight (3.3.0) app/models/concerns/spotlight/user.rb:40:in `invite_pending?'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] blacklight-spotlight (3.3.0) app/views/spotlight/admin_users/index.html.erb:14:in `block (2 levels) in __usr_local_bundle_gems_blacklight_spotlight_______app_views_spotlight_admin_users_index_html_erb___3232100840795974055_81240'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] blacklight-spotlight (3.3.0) app/views/spotlight/admin_users/index.html.erb:12:in `each'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] blacklight-spotlight (3.3.0) app/views/spotlight/admin_users/index.html.erb:12:in `block in __usr_local_bundle_gems_blacklight_spotlight_______app_views_spotlight_admin_users_index_html_erb___3232100840795974055_81240'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/helpers/capture_helper.rb:41:in `block in capture'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/helpers/capture_helper.rb:205:in `with_output_buffer'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/helpers/capture_helper.rb:41:in `capture'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/helpers/form_helper.rb:452:in `form_for'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] bootstrap_form (4.5.0) lib/bootstrap_form/action_view_extensions/form_helper.rb:24:in `block in bootstrap_form_for'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] bootstrap_form (4.5.0) lib/bootstrap_form/action_view_extensions/form_helper.rb:47:in `with_bootstrap_form_field_error_proc'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] bootstrap_form (4.5.0) lib/bootstrap_form/action_view_extensions/form_helper.rb:23:in `bootstrap_form_for'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] blacklight-spotlight (3.3.0) app/views/spotlight/admin_users/index.html.erb:2:in `__usr_local_bundle_gems_blacklight_spotlight_______app_views_spotlight_admin_users_index_html_erb___3232100840795974055_81240'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/template.rb:159:in `block in render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications.rb:170:in `instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/template.rb:354:in `instrument_render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/template.rb:157:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/template_renderer.rb:54:in `block (2 levels) in render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/abstract_renderer.rb:44:in `block in instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications.rb:168:in `block in instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications.rb:168:in `instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/abstract_renderer.rb:43:in `instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/template_renderer.rb:53:in `block in render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/template_renderer.rb:61:in `render_with_layout'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/template_renderer.rb:52:in `render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/template_renderer.rb:16:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/renderer.rb:44:in `render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/renderer/renderer.rb:25:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/rendering.rb:103:in `_render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/streaming.rb:219:in `_render_template'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/rendering.rb:84:in `render_to_body'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/rendering.rb:52:in `render_to_body'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/renderers.rb:142:in `render_to_body'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/abstract_controller/rendering.rb:25:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/rendering.rb:36:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/instrumentation.rb:46:in `block (2 levels) in render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/core_ext/benchmark.rb:14:in `block in ms'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] /usr/local/lib/ruby/2.7.0/benchmark.rb:308:in `realtime'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/core_ext/benchmark.rb:14:in `ms'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/instrumentation.rb:46:in `block in render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activerecord (5.2.8) lib/active_record/railties/controller_runtime.rb:31:in `cleanup_view_runtime'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/instrumentation.rb:45:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] view_component (2.56.0) lib/view_component/rendering_monkey_patch.rb:9:in `render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/implicit_render.rb:35:in `default_render'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/basic_implicit_render.rb:6:in `block in send_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/basic_implicit_render.rb:6:in `tap'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/abstract_controller/base.rb:194:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/rendering.rb:30:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/abstract_controller/callbacks.rb:42:in `block in process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/callbacks.rb:132:in `run_callbacks'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/abstract_controller/callbacks.rb:41:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/rescue.rb:22:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/instrumentation.rb:34:in `block in process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications.rb:168:in `block in instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications/instrumenter.rb:23:in `instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/notifications.rb:168:in `instrument'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/instrumentation.rb:32:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal/params_wrapper.rb:256:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activerecord (5.2.8) lib/active_record/railties/controller_runtime.rb:24:in `process_action'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/abstract_controller/base.rb:134:in `process'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionview (5.2.8) lib/action_view/rendering.rb:32:in `process'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal.rb:191:in `dispatch'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_controller/metal.rb:252:in `dispatch'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/routing/route_set.rb:52:in `dispatch'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/routing/route_set.rb:34:in `serve'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/journey/router.rb:52:in `block in serve'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/journey/router.rb:35:in `each'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/journey/router.rb:35:in `serve'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/routing/route_set.rb:840:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/engine.rb:524:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/railtie.rb:190:in `public_send'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/railtie.rb:190:in `method_missing'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/routing/mapper.rb:19:in `block in <class:Constraints>'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/routing/mapper.rb:48:in `serve'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/journey/router.rb:52:in `block in serve'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/journey/router.rb:35:in `each'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/journey/router.rb:35:in `serve'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/routing/route_set.rb:840:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] warden (1.2.9) lib/warden/manager.rb:36:in `block in call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] warden (1.2.9) lib/warden/manager.rb:34:in `catch'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] warden (1.2.9) lib/warden/manager.rb:34:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/tempfile_reaper.rb:15:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/etag.rb:27:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/conditional_get.rb:27:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/head.rb:12:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/http/content_security_policy.rb:18:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/session/abstract/id.rb:266:in `context'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/session/abstract/id.rb:260:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/cookies.rb:670:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/callbacks.rb:28:in `block in call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/callbacks.rb:98:in `run_callbacks'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/callbacks.rb:26:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/debug_exceptions.rb:61:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/show_exceptions.rb:33:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/rack/logger.rb:38:in `call_app'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/rack/logger.rb:26:in `block in call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/tagged_logging.rb:71:in `block in tagged'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/tagged_logging.rb:28:in `tagged'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/tagged_logging.rb:71:in `tagged'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/rack/logger.rb:26:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/remote_ip.rb:81:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] request_store (1.5.1) lib/request_store/middleware.rb:19:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/request_id.rb:27:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/method_override.rb:24:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/runtime.rb:22:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] activesupport (5.2.8) lib/active_support/cache/strategy/local_cache_middleware.rb:29:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/executor.rb:14:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] actionpack (5.2.8) lib/action_dispatch/middleware/static.rb:127:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] rack (2.2.3.1) lib/rack/sendfile.rb:110:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] railties (5.2.8) lib/rails/engine.rb:524:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] puma (3.12.6) lib/puma/configuration.rb:227:in `call'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] puma (3.12.6) lib/puma/server.rb:706:in `handle_request'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] puma (3.12.6) lib/puma/server.rb:476:in `process_client'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] puma (3.12.6) lib/puma/server.rb:334:in `block in run'
[fef2d191-13cf-49c9-b622-0ec300a01fb6] puma (3.12.6) lib/puma/thread_pool.rb:135:in `block in spawn_thread'
@anusharanganathan
Copy link
Contributor Author

anusharanganathan commented Jun 14, 2022

Commit 80d0e1c fixes the issue.

Had to include devise invitable and run the generator for devise invitable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant