liquidvotingio / decidim-module-liquidvoting

GNU Affero General Public License v3.0
4 stars 0 forks source link

Fix error when visiting http://localhost/admin/users. #107

Closed jinjagit closed 3 years ago

jinjagit commented 3 years ago

Visiting http://localhost/admin/users gives the following error:

admin_users_error


NameError in Decidim::Admin::Users#index

Showing /home/j/repos/liquid/decidim-module-liquidvoting/app/views/layouts/decidim/liquidvoting/admin/_users_sidebar.html.erb where line #40 raised:

undefined local variable or method `decidim_admin_liquidvoting' for #<#<Class:0x00007f12183a8e88>:0x00007f12183a6368>
Did you mean?  decidim_admin_id_documents

Extracted source (around line #40):
</li> 
  <% if allowed_to? :index, :impersonatable_user %>
    <li <% if is_active_link?(decidim_admin_liquidvoting.settings_path) %> class="is-active" <% end %>>
      <%= link_to t("menu.delegations", scope: "decidim.liquidvoting.admin"), decidim_admin_liquidvoting.settings_path %>
    </li>
<% end %>
davefrey commented 3 years ago

This stems from our override of the decidim admin users layout, which we're not using.

There is another issue #52 to remove this unused code; it's better to Resolve this current issue via a PR for #52, so that all the removal of unused admin code happens in the same commit.

So, leaving this open, but it should be included in the PR for #52

oliverbarnes commented 3 years ago

Merged the admin cruft PR - can you confirm this bug is indeed fixed, please?

jinjagit commented 3 years ago

Merged the admin cruft PR - can you confirm this bug is indeed fixed, please?

Confirmed :+1: I pulled changes to decidim-module-liquidvoting, then visited http://localhost/admin/users, which no longer failed with error.