Comment 19 for bug 1059559

Revision history for this message
Paul Everitt (paul-agendaless) wrote : Re: [Bug 1059559] [Oxfam KARL] AttributeError: 'PageTemplateFile' object has no attribute 'navigation'

I was able to recreate it. Was a little tricky.

As a note, this is all UX1.

1) Go to https://oxfamstaging.gocept.com/intranets/files

2) Make a folder "x" (or something)

3) Click "Advanced" and make that a reference manual folder.

4) In "x", make a reference manual "y".

5) In "y" make a reference section "z".

6) Go back to "x" (the reference manual folder).

7) Click "Advanced" and set to No Marker.

8) In the folder listing, click on "y".

You then get the error.

Try this on Carlos's branch and see if you can prevent the error.

--Paul

On Oct 16, 2012, at 12:48 PM, JimPGlenn <email address hidden> wrote:

> I am sorry ...I should have said where I did the testing. It was all on
> oxfamstaging.gocept.com. jim
>
> --
> You received this bug notification because you are subscribed to KARL3.
> https://bugs.launchpad.net/bugs/1059559
>
> Title:
> [Oxfam KARL] AttributeError: 'PageTemplateFile' object has no
> attribute 'navigation'
>
> Status in KARL3:
> Fix Committed
>
> Bug description:
> * reported by Oxfam to our support, also see
> https://karl.oxfam.org.uk/communities/karl-offices-
> project/blog/help...-urgent...-unable-to-edit-reference-manuals/
>
> * Error monitor output for when Helen tried to edit the manual:
>
> AttributeError: 'PageTemplateFile' object has no attribute
> 'navigation'
>
> - Expression: "old_layout.navigation"
> - Filename: /srv/multikarl/production/11/eggs/karl-3.98-py2.6.egg/karl/content/views/templates/intranet_layout.pt
> - Location: (40:39)
>
> - Source: ... tal:content="structure old_layout.navigation"/>
> ^^^^^^^^^^^^^^^^^^^^^
> - Arguments: user_can_edit: True
> repeat: {...} (0)
> renderer_name: templates/show_referencemanual.pt
> next_entry: <NoneType - at 0xb770a340L>
> head_data: <script type="text/javascript">\nwindow._karl_clien...
> actions: <list - at 0xc59646c>
> context_tools: <list - at 0x16c9466c>
> renderer_info: <RendererHelper - at 0x11760a8c>
> api: <TemplateAPI - at 0x1176098c>
> backto: {...} (2)
> panel: <instancemethod render_panel at 0x1833be8c>
> layout: <Layout - at 0x1176088c>
> request: <Request - at 0x18134d0c>
> tree: <list - at 0x117608ac>
> old_layout: <PageTemplateFile - at 0xed0624c>
> main_template: <PageTemplateFile - at 0xc13836c>
> context: <ReferenceManual human-resources-starting-or-leaving-oxfam at 0x1cc0ab6c>
> previous_entry: <NoneType - at 0xb770a340L>
> view: <NoneType - at 0xb770a340L>
> Exception when processing https://karl.oxfam.org.uk/intranets/files/essential-resources/support-and-resources/human-resources/human-resources-starting-or-leaving-oxfam/
> Referer: https://karl.oxfam.org.uk/intranets/files/essential-resources/support-and-resources/human-resources/
>
> Traceback (most recent call last):
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/tweens.py", line 17, in excview_tween
> response = handler(request)
> File "/srv/multikarl/production/11/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 107, in tm_tween
> return response
> File "/srv/multikarl/production/11/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 75, in __exit__
> return self._retry_or_raise(t, v, tb)
> File "/srv/multikarl/production/11/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 60, in _retry_or_raise
> reraise(t, v, tb) # otherwise reraise the exception
> File "/srv/multikarl/production/11/eggs/pyramid_tm-0.5-py2.6.egg/pyramid_tm/__init__.py", line 100, in tm_tween
> response = handler(request)
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/router.py", line 153, in handle_request
> response = view_callable(context, request)
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 186, in _secured_view
> return view(context, request)
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/config/views.py", line 319, in viewresult_to_response
> result = view(context, request)
> File "/srv/multikarl/production/11/eggs/karl-3.98-py2.6.egg/karl/content/views/references.py", line 222, in reference_outline_view
> request=request,
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/renderers.py", line 114, in render_to_response
> return helper.render_to_response(value, None, request=request)
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/renderers.py", line 422, in render_to_response
> result = self.render(value, system_values, request=request)
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/renderers.py", line 418, in render
> result = renderer(value, system_values)
> File "/srv/multikarl/production/11/eggs/karl-3.98-py2.6.egg/karl/application.py", line 224, in metarenderer
> return classic_renderer(value, system)
> File "/srv/multikarl/production/11/eggs/pyramid-1.2.1-py2.6.egg/pyramid/chameleon_zpt.py", line 49, in __call__
> result = self.template(**system)
> File "/srv/multikarl/production/11/eggs/Chameleon-2.8.2-py2.6.egg/chameleon/template.py", line 125, in __call__
> return self.render(**kwargs)
> File "/srv/multikarl/production/11/eggs/Chameleon-2.8.2-py2.6.egg/chameleon/zpt/template.py", line 258, in render
> return super(PageTemplate, self).render(**vars)
> File "/srv/multikarl/production/11/eggs/Chameleon-2.8.2-py2.6.egg/chameleon/template.py", line 191, in render
> raise_with_traceback(exc, tb)
> File "/srv/multikarl/production/11/eggs/Chameleon-2.8.2-py2.6.egg/chameleon/template.py", line 172, in render
> self._render(stream, econtext, rcontext)
> File "show_referencemanual_92190d1208a71b351d275cda320ae8a47b425758.py", line 330, in render
> File "/srv/multikarl/production/11/eggs/Chameleon-2.8.2-py2.6.egg/chameleon/zpt/template.py", line 262, in include
> self._render(*args, **kwargs)
> File "intranet_layout_e41bd21825d60c4e6a156605f9520ac088e10349.py", line 525, in render
> File "/srv/multikarl/production/11/eggs/Chameleon-2.8.2-py2.6.egg/chameleon/py26.py", line 12, in lookup_attr
> raise exc
> AttributeError: 'PageTemplateFile' object has no attribute 'navigation'
>
> - Expression: "old_layout.navigation"
> - Filename: /srv/multikarl/production/11/eggs/karl-3.98-py2.6.egg/karl/content/views/templates/intranet_layout.pt
> - Location: (40:39)
>
> - Source: ... tal:content="structure old_layout.navigation"/>
> ^^^^^^^^^^^^^^^^^^^^^
> - Arguments: user_can_edit: True
> repeat: {...} (0)
> renderer_name: templates/show_referencemanual.pt
> next_entry: <NoneType - at 0xb770a340L>
> head_data: <script type="text/javascript">\nwindow._karl_clien...
> actions: <list - at 0xc59646c>
> context_tools: <list - at 0x16c9466c>
> renderer_info: <RendererHelper - at 0x11760a8c>
> api: <TemplateAPI - at 0x1176098c>
> backto: {...} (2)
> panel: <instancemethod render_panel at 0x1833be8c>
> layout: <Layout - at 0x1176088c>
> request: <Request - at 0x18134d0c>
> tree: <list - at 0x117608ac>
> old_layout: <PageTemplateFile - at 0xed0624c>
> main_template: <PageTemplateFile - at 0xc13836c>
> context: <ReferenceManual human-resources-starting-or-leaving-oxfam at 0x1cc0ab6c>
> previous_entry: <NoneType - at 0xb770a340L>
> view: <NoneType - at 0xb770a340L>
>
> * Paul said in his comment that there's a bug report in the html
> source. Unfortunately, we are unable to reproduce the problem. We see
> no error when trying to edit the manual. Therefore we're able to add
> the report here.
>
>
> Best regards,
> Alex
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/karl3/+bug/1059559/+subscriptions