Notice: In order to edit this ticket you need to be either: a Product Owner, The owner or the reporter of the ticket, or, in case of a Task not yet assigned, a team_member"

Task #3951 (closed)

Opened 9 years ago

Closed 8 years ago

Bug: fix trac include macro

Reported by: jamoore Owned by: cxallan
Priority: critical Milestone: OMERO-Beta4.3
Component: Documentation Version: n.a.
Keywords: n.a. Cc: jamoore
Resources: n.a. Referenced By: n.a.
References: n.a. Remaining Time: 0.0d
Sprint: 2011-06-16 (14)

Description (last modified by cxallan)

See the following for an example of the current behavior.

Change History (10)

comment:1 Changed 9 years ago by cxallan

  • Owner set to cxallan
  • Remaining Time set to 0.25
  • Sprint set to 2011-02-24 (6)

comment:2 Changed 8 years ago by jmoore

Some user feedback:

On Feb 22, 2011, at 4:26 PM, Adam Fraser wrote:

Hi Josh, I was going to send this to ome-devel, but then thought that it
might not belong on that list.

Anyway I just saw the following error at:
http://trac.openmicroscopy.org.uk/ome/wiki/OmeroTables

*Error: Macro Include(source:trunk/examples/OmeroTables/iroi.py) failed*


'NoneType' object has no attribute 'get_node'

comment:3 Changed 8 years ago by jburel

  • Sprint changed from 2011-02-24 (6) to 2011-03-10 (7)

Moved from sprint 2011-02-24 (6)

comment:4 Changed 8 years ago by jburel

  • Sprint changed from 2011-03-10 (7) to 2011-03-24 (8)

Moved from sprint 2011-03-10 (7)

comment:5 Changed 8 years ago by cxallan

  • Sprint 2011-03-24 (8) deleted

comment:6 Changed 8 years ago by jmoore

  • Cc wmoore added
  • Component changed from General to Documentation
  • Priority changed from minor to critical

increasing priority closer to release.

comment:7 Changed 8 years ago by jmoore

  • Sprint set to 2011-06-16 (14)

comment:8 Changed 8 years ago by cxallan

  • Cc jmoore added; wmoore removed
  • Status changed from new to accepted

comment:9 Changed 8 years ago by cxallan

Changes to support the Git switch over and Trac 0.12:

--- macros_old.py	2011-06-09 12:12:01.000000000 +0100
+++ macros.py	2011-06-09 12:11:51.000000000 +0100
@@ -95,7 +95,7 @@
                 do_ext = not req.args.has_key("no"+ext) and not reduce(lambda l,r: l or r, map(req.args.has_key, disallowed) )
                 if do_ext:
                     try:
-                        path = 'trunk/examples/'+source_obj+'.'+ext
+                        path = 'ome.git/examples/'+source_obj+'.'+ext
                         outs.append(self.render_macro(req, name, 'source:'+path))
                         doc = tag.p(tag.blockquote(tag.a("Example: " +path, href='../browser/'+path)))
                         outs.append(doc.generate())
@@ -116,9 +116,12 @@
             out.events = itertools.chain(*es)
 
         elif source_format == 'source':
+            split_source_obj = source_obj.split('/')
+            repo = split_source_obj[0]
+            source_obj = '/'.join(split_source_obj[1:])
             if not req.perm.has_permission('FILE_VIEW'):
                 return ''
-            repo = self.env.get_repository(req.authname)
+            repo = self.env.get_repository(repo)
             node = repo.get_node(source_obj)
             out = node.get_content().read()
             if dest_format is None:

comment:10 Changed 8 years ago by cxallan

  • Description modified (diff)
  • Remaining Time changed from 0.25 to 0
  • Resolution set to fixed
  • Status changed from accepted to closed
Note: See TracTickets for help on using tickets. You may also have a look at Agilo extensions to the ticket.

1.3.13-PRO © 2008-2011 Agilo Software all rights reserved (this page was served in: 0.85157 sec.)

We're Hiring!