[typo] Latest SVN, sidebar issues

Tim Lucas t.lucas at toolmantim.com
Thu Oct 13 23:37:55 EDT 2005

On 12/10/2005, at 2:51 PM, Trejkaz wrote:

> I just did an upgrade to the latest version of Typo in SVN  
> (revision 667)
> to see if there was a fix for an issue I was having with the feed
> autodiscovery URLs.
> However, after said upgrade, the sidebars no longer work.
> If I go into the admin/sidebar screen, I see the parameter name  
> stored in
> each text field instead of the value.  e.g. for the tag sidebar  
> block, the
> value next to "Maximum tags" is "maximum_tags".

I've experienced this sidebar config problem on typo 2.5.6 and SVN on  
my x86 debian production box but have not had a problem on my osx dev  
machine. I couldn't track down the problem, and seeing as the whole  
config thing doesn't work in IE anyway it was no good for my users.  
My work around was to embed the sidebar code directly into the  
theme's template.

> If I try to render the page itself, I get the error "can't convert  
> String
> into Hash":
> /components/sidebars/sidebar_controller.rb:39:in `merge!'
> /components/sidebars/sidebar_controller.rb:39:in `index'
> /app/helpers/application_helper.rb:77:in `render_sidebar'
> (erb):2:in `evaluate_locals'
> (erb):1:in `evaluate_locals'
> /lib/renderfix.rb:12:in `render_file'
> components/sidebars/sidebar_controller.rb:82:in `display_plugins'
> /app/helpers/articles_helper.rb:88:in `render_sidebars'
> (erb):37:in `evaluate_locals'
> /lib/renderfix.rb:12:in `render_file'
> I don't think this is a database issue on my end, as I've tried  
> repairing
> the values in the sidebar configuration blocks, but they get  
> reverted to
> these string values.  But has anyone else on the bleeding edge seen  
> this?

I've had this problem too and I just reverted to a previous version  
of /components/sidebars/sidebar_controller.rb:

=== sidebar_controller.rb
--- sidebar_controller.rb       (/mirror/typo/trunk/components/ 
sidebars/sidebar_controller.rb)  (revision 679)
+++ sidebar_controller.rb       (/wrigglyworm/trunk/components/ 
sidebars/sidebar_controller.rb)  (revision 679)
@@ -35,8 +35,12 @@
    def index
-    @sb_config = self.class.default_config
-    @sb_config.merge! @sidebar.active_config
+    @sb_config = @sidebar.active_config
+    if(not @sb_config or @sb_config.size == 0)
+      @sb_config = (self.class.default_config)
+    end
      render :action=>'content' unless performed?

Luckily i'm managing all this with SVK... it would be a nightmare  

I haven't had a chance to get the unit tests working (cause i dont  
have imagemagick installed and the sparkline test errors) and file  
patches (for a few other bugs too). I'll get round to it sometime soon.

-- tim

More information about the Typo-list mailing list