Modify

Opened 4 years ago

#8669 new defect

Wiki Last Modified patch crashes RPC API page in .12

Reported by: txcraig Owned by: izzy
Priority: normal Component: WikiLastModifiedPatch
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

When using this patch, I am seeing UndefinedError: "page" not defined after upgrading to Trac .12 with the latest XML RPC Plugin when accessing the API link (the XML RPC plugin adds a link to the top right to /rpc and that is the page with the error)

I solved it by wrapping the div in a py:if to check that page is defined:

<div py:match="div[@id='content' and @class='wiki']" py:attrs="select('@*')">
  <py:if test="page">
    <div class="lastmodified">Last modified by ${format_author(page.author)}, ${format_datetime(page.time)} (${dateinfo(page.time)} ago)</div>
 </py:if>
  ${select('*|text()')}
</div>

Attachments (0)

Change History (0)

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.