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

Possible bug in the user index.html.erb #28

Closed
BoomerBrian opened this issue Dec 12, 2009 · 1 comment
Closed

Possible bug in the user index.html.erb #28

BoomerBrian opened this issue Dec 12, 2009 · 1 comment

Comments

@BoomerBrian
Copy link

This line is giving me an error when I click on the user tab. Version 0.9.5.23
:title => "Remove this user forever" if user.ui_deletable?(current_user) %>

The error has to do with the superuser:

ActionView::TemplateError (undefined method `superuser' for #User:0x7f766dc31190) on line #19 of /usr/lib/ruby/gems/1.8/gems/refinerycms-0.9.5.23/vendor/plugins/authentication/app/views/admin/
16: <%= link_to refinery_icon_tag('delete.png'), admin_user_path(user),
17: :confirm => "Are you sure you want to delete '#{user.login}'?",
18: :class => "cancel", :method => :delete,
19: :title => "Remove this user forever" if user.ui_deletable?(current_user) %>
20: <%= link_to refinery_icon_tag('application_edit.png'), edit_admin_user_path(user),
21: :title => 'Edit this user' %>
22: <%= mail_to user.email, refinery_icon_tag('email_go.png'), :title => 'Email this user' %>

refinerycms (0.9.5.23) vendor/plugins/authentication/app/models/user.rb:125:in `ui_deletable?'

I replaced it with the following from an earlier version and it is now working again.
:title => "Remove this user forever" if @users.size > 1 and user.id != current_user.id %>

@BoomerBrian
Copy link
Author

My bad. Looks like there were changes between versions. I will run the migrate to add the column to the DB.

bofrede added a commit to bofrede/refinerycms that referenced this issue Aug 15, 2017
When browsing at http://localhost:3000/refinery/pages
Pages translated to locales not mentioned in the Refinery::I18n.frontend_locales causes:
```
ArgumentError in Refinery::Admin::Pages#index
Showing .../refinerycms-pages-3.0.5/app/views/refinery/admin/pages/_page.html.erb where line refinery#28 raised:
comparison of Fixnum with nil failed
```
This happens if you start translating into a language, but remove the locale from Refinery::I18n.frontend_locales if it is not ready at launch.
bofrede added a commit to bofrede/refinerycms that referenced this issue Aug 15, 2017
When browsing at http://localhost:3000/refinery/pages
Pages translated to locales not mentioned in the Refinery::I18n.frontend_locales causes:
```
ArgumentError in Refinery::Admin::Pages#index
Showing .../refinerycms-pages-3.0.5/app/views/refinery/admin/pages/_page.html.erb where line refinery#28 raised:
comparison of Fixnum with nil failed
```
This happens if you start translating into a language, but remove the locale from Refinery::I18n.frontend_locales if it is not ready at launch.
This issue was closed.
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