Modify

Opened 9 years ago

Closed 8 years ago

#55 closed defect (fixed)

WikiCalendar macro does not work with Trac 0.9b1

Reported by: sid@… Owned by: mgood
Priority: normal Component: WikiCalendarMacro
Severity: blocker Keywords:
Cc: taa@… Trac Release: 0.8

Description

Since the Wiki code was refactored, it broke the WikiCalendar macro. After a little debugging, here are the changes that should be made to get it to work with Trac 0.9x:

Add this:

from trac.wiki import WikiSystem

Change this:

                exists = env._wiki_pages.has_page(wiki)

to:

                exists = WikiSystem(env).has_page(wiki)

Attachments (0)

Change History (3)

comment:1 Changed 9 years ago by athomas

  • milestone 0.9 deleted

Milestone 0.9 deleted

comment:2 Changed 9 years ago by anonymous

  • Trac Release set to 0.8

The line

exists = env._wiki_pages.has_page(wiki)

doesn't actually exist in WikiCalendar.py. There's one that's close

exists = env._wiki_pages.has_key(wiki)

Is this the line you meant? If so, should the replacement line have has_page replaced with has_key also?

comment:3 Changed 8 years ago by taa

  • Cc taa@… added; anonymous removed
  • Resolution set to fixed
  • Status changed from new to closed

This seems to be fixed in the lates version.

Add Comment

Modify Ticket

Action
as closed The owner will remain mgood.
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.