Opened 7 years ago

Closed 7 years ago

#6849 closed defect (fixed)

get_relative_resource doesn't exist in trac 0.11.1

Reported by: Rémi Demarthe Owned by: Ryan J Ollos
Priority: normal Component: WikiCalendarMacro
Severity: normal Keywords:
Cc: Trac Release: 0.11


The modification introduced with changeset 7323 uses trac.resource.get_relative_resource wich doesn't exist in my trac version (debian Lenny)

The following changes seems to resolve this issue.

< from trac.resource import get_relative_resource, get_resource_url
> from trac.resource import get_relative_url
<                     rsc = get_relative_resource(formatter.resource, wiki)
<                     wiki =
<                     url = get_resource_url(self.env, rsc, formatter.href)
>                     url = get_relative_url(self.env, formatter.resource, formatter.href)

Attachments (0)

Change History (5)

comment:1 Changed 7 years ago by Rémi Demarthe

url = get_relative_url(self.env, formatter.resource(id=wiki), formatter.href)

This seems to work better, I don't know if this is the better way to handle the resource.

comment:2 Changed 7 years ago by Ryan J Ollos

I will have to look into this. Do you know if get_relative_url was removed, or added after 0.11.1?

comment:3 Changed 7 years ago by Rémi Demarthe

I've inspected the different version and found that get_relative_url was added in trac 0.11 and is still present in trunk. get_relative_resource appeared in trac 0.11.3 and is still present in trunk.

I don't know if this bug should remain opened.

comment:4 Changed 7 years ago by Ryan J Ollos

I'll add a minimum required version of 0.11.3 to the file. Thanks for reporting this and tracking down the issue.

comment:5 Changed 7 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Since there is no file for this plugin, I've added the requirement to the main page of the wiki.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted.

Add Comment

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

Note: See TracTickets for help on using tickets.