[typo] Precondition Failed Errors

Kyle Heon kheon at comcast.net
Fri Mar 3 20:49:30 EST 2006


I am all of a sudden getting the following error when attempting to add or
edit an article:

Precondition Failed

The precondition on the request for the URL /admin/content/edit/81 evaluated
to false.

This is running revision 875 from the trunk. The only change I made recently
(last night) was to change the way articles are being cached. This was in an
effort to get a rotating banner image working.

This does not happen locally when I run the site via Webrick but is
happening in production mode via lighttpd on Textdrive.

I wouldn't think the caching change I made would cause this, as the error
appears to be in admin/content, not articles.

My articles controller looks like this now:

class ArticlesController < ApplicationController
  before_filter :verify_config
  before_filter :check_page_query_param_for_missing_routes
  layout :theme_layout

  cache_sweeper :blog_sweeper

  cached_pages = [:index, :read, :permalink, :category, :find_by_date,
:archives, :view_page, :tag]

  #caches_action_with_params *cached_pages
  caches_action_with_params :read
  session :off, :only => cached_pages

  <snip>

  def read
  	response.lifetime = 3600 # 1 hour

  <snip>
end

Why is this happening and what can I do to stop it?

Kyle Heon
kheon at comcast.net
www.kyleheon.com



More information about the Typo-list mailing list