Bug #374

Sidebar admin not working at all in Firefox or IE

Added by luke-birmingham-lastfield-co-u - 1217 days ago. Updated 791 days ago.

Status :Closed Start :
Priority :Normal Due date :
Assigned to :scott - % Done :

0%

Category :admin
Target version :2.5
Resolution :

worksforme


Description

Using the latest SVN checkout, the sidebar admin interface doesn't appear to work at all, unless I'm missing something pretty obvious. The only thing that does work is changing settings and removal of active items. Adding new items seems impossible.

Dragging an available item to the active sidebar area doesn't do anything. The item just sits there where you drop it. You can actually drag an item anywhere on the screen, it makes no difference. Clicking "Publish" doesn't save anything. Refreshing the page resets everything. I'm not getting any javascript errors in Firefox.

History

08/02/2005 12:56 PM - scott -

  • Status changed from New to Assigned

08/02/2005 01:02 PM - scott -

Which database?

If you're using Postgres, and your database was created with the schema from a week or so ago, then you might want to delete everything from the sidebar and start over; that may fix things. Or it may not.

I just checked, and the sidebar admin page works perfectly for me with FF 1.06. It's known not to work with IE6, but that's probably easy to fix. However none of the typo developers have a Windows box handy for IE testing, so fixing this has proved difficult.

08/02/2005 01:04 PM - Redmine Admin

I'm using MySQL 4.1, and the weblog is running on a Ubuntu Hoary server.

I'm accessing the weblog from Firefox 1.0.6 on Windows XP SP2 (and IE6).

This is the latest checkout, from about an hour ago (have just set this up).

Everything else appears to be working fine.

What is the expected behaviour of the sidebar admin page?

08/02/2005 01:05 PM - scott -

Wait, I just re-read your report. It sounds like javascript is crashing. Can you turn on the JS console in Firefox and see what it says?

08/02/2005 01:07 PM - Redmine Admin

Actually, I do apologise, I'm still running Firefox 1.0.4 when in Windows (I dual boot and only my Linux setup is running the latest Firefox...got confused). I'm not sure what difference two minor point releases will make but I'm downloading .0.6 now and will let you know if there is any difference.

08/02/2005 01:10 PM - Redmine Admin

OK, the upgrade didn't make any difference, but I'm now picking up a javascript error on load:

Error: handle is not defined
Source File: http://www.myserver.com/admin/sidebar
Line: 171

08/02/2005 02:42 PM - scott -

I think the only real changes in any of the FF 1.0.x releases are security-related, so I wouldn't expect FF upgrades to fix much, but they're probably best for you.

Can you look at the source for /admin/sidebar and post the block around where the error occurs?

08/02/2005 02:48 PM - Redmine Admin

Scott, this appears to be referring to a line in one of the javascript files...probably dragdrop.js = this contains references to "handle" several times, but I wouldn't know where to start narrowing it down...my OOP javascript knowledge is basic and I don't know my way around the prototype/scriptaculous internals I'm afraid.

08/02/2005 11:12 PM - scott -

I did a bit of digging--line 171 in /admin/sidebar is somewhere in the middle of the "active sidebars" list. Or at least it is for me. Can you paste a chunk out of your /admin/sidebar HTML, around whichever line number is generating errors for FF? I suspect that the error line will be something like this:

<script type="text/javascript">Sortable.create('active', {containment:['active','available_box'], handle:'handle', onUpdate:function(){new Ajax.Updater('active','/admin/sidebar/set_active',{asynchronous:true, evalScripts:true, parameters:Sortable.serialize('active')});new Ajax.Updater('available_box','/admin/sidebar/show_available',{asynchronous:true, evalScripts:true})}, tag:'div'})</script>

I could be mistaken, though. I wouldn't be surprised if there's some weird typo on that line in your copy, although I don't see where it could come from.

08/02/2005 11:15 PM - anonymous -

Actually, my line 171 is:

  <input type="checkbox" id="configure_3_articles" name="configure[articles]" checked="checked"/>

However, this could be caused by blank lines (I've copied the source from Firefox's source view to my text editor so it could be creating extra line numbers). Just further down, is something similar, but not the same as your:

<script type="text/javascript">Sortable.create('active', {handle:handle, onUpdate:function(){new Ajax.Updater('active','/admin/sidebar/set_active',{asynchronous:true, evalScripts:true, parameters:Sortable.serialize('active')});new Ajax.Updater('available_box','/admin/sidebar/show_available',{asynchronous:true, evalScripts:true})}, tag:'div', containment:['active','available_box']})</script>

08/02/2005 11:21 PM - Redmine Admin

I think I've tracked down the problem...and I feel bad for having wasted your time now. It appears the server has Rails 0.13.0 - presumably something about 0.13.1 changed the code generated by the ajax helpers. slaps forhead.

I'll be able to confirm this when the server is upgraded.

08/02/2005 11:23 PM - scott -

  • Status changed from Assigned to Closed
  • Resolution set to fixed

Okay, that's good to know--I don't think anyone's tested Typo with 0.13.0 recently. I'll close this and have xal add a comment to the release notes.

08/18/2005 02:52 PM - Redmine Admin

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Hi Again,

Unfortunately this problem still persists, running on an Ubuntu 5.0.4 server, now using a 100% clean install of the latest official Typo release (2.5.5).

Here is the output of gems list:

*** LOCAL GEMS ***

actionmailer (1.0.1)
    Service layer for easy email delivery and testing.

actionpack (1.9.1)
    Web-flow and rendering framework putting the VC in MVC.

actionwebservice (0.8.1)
    Web service support for Action Pack.

activerecord (1.11.1)
    Implements the ActiveRecord pattern for ORM.

activesupport (1.1.1)
    Support and utility classes used by the Rails framework.

BlueCloth (1.0.0)
    BlueCloth is a Ruby implementation of Markdown, a text-to-HTML
    conversion tool for web writers. Markdown allows you to write using
    an easy-to-read, easy-to-write plain text format, then convert it to
    structurally valid XHTML (or HTML).

mysql (2.6)
    MySQL/Ruby provides the same functions for Ruby programs that the
    MySQL C API provides for C programs.

rails (0.13.1)
    Web-application framework with template engine, control-flow layer,
    and ORM.

rake (0.5.4)
    Ruby based make-like utility.

RedCloth (3.0.3)
    RedCloth is a module for using Textile and Markdown in Ruby. Textile
    and Markdown are text formats.  A very simple text format. Another
    stab at making readable text that can be converted to HTML.

rubygems-update (0.8.11)
    RubyGems Update GEM

sources (0.0.1)
    This package provides download sources for remote gem installation

tidy (1.1.2)
    Ruby interface to HTML Tidy Library Project

xml-mapping (0.8)
    An easy to use, extensible library for mapping Ruby objects to XML
    and back. Includes an XPath interpreter.

The error remains the same, reported by the Firefox javascript console:

Error: handle is not defined
Source File: http://weblog.ournetwork.lastfield.com/admin/sidebar
Line: 193

This happens on load.

The relevant piece of Ajax script being generated by Rails is:

<script type="text/javascript">Sortable.create('active', {onUpdate:function(){new Ajax.Updater('active','/admin/sidebar/set_active',{asynchronous:true, evalScripts:true, parameters:Sortable.serialize('active')});new Ajax.Updater('available_box','/admin/sidebar/show_available',{asynchronous:true, evalScripts:true})}, tag:'div', containment:['active','available_box'], handle:handle})</script>

As you can see, this does not match the similar snippet Scott posted above. The part at the end "handle:handle" should not be there and appears to be what is throwing the javascript error. The following chunk is also missing from the beginning (between "active" and "{onUpdate}"):

{containment:['active','available_box'], handle:'handle'

I think this is probably a problem with my Rails installation but I'm not sure how to go about fixing this. The latest version from gem update is installed, so I can see what could have gone wrong.

08/20/2005 12:58 AM - anonymous -

This could be because hoary doesnt have the correct ruby version. But it is probably not. Works for me on a debian install

08/20/2005 11:23 AM - Redmine Admin

I'm actually using the correct version of ruby in /usr/local (and RubyGems), compiled and installed using the instructions here:

http://wiki.rubyonrails.com/rails/show/RailsOnUbuntuDebianTestingAndUnstable

08/24/2005 10:58 AM - scoop -

  • Status changed from Feedback to Closed
  • Resolution set to worksforme

I also presume this is a problem with your Rails installation. The Rails folks have added

 handle 
as a valid option to
 sortable_element 
in their Changeset 1760 which was basically way before 0.13.1 was out of the door.

Please check whether

 actionpack/lib/action_view/helpers/javascript_helper.rb 
from your local Rails installation has
 :handle 
 specified on line 444. If not, it'll still be created as a JS option by the helper method but will not be put in quotes and thus throw a JS error.

Reopen if you still have problems.

Also available in: Atom PDF