Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#556 closed defect (fixed)

Screenshots don't show up

Reported by: Scott Grayban Owned by: Radek Bartoň
Priority: highest Component: ScreenshotsPlugin
Severity: blocker Keywords:
Cc: Trac Release: 0.10


Maybe I'm just stupid but I don't know where these screenshots are suppose to be viewed at.

I click on the nav menu for it and I only get the description for it and the source says no image.

<div id="content" class="screenshots">
  <div class="title">

  <div class="header">
    <b>Component:</b> core (Non gui core bugs.) <b>Version:</b> 1.0 

  <div class="images">
    <div class="previous">
          <a class="noimage" href="#"></a>
          <a class="noimage" href="#"></a>

Attachments (0)

Change History (13)

comment:1 Changed 11 years ago by Scott Grayban

The page text has

Component: GUI (GUI core bugs) Version: 5.1
1 / 1
Startup window by sgrayban

Main window at startup

comment:2 Changed 11 years ago by Scott Grayban

Ahhhh I someting funky when I view the css for it

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/", line 335, in dispatch_request
  File "/usr/lib/python2.4/site-packages/trac/web/", line 220, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/web/", line 225, in process_request
    for dir in [os.path.normpath(dir[1]) for dir
  File "/usr/lib/python2.4/site-packages/HackInstall-0.5-py2.4.egg/hackinstall/", line 164, in get_htdocs_dirs
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg/", line 799, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg/", line 1229, in get_resource_filename
    return self._extract_resource(manager, zip_path)
  File "/usr/lib/python2.4/site-packages/setuptools-0.6c1-py2.4.egg/", line 1240, in _extract_resource
    zip_stat = self.zipinfo[zip_path]
KeyError: 'hackinstall/htdocs'

comment:3 Changed 11 years ago by Scott Grayban

Nevermind -- I still had that broken HackInstallPlugin still.

But still have issues with seeing the screenshots still.

Is path = <path_to_screenshots> full path or relative to the project? EG; site/screenshots/

Because the link to the screen shot is giving me when it should be

comment:4 Changed 11 years ago by Radek Bartoň

Status: newassigned


path variable is absolute so you should set it as ie. /var/lib/trac/project_1/screenshots . If you set path as this example and your problems will be otlasting, please remove HackInstallPlugin or solve problems with it and post me log output here. Note that ImageMagick tools properly installed is needed for running this plugin.

comment:5 Changed 11 years ago by anonymous

Still not working and I removed the hackinstall already.

I think you need to set the path relative to the project. EG; site/screenshots where site would always be /var/trac/project/htdocs

Because the htdocs is the public web folder and anything outside of that will not work as a link.

comment:6 Changed 11 years ago by Scott Grayban

whoops sorry -- I forgot to login.

This is what I have in my trac.ini

path = /var/trac/project/castpodder/htdocs/screenshots
title = Screenshots

The link for the image is wrong no matter what I set it to.

You use a static link which is bad =>

When it SHOULD use =>

See the problem?

Your path is for saving the screenshots and not for the links/thumbs.

comment:7 Changed 11 years ago by Radek Bartoň

With URL is nothing wrong. This URL is inside the plugin interpreted to filename and then appended to the end of path config variable and returned to the request object. So there is problem with this appending and returning. The reason why URL is working is coincidence that you have stored you screenshots inside htdocs dir, but image is returned to the request by core trac modules. Of course you have to set you path variable to directory which is to the web server accesible (ie. has apache ownwer), but it can be everywhere on the system. I'll take a close look on the code to consider what could be wrong but debug log output should tell me more. Unfortunately I'm afraid that there is no enough relevant debug prints in the code so I'll make a new changeset which you could try evoke error with.

comment:8 Changed 11 years ago by Scott Grayban

Your thinking apache -- you can't -- I and alot of others use the standalone server. It's faster then apache.

You need to make sure the thumbs and link for the pictures are set to use the template paths here.

Standalone server can't use rewrite rules.

The graphviz plugin is a good example to follow. He uses template paths to render and show the graphic. And a separate path for the URL.

cache_dir = /usr/share/trac/htdocs/graphviz
prefix_url =

comment:9 Changed 11 years ago by Radek Bartoň

By standalone server you mean tracd? Because I'm testing with tracd and there is no problem with it. I tried plugin with apache now and there problem is. Image is returned by req.send_file(path, type) so it should work everywhere.

comment:10 Changed 11 years ago by Radek Bartoň

I've commited new changeset 1078 which fix mistake in mime type returning. It should help so please try it.

comment:11 Changed 11 years ago by Scott Grayban

It works now :)

Now all you need to do is add config options to set the default component and version to use.

comment:12 Changed 11 years ago by Scott Grayban

Resolution: fixed
Severity: majorblocker
Status: assignedclosed

Oh and maybe a modify feature as well.

I do like this plugin since I can make screen shots depending on the version if any changes where changed.

Another cool feature would be the use of the tags plugin so you can also tag the screenshots.

But I will close this ticket and post a new one for the features.

comment:13 Changed 11 years ago by Radek Bartoň

I was considering make option to assing one screenhsot to more component or versions too.

Modify Ticket

as closed The owner will remain Radek Bartoň.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.