Issue Details (XML | Word | Printable)

Key: CODEBASE-134
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Jamie Orchard-Hays
Reporter: Jason Ronallo
Votes: 0
Watchers: 1
Operations

Clone this issue
If you were logged in you would be able to see more operations.
Blacklight Plugin

Authlogic error

Created: 01/Jun/09 04:01 PM   Updated: 25/Sep/09 12:41 PM
Return to search
Component/s: None
Affects Version/s: None
Fix Version/s: 2.4


 Description  « Hide
I get this error with latest out of trunk:

Authlogic::Session::Activation::NotActivatedError in Catalog#index

Showing vendor/plugins/blacklight/app/views/catalog/_bookmark_control.html.erb where line #1 raised:

You must activate the Authlogic::Session::Base.controller with a controller object before creating objects

Extracted source (around line #1):

1: <% if current_user and current_user.document_is_bookmarked? document[:id] %>
2: <span>This item is in your <%= link_to 'bookmarks', bookmarks_path %></span>
3: <% elsif current_user %>
4: <%- @bookmark ||= Bookmark.new -%>

Trace of template inclusion: vendor/plugins/blacklight/app/views/catalog/_document_list.html.erb, vendor/plugins/blacklight/app/views/catalog/index.html.erb

=====================================

I've monkey patched my copy to comment out the following in the plugin's application_controller.rb:
 def current_user_session
      return @current_user_session if defined?(@current_user_session)
      #@current_user_session = UserSession.find
    end

    def current_user
      return @current_user if defined?(@current_user)
      #@current_user = current_user_session && current_user_session.user
    end

When application_controller.rb from the plugin is copied to the rails application level leaving @current_user uncommented works. For some reason it only fails for the version inside the plugin.

I should also say that it works uncommented on one machine but not on another. The machine where it is not working is running Ruby Enterprise Edition.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Jamie Orchard-Hays made changes - 02/Jun/09 09:34 AM
Field Original Value New Value
Assignee Bess Sadler [ eos8d ] Jamie Orchard-Hays [ jamieorc ]
Naomi Dushay made changes - 25/Sep/09 12:41 PM
Status Open [ 1 ] Closed [ 6 ]
Fix Version/s 2.4 [ 10024 ]
Resolution Fixed [ 1 ]