Modify

Opened 5 years ago

Closed 4 years ago

#6849 closed defect (fixed)

get_relative_resource doesn't exist in trac 0.11.1

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

Description

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.

21c21
< from trac.resource import get_relative_resource, get_resource_url
---
> from trac.resource import get_relative_url
267,269c267
<                     rsc = get_relative_resource(formatter.resource, wiki)
<                     wiki = rsc.id
<                     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 5 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 5 years ago by rjollos

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 5 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 5 years ago by rjollos

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

comment:5 Changed 4 years ago by rjollos

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

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.