[Silva-general] Fwd: News viewers bug with silvaLayout, maybe? Help Please!!!
Jonathan Bowlas
j.bowlas at ucl.ac.uk
Tue Oct 14 10:49:20 CEST 2008
Hi Andy,
Thanks for taking the time to have a go at this, much appreciated.
We're using SNN 2.3-1.5, and I can confirm that we are in fact using
an inline news viewer and there is also a code source embedded in the
page that renders the news viewer. Actually what I've done is create a
silva document in publication A that includes the news viewer from
publication A using a code source. This is done because of the design
we've been asked to produce. The INV then links directly to this page.
So tell me how can the code source be changing the context?
I've attached both the code source and the INV for you to play with in
your setup. The 'testinginv' should be embedded somewhere at the root
of your site, then create a folder called 'slms-news' at the root of
your publication, inside this add an index file with the
'content_includer_box' code source embedded with the news viewer as
it's reference.
Let me know how you get on.
Cheers
Jon
2008/10/14 Andy Altepeter <aaltepet at altepeter.net>:
> Hey Jon,
>
> I tried to reproduce this using the versions you listed below, except Zope
> 2.8.9 and SilvaNewsNetwork 2.3.1.2 for Silva 1.5. Is that the correct
> SilvaNews version?
>
> I was unable to reproduce the issue you've reported. I had:
> 1) a news item in both news publications
> 2) the containers of both publications used different layouts
> 3) The container of the first publication had a news filter which used both
> news publications as sources, and a news viewer which used the news filter
> 3) The layout of the publication containing the viewer called a zope 3 view
> which was only defined for that layout.
>
> So, if during the processing if the news viewer the skin was changed to the
> other layout, or the context was switched to that layout, the browser would
> have either shown an error page or the news viewer in the other layout.
>
> It occurs to me that perhaps the context is changing somehow. Are you using
> an external source in either of the news items, or are you using the inline
> news viewer external source rather than a news viewer?
>
> Cheers,
> Andy
>
> On Tuesday 07 October 2008 10:11:05 am Jonathan Bowlas wrote:
>> Sorry Andy, slight mistake, its v 2.8.8. Zope
>>
>> J
>>
>> 2008/10/7 Jonathan Bowlas <j.bowlas at ucl.ac.uk>:
>> > Hi Andy,
>> >
>> > Thanks for the response Andy, hope you're well.
>> >
>> > As you suggest, It appears that the context has changed from
>> > Publication A to Publication B since slms_tabs view only exists within
>> > the Layout A and not in Layout B.
>> >
>> > No we dont have a custom news viewer view and we're (still!) using
>> > these versions:
>> > Zope 2.3.7
>> > Silva 1.5.9
>> > SilvaLayout 0.5.9
>> >
>> > But why when the viewer resides in Publication A should it be trying
>> > to use the layout from Publication B? It seems that the location of
>> > the viewer is doesn't have any bearing on what layout to use, whereas
>> > the location of the articles changes the context.
>> >
>> > Cheers
>> >
>> > Jon
>> >
>> > 2008/10/7 Andy Altepeter <aaltepet at altepeter.net>:
>> >> Hi Jon,
>> >>
>> >> Sorry, I've been meaning to respond to this. I've seen some reports in
>> >> launchpad that are similar to yours, at least in respect to displaying
>> >> information in one publication with one layout that is housed in another
>> >> publication with a separate layout.
>> >>
>> >> I think this might be tricky to diagnose. It's possible that during the
>> >> filtering process, the skin/layout is changed from layout A to layout B.
>> >>
>> >> The error is from context/@@slms_tabs; context doesn't have the
>> >> attribute (view) @@slms_tabs. So, what is the context? Did the context
>> >> change to be (for example) a news item in publication B?
>> >>
>> >> Do you have a custom news viewer view? And what versions of
>> >> Silva/Zope/SilvaLayout are you using?
>> >>
>> >> I don't have time this week, but next week I'll setup a local test of
>> >> this. If you have a custom news viewer public view and could share it
>> >> with me, that would be very helpful.
>> >>
>> >> Andy
>> >>
>> >> On Monday 06 October 2008 05:17:15 am Jonathan Bowlas wrote:
>> >>> Any chance of getting a hint re a solution for this?
>> >>>
>> >>> Cheers
>> >>>
>> >>> Jon
>> >>>
>> >>> ---------- Forwarded message ----------
>> >>> From: Jonathan Bowlas <j.bowlas at ucl.ac.uk>
>> >>> Date: 2008/10/2
>> >>> Subject: News viewers bug with silvaLayout, maybe?
>> >>> To: silva-general at lists.infrae.com
>> >>>
>> >>>
>> >>> Hi
>> >>>
>> >>> We're experiencing a slight problem with Silva layouts and news
>> >>> viewers, let me explain:
>> >>>
>> >>> I have the following set up:
>> >>>
>> >>> Publication A
>> >>> (layout A)
>> >>> News Publication A
>> >>> News Viewer A
>> >>> News Filter A
>> >>> Publication B
>> >>> (layout B)
>> >>> News Publication B
>> >>>
>> >>> In this scenario News Filter A is set to filter news articles from 2
>> >>> sources, News Publication A & News Publication B, and News viewer A is
>> >>> set to display News Filter A. However when the view is called on the
>> >>> News Viewer A whilst it uses layout A it returns an error that it
>> >>> cannot find a component of layout A so one can only assume that its
>> >>> looking within layout B. Which is incorrect as I want the viewer to
>> >>> render using layout A, but it seems to use a combination of both
>> >>> layouts.
>> >>>
>> >>> Is there a solution to this?
>> >>>
>> >>> Here is the traceback:
>> >>>
>> >>> Traceback (innermost last):
>> >>> Module ZPublisher.Publish, line 114, in publish
>> >>> Module ZPublisher.mapply, line 88, in mapply
>> >>> Module ZPublisher.Publish, line 40, in call_object
>> >>> Module Products.Five.browser.metaconfigure, line 451, in __call__
>> >>> Module Shared.DC.Scripts.Bindings, line 311, in __call__
>> >>> Module Shared.DC.Scripts.Bindings, line 348, in _bindAndExec
>> >>> Module Products.PageTemplates.PageTemplateFile, line 110, in _exec
>> >>> Module Products.PTProfiler.ProfilerPatch, line 83, in
>> >>> __patched_render__ Module Products.PageTemplates.PageTemplate, line
>> >>> 104, in pt_render - <ImplicitAcquirerWrapper object at 0xb07b9a4c>
>> >>> Module TAL.TALInterpreter, line 206, in __call__
>> >>> Module TAL.TALInterpreter, line 250, in interpret
>> >>> Module TAL.TALInterpreter, line 690, in do_defineMacro
>> >>> Module TAL.TALInterpreter, line 250, in interpret
>> >>> Module TAL.TALInterpreter, line 677, in do_condition
>> >>> Module TAL.TALInterpreter, line 250, in interpret
>> >>> Module TAL.TALInterpreter, line 426, in do_optTag_tal
>> >>> Module TAL.TALInterpreter, line 411, in do_optTag
>> >>> Module TAL.TALInterpreter, line 406, in no_tag
>> >>> Module TAL.TALInterpreter, line 250, in interpret
>> >>> Module TAL.TALInterpreter, line 742, in do_defineSlot
>> >>> Module TAL.TALInterpreter, line 250, in interpret
>> >>> Module TAL.TALInterpreter, line 426, in do_optTag_tal
>> >>> Module TAL.TALInterpreter, line 411, in do_optTag
>> >>> Module TAL.TALInterpreter, line 406, in no_tag
>> >>> Module TAL.TALInterpreter, line 250, in interpret
>> >>> Module Products.Silva.monkey, line 19, in silva_do_insertStructure_tal
>> >>> Module Products.PageTemplates.TALES, line 221, in evaluate
>> >>> - URL: index
>> >>> - Line 42, Column 20
>> >>> - Expression: standard:'context/@@slms_tabs'
>> >>> - Names:
>> >>> {'container': <Silva Folder instance slms-news>,
>> >>> 'context': <Silva Folder instance slms-news>,
>> >>> 'default': <Products.PageTemplates.TALES.Default instance at
>> >>> 0xb744c7cc>, 'here': <Silva Folder instance slms-news>,
>> >>> 'loop': <Products.PageTemplates.TALES.SafeMapping object at
>> >>> 0xab0e0a4c>, 'modules':
>> >>> <Products.PageTemplates.ZRPythonExpr._SecureModuleImporter instance at
>> >>> 0xb73df6ec>,
>> >>> 'nothing': None,
>> >>> 'options': {'args': (<Products.Five.metaclass.SimpleViewClass
>> >>> from
>> >>> /data/Zope/instance7/Products/UCLSLMSLayout/browser/slms_renderer.pt
>> >>> object at 0xb07b0a4c>,)},
>> >>> 'repeat': <Products.PageTemplates.TALES.SafeMapping object at
>> >>> 0xab0e0a4c>,
>> >>> 'request': <HTTPRequest,
>> >>> URL=http://www.ucl.ac.uk/silva/slms/slms-news/index.html>,
>> >>> 'root': <Application at >,
>> >>> 'template': <ImplicitAcquirerWrapper object at 0xb07b9a4c>,
>> >>> 'traverse_subpath': [],
>> >>> 'user': Anonymous User,
>> >>> 'view': <Products.Five.metaclass.SimpleViewClass from
>> >>> /data/Zope/instance7/Products/UCLSLMSLayout/browser/slms_renderer.pt
>> >>> object at 0xb07b0a4c>,
>> >>> 'views': <zope.app.pagetemplate.viewpagetemplatefile.ViewMapper
>> >>> object at 0xaafad84c>}
>> >>> Module Products.PTProfiler.ProfilerPatch, line 32, in __patched_call__
>> >>> Module Products.PageTemplates.Expressions, line 185, in __call__
>> >>> Module Products.PageTemplates.Expressions, line 173, in _eval
>> >>> Module Products.PageTemplates.Expressions, line 127, in _eval
>> >>> - __traceback_info__: context
>> >>> Module Products.Five.browser.TrustedExpression, line 68, in
>> >>> trustedTraverse - __traceback_info__: ([], '@@slms_tabs')
>> >>> Module Products.Five.traversable, line 100, in __bobo_traverse__
>> >>> AttributeError: @@slms_tabs
>> >>>
>> >>>
>> >>> In this case slms_tabs is located inside layout A but not in Layout B.
>> >>>
>> >>> Cheers
>> >>>
>> >>> Jon
>> >>>
>> >>> _______________________________________________
>> >>> silva-general mailing list
>> >>> silva-general at lists.infrae.com
>> >>> https://lists.infrae.com/mailman/listinfo/silva-general
>
>
>
> _______________________________________________
> silva-general mailing list
> silva-general at lists.infrae.com
> https://lists.infrae.com/mailman/listinfo/silva-general
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testinginv.zexp
Type: application/octet-stream
Size: 24099 bytes
Desc: not available
Url : http://lists.infrae.com/pipermail/silva-general/attachments/20081014/3ae64d49/attachment-0002.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: content_includer_box.zexp
Type: application/octet-stream
Size: 7638 bytes
Desc: not available
Url : http://lists.infrae.com/pipermail/silva-general/attachments/20081014/3ae64d49/attachment-0003.obj
More information about the silva-general
mailing list