Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Error when viewing news items in Plone 4.0
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Dieter Maurer  
View profile  
 More options Jul 12 2011, 1:24 am
From: "Dieter Maurer" <die...@handshake.de>
Date: Tue, 12 Jul 2011 07:24:44 +0200
Local: Tues, Jul 12 2011 1:24 am
Subject: Re: [Plone-Users] Error when viewing news items in Plone 4.0
Børge Kjeldstad wrote at 2011-7-11 23:41 +0200:

> ...
>Then I opened the file
>/usr/local/plone4/buildout-cache/eggs/plone.folder-1.0-py2.6.egg/plone/fol der/unordered.py

>And that is my old friend that returned "None". It's content is:

>from Acquisition import aq_base
>from zope.interface import implements
>from zope.component import adapts
>from plone.folder.interfaces import IOrdering, IOrderableFolder

>class UnorderedOrdering(object):
>     """ This implementation provides no ordering. """
>     implements(IOrdering)
>     adapts(IOrderableFolder)

> ...

>     def getObjectPosition(self, id):
>         return None

>...end of file...

Indeed, there you are.

It shows that Plone's "nextprevious" has a weakness: it should
automatically handle "unordered" folders -- and for the moment fails
to do so. But you have already filed a bug report for this.

Note: an important issue with debugging is when to use "next"
(step over call) and "step" (step into call). You use next to step
over calls that are unlikely to contribute to the analysis of
the current problem. Infrastructure calls (such as adapter lookups)
fall under this category. You use "step" to find out about details
in the called function.
Often, you must step into a function ("getId" in your example) even
when you do not really want to (e.g. when the uninteresting call
is on the same line as an interesting one). In this case,
you can use "return" to quickly leave the called function again.
Things like this will get optimized with experience.

--
Dieter

--------------------------------------------------------------------------- ---
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Plone-Users mailing list
Plone-Us...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-users


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.