Hi, i had the same problem.

To fix this while a new version is launched, you can edit the file

applications/admin/views/default/design.html

And go to line 207 where youl find

    if '/'.join(file_path).startswith('/'.join(path)):

Try to chage it with
    
    if len(file_path)>= len(path) and all([ v==file_path[k] for k,v in
enumerate(path)]):

It worked for me.

El lun, 15-11-2010 a las 13:43 -0800, Nico de Groot escribió:
> I think the offending line is in design.html, see the ticket below.
> (The 'real' line number is 207, because the python code is generated
> by {{=...}}.)
> 
> 289.    if '/'.join(file_path).startswith('/'.join(path)):
> 
> 
> At that point
> 
>    path:  ['js', 'ckeditor', 'plugins', 'table']
> and
>    file_path: ['js', 'ckeditor', 'plugins', 'tableresize']
> 
> the joins in de code result in
> 
>   js/ckeditor/plugins/tableresize
> and
>   js/ckeditor/plugins/table
> 
> 
> I think line 289 intents to check if the  'path' is a 'path-prefix'
> of  'file_path'. In this case the check resolves to True, but this
> incorrect, because it is NOT a path-prefix causing line 290 to fail.
> 
> line 289 should probably be something like:
> 
>     if ('/'.join(file_path)+'/').startswith('/'.join(path)+'/') or
> path==[]:
> 
> This seems to resolve at least my problem. Please test and confirm.
> 
> Nico
> -------------------------------------
> Excerpt from my error-ticket:
> 
> <type 'exceptions.IndexError'>(list index out of range)
> 
> File C:\web2py\applications\admin\views\default\design.html in
> <module> at line 290
> code
> 
> Code listing
> 282. response.write('\n  <ul>\n    ', escape=False)
> 283. path=[]
> 284. for file in statics+['']:
> 285.    items=file.split('/')
> 286.    file_path=items[:-1]
> 287.    filename=items[-1]
> 288.    while path!=file_path:
> 289.    if '/'.join(file_path).startswith('/'.join(path)):
> 290.       path.append(file_path[len(path)])
> 
> ------------------------------------------------------------
> On 15 nov, 20:10, Branko Vukelic <bg.bra...@gmail.com> wrote:
> > On Mon, Nov 15, 2010 at 8:59 PM, mdipierro <mdipie...@cs.depaul.edu> wrote:
> > > where is the offending line in design.html?
> >
> > I think it's in this block:
> >
> > <h3 id="plugins" onclick="collapse('plugins_inner');" class="component">
> >   {{=T("Plugins")}}
> >   <span class="tooltip">{{=helpicon()}} <span>{{=T("To create a
> > plugin, name a file/folder plugin_[name]")}}</span></span>
> > </h3>
> > <div id="plugins_inner" class="component_contents">
> >   <div class="controls comptools">
> >     {{=button(PLUGINS_APP, T('download plugins'))}}
> >   </div>
> >   <div class="controls">
> >   </div>
> >   {{if plugins:}}
> >   <ul>
> >       {{for plugin in plugins:}}
> >       <li>
> >       {{=A('plugin_%s' % plugin, _class='file', _href=URL('plugin',
> > args=[app, plugin]))}}
> >       </li>
> >       {{pass}}
> >   </ul>
> >   {{else:}}
> >   <p><strong>{{=T('There are no plugins')}}</strong></p>
> >   {{pass}}
> >   <div class="controls formfield">{{=upload_plugin_form(app)}}</div>
> > </div>    <-- line 290
> >
> > --
> > Branko Vukelić
> >
> > bg.bra...@gmail.com
> > stu...@brankovukelic.com
> >
> > Check out my blog:http://www.brankovukelic.com/
> > Check out my portfolio:http://www.flickr.com/photos/foxbunny/
> > Registered Linux user #438078 (http://counter.li.org/)
> > I hang out on identi.ca:http://identi.ca/foxbunny
> >
> > Gimp Brushmakers Guildhttp://bit.ly/gbg-group


Reply via email to