[typo] Latest SVN, sidebar issues

Trejkaz trejkaz at trypticon.org
Wed Oct 12 03:25:23 EDT 2005

> Yes..  I was wrestling with this myself a few days ago.  I saw
> exactly what you were seeing, and noticed when I added a new sidebar
> I had to manually clear out the staged_config field in the sidebars
> table to get the sidebar to render (albeit with default values only).
> I can't say how I fixed it, other than the fact that I got it working
> about the time I installed the latest beta rails gems (was using
> 0.13.1 rails gems).  Is the trunk now only compatible with edge or
> beta rails and no longer with 0.13.1?  Or did I magically fix this
> problem some other way and not know how I did it.
> Hope that helps you poke around and fix the problem.

Based on this hint, I've poked around a bit to try and narrow things down.

First thing I did was to remove all blocks from the sidebar, and then did
a "select * from sidebars" to confirm that the database table was empty. 
Next, I went back to the admin screen and added one block, "Tags".

The default value in the text field was 20, as expected.  I changed it to
1 (this is my development site, after all, and I only have 2 tags on it to
start with, and it was set to 1 so that I could test that tag limiting
patch I submitted back then.)

Now I go back to the main page and refresh, and it shows the error.  So
this is from a completely clean table that this is happening... which is a
little disturbing.  I even tried not setting the value to 1 in this whole
process, which had the same result.

Funnily enough, if I go back to admin/sidebar again, the text field now
says "maximum_tags", and there's nothing I can do to make it a number,
until I delete the block and publish changes, and start all over again.

I was almost ready to blame this on the new version of Ruby because that
did break something earlier in the week (ActiveSupport needed a patch,
which fixed it pretty quickly) but when I checked my production site,
which is still on an older SVN revision, that one was fine.

I'm on Rails 0.13.1 also... which is starting to make me wonder whether
there is some subtle incompatibility going on between the current Typo,
the current Ruby, and the current (stable) Rails.  Only problem is, I
don't want to take the plunge and install a newer Rails, if it has a risk
of upsetting my live site (I know, it's bad to have both development and
production on the same server... but that's how funds are.)

I do have an enormous "Request Parameters" hash which may have some
interesting details in it... here is a pretty-printed extract:

    "sidebar" => #<Sidebar:0xb6c84108
      @attributes={ "staged_position"=>"0",
                    "active_config"=>"maximum_tags: 20\n",
                    "staged_config"=>"maximum_tags: 20\n"

I don't know if the RHS of staged_config and active_config is supposed to
be a string, but if it isn't, then we at least have a lead.


More information about the Typo-list mailing list