Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #1009 (closed defect: wontfix)

Opened 11 years ago

Last modified 10 years ago

Spinner image doesn't show up in autocomplete widget

Reported by: Kaan Owned by: anonymous
Priority: normal Milestone: 1.5
Component: TG Widgets Version: 0.9a6
Severity: minor Keywords:
Cc:

Description

Just as the summary says, I use the Autocomplete widget and it works fine except for the spinner image not showing up. In my console I get: 2006-06-24 11:10:00,594 cherrypy.msg INFO HTTP: Page handler: "The path '/dreams/tg_widgets/turbogears.widgets/spinnerstopped.png' was not found." Traceback (most recent call last):

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 105, in _run

self.main()

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 246, in main

page_handler, object_path, virtual_path = self.mapPathToObject(path)

File "/usr/lib/python2.4/site-packages/CherryPy-2.2.1-py2.4.egg/cherrypy/_cphttptools.py", line 312, in mapPathToObject

raise cherrypy.NotFound?(objectpath)

NotFound?: 404

Attachments

templateok Download (875 bytes) - added by Kaan 11 years ago.
Template that fixes it

Change History

Changed 11 years ago by Kaan

Template that fixes it

comment:1 Changed 11 years ago by Kaan

If change the widget template to the above, it works fine. It seemed to wrap the urls to the images like ${tg.url(tg.widget, 'spinner.gif')} which I found a bit weird and I changed it to ${tg.widget}/turbogears.widget/spinner.gif and it worked.

comment:2 Changed 11 years ago by Kaan

  • Milestone set to 0.9

comment:3 Changed 11 years ago by khorn

  • Milestone 0.9 deleted

milestone passed, removing milestone

Can anyone verify that this is still a problem?

I've never experienced this problem. Was it a general issue, or related to the reporter's environment?

comment:4 Changed 11 years ago by jorge.vargas

  • Milestone set to 1.0

if noone can confirm lets close it.

comment:5 Changed 11 years ago by khorn

I had the same issue, and was pointed here from the mailing list.

I'll try to find out more details about what causes the problem, but for me for the project I'm working on, it happens whenever I have an AutoComplete? field inside a form that is created by a controller beneath the root controller.

For some reason, I'm picking up the path of the controller in the image path for the AC widget.

The project I'm working on has been ported up from a 0.8/0.9 project, so I'll try to see if the sanme thing happens in a clean 1.0 quickstarted project.

comment:6 Changed 11 years ago by alberto

  • Milestone changed from 1.0 to 1.1

comment:7 Changed 11 years ago by khorn

  • Status changed from new to closed
  • Resolution set to wontfix

I think I've finally figured this one out... (sorry for the long delay).

When using the AutoCompleteField widget in a controller class that is mounted beneath the controller, so for example:

Root (derived from controllers.Root Controller)

|_ subcontroller (derived from controllers.Controller)

every thing is fine. The image shows up and all is well.

HOWEVER, if you do the following:

Root (derived from controllers.Root Controller)

|_ subcontroller (derived from controllers.RootController?) <- notice this!

then the image does not appear. Not only that but any calls to tg.url will be completely messed up, as the application cannot tell what the correct app root is from within the subcontroller.

AFAIK this is correct behavior, and is one of the main differences between the RootController? and Controller classes.

However, this is an easy mistake to make, since there is little documentation on when/how to use the different controller classes, and Wiki20 has used them interchangeably in various incarnations (obviously this was a bug in Wiki20, and is probably fixed now, but that's where I got the problem from). Care should be taken to explain this to new users, so that they don't get bitten by this issue.

I'm going to close this ticket. We'll reopen it if someone finds another case where this can happen.

Note: See TracTickets for help on using tickets.