#191 ✓resolved
Walter McGinnis

Caching issue for related items (topics and images, to date)

Reported by Walter McGinnis | April 24th, 2009 @ 10:30 AM | in 1.2

Here's an example error report:

Exception ActionView::TemplateError Message undefined method []' for nil:NilClass Instance mao.library.org.nz(passenger:Kete Net) Action TopicsController#show URL /site/topics/show/212-enhancement-ideas-for-kete Params<br/> action: show controller: topics id: 212-enhancement-ideas-for-kete urlified_name: site Source<br/> Showing topics/_related_items_section.html.erb where line [#29](/projects/14288/tickets/29 "Ticket #29") raised


  • <%= link_to_related_items_of(item, zoom_class, :link_text => "Public") -%> 27: <% end -%> 28: <% cache ({ :related => controller, :id => @cache_id }) do -%> 29: <%= related_items_display_of @public_items[zoom_class], 30: { :are_still_images => are_still_images, 31: :item => item, 32: :zoom_class => zoom_class,

The @public_items and @private_items variables are set in another partial which has a cache wrapper around their setting. Occasionally this partial is evaluated rather pulled from cache, while the partial that sets the variables exists and is pulled from cache. Thus the variables aren't loaded as expected.

My suspicion is that the cache part for the partial with the instantiation of the variables isn't being cleared when a related item is added in regards to atleast to topics.

Note that I recreated this problem when logged out and viewing a topic with several related topics.

Comments and changes to this ticket

  • Kieran P

    Kieran P April 24th, 2009 @ 06:34 PM

    • Assigned user changed from “Kete” to “Kieran P”
    • State changed from “new” to “resolved”

    Found and fixed two possible issues. Hopefully this issue is now resolved. Will reopen ticket if it occurs.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Kete was developed by Horowhenua Library Trust and Katipo Communications Ltd. to build a digital library of Horowhenua material.

People watching this ticket