Thanks Branden (and Bert)!

Branden your tips for returning items worked on 1.1 and 1.3 and your
tip on retrieving version content on 1.3...seems like something
changed tho between 1.1 and 1.3 because retrieving version content
with an URL in that form returns a 500 in 1.1, as per below.

Any ideas on a URL to retrieve version content in 1.1? Sorry to be
asking about old versions...

Internal Server Error (500)

The requested URL /p/m5g95Ejui/id1995724.version.,1.1,.json resulted
in an error in org.sakaiproject.nakamura.version.impl.GetVersionServlet.

Exception:

java.lang.NullPointerException
        at 
org.sakaiproject.nakamura.version.impl.jcr.GetVersionServletHandler.doGet(GetVersionServletHandler.java:90)
        at 
org.sakaiproject.nakamura.api.resource.SafeMethodsHandlingServlet.doGet(SafeMethodsHandlingServlet.java:57)
        at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.mayService(SlingSafeMethodsServlet.java:268)
        at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:344)
        at 
org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:375)
        at 
org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)
        at 
org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProcessorImpl.java:273)
        at 
org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:49)
        at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
        at 
org.sakaiproject.nakamura.batch.RequestEventsFilter.doFilter(RequestEventsFilter.java:96)
        at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
        at 
org.sakaiproject.nakamura.http.usercontent.UserContentFilter.doFilter(UserContentFilter.java:71)
        at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
        at 
org.sakaiproject.nakamura.cluster.ClusterTrackingFilter.doFilter(ClusterTrackingFilter.java:86)
        at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
        at 
com.rsmart.oae.registration.bundle.RegistrationFilter.doFilter(RegistrationFilter.java:89)
        at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
        at 
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgressTrackerLogFilter.java:59)
        at 
org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
        at 
org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcessorImpl.java:163)
        at 
org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:187)
        at 
org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:96)
        at 
org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)
        at 
org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java:42)
        at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:49)
        at 
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at 
org.sakaiproject.nakamura.lite.http.SparseSessionTrackerImpl.doFilter(SparseSessionTrackerImpl.java:78)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
        at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
        at 
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at 
org.sakaiproject.nakamura.http.cache.CacheControlFilter.doFilter(CacheControlFilter.java:181)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
        at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
        at 
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at 
org.sakaiproject.nakamura.user.CaseInsensitiveAuthFilter.doFilter(CaseInsensitiveAuthFilter.java:84)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
        at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
        at 
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at 
org.sakaiproject.nakamura.http.usercontent.SafeHostFilter.doFilter(SafeHostFilter.java:87)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
        at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
        at 
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at 
org.sakaiproject.nakamura.http.qos.QoSFilter.doFilter(QoSFilter.java:165)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)
        at 
org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)
        at 
org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFilterChain.java:47)
        at 
org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.java:33)
        at 
org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java:48)
        at 
org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)
        at 
org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
        at 
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:390)
        at 
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
        at 
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
        at 
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
        at org.mortbay.jetty.Server.handle(Server.java:326)
        at 
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
        at 
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:926)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
        at 
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:410)
        at 
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
Request Progress:

      0 (2012-09-11 09:45:42) TIMER_START{Request Processing}
      0 (2012-09-11 09:45:42) COMMENT timer_end format is {<elapsed
msec>,<timer name>} <optional message>
      0 (2012-09-11 09:45:42) LOG Method=GET,
PathInfo=/p/m5g95Ejui/id1995724.version.,1.1,.json
      0 (2012-09-11 09:45:42) TIMER_START{ResourceResolution}
     43 (2012-09-11 09:45:42) TIMER_END{43,ResourceResolution}
URI=/p/m5g95Ejui/id1995724.version.,1.1,.json resolves to
Resource=NonExistingResource,
path=/p/m5g95Ejui/id1995724.version.,1.1,.json
     43 (2012-09-11 09:45:42) LOG Resource Path Info:
SlingRequestPathInfo:
path='/p/m5g95Ejui/id1995724.version.,1.1,.json',
selectorString='version.,1.1,', extension='json', suffix='null'
     43 (2012-09-11 09:45:42) TIMER_START{ServletResolution}
     43 (2012-09-11 09:45:42)
TIMER_START{resolveServlet(NonExistingResource,
path=/p/m5g95Ejui/id1995724.version.,1.1,.json)}
     49 (2012-09-11 09:45:42)
TIMER_END{6,resolveServlet(NonExistingResource,
path=/p/m5g95Ejui/id1995724.version.,1.1,.json)} Using servlet
org.sakaiproject.nakamura.version.impl.GetVersionServlet
     49 (2012-09-11 09:45:42) TIMER_END{6,ServletResolution}
URI=/p/m5g95Ejui/id1995724.version.,1.1,.json handled by
Servlet=org.sakaiproject.nakamura.version.impl.GetVersionServlet
     49 (2012-09-11 09:45:42) LOG Applying Requestfilters
     49 (2012-09-11 09:45:42) LOG Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
     49 (2012-09-11 09:45:42) LOG Calling filter:
com.rsmart.oae.registration.bundle.RegistrationFilter
     49 (2012-09-11 09:45:42) LOG Calling filter:
org.sakaiproject.nakamura.cluster.ClusterTrackingFilter
     49 (2012-09-11 09:45:42) LOG Calling filter:
org.sakaiproject.nakamura.http.usercontent.UserContentFilter
     49 (2012-09-11 09:45:42) LOG Calling filter:
org.sakaiproject.nakamura.batch.RequestEventsFilter
     49 (2012-09-11 09:45:42)
TIMER_START{org.sakaiproject.nakamura.version.impl.GetVersionServlet#0}
     50 (2012-09-11 09:45:42)
TIMER_END{1,org.sakaiproject.nakamura.version.impl.GetVersionServlet#0}
     51 (2012-09-11 09:45:42)
TIMER_START{handleError:throwable=java.lang.NullPointerException}
     56 (2012-09-11 09:45:42)
TIMER_END{5,handleError:throwable=java.lang.NullPointerException}
Using handler 
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
     57 (2012-09-11 09:45:42) TIMER_END{57,Request Processing} Dumping
SlingRequestProgressTracker Entries
ApacheSling/2.2 (Java HotSpot(TM) 64-Bit Server VM 1.6.0_30; Linux
3.2.12-3.2.4.amzn1.x86_64 amd64)

On Tue, Sep 11, 2012 at 8:25 AM, Branden Visser <[email protected]> wrote:
> Hi Nate,
>
> Re: Getting more versions
>
> There is an 'items' and a 'page' parameter that can be used, but the
> paging doesn't seem to work, so I would avoid including it. You
> *should* be able to use 'items' parameter to increase the default of
> 25 to a larger number:
>
> https://qa20-us.sakaiproject.org:8088/p/m4wk5JRaa/id6046207.versions.tidy.json?items=100&_charset_=utf-8&_=1347375891273
>
> Re: Getting content for those versions
>
> Any version should be accessible using the "1.X" version number within
> the selector. Please note the commas wrapped around the version id:
>
> https://qa20-us.sakaiproject.org:8088/p/m4wk5JRaa/id6046207.version.,1.1,.tidy.json?&_charset_=utf-8&_=1347375891273
>
> Any kind of graceful restoring or proper paging here would be need to
> be done as part of the ticket that Bert created. I'll add this info in
> there.
>
> Hope that helps,
> Branden
>
> On Tue, Sep 11, 2012 at 10:10 AM, Nate Angell <[email protected]> wrote:
>> Thanks Bert, it all makes sense now.
>>
>> Is there a curl command one could use to manually view the metadata and/or
>> content of earlier versions for support purposes?
>>
>> = nate
>>
>> On Sep 11, 2012, at 2:18 AM, Bert Pareyn <[email protected]> wrote:
>>
>> Hi Nate,
>>
>> The _previousVersion value has never been used to determine the version
>> order. Instead we use the '1.20' notation you'll see coming back in the feed
>> as well.
>> Only 25 items returning without an option to page is a backend bug and I
>> created a ticket for it at KERN-3168.
>> We probably still want to limit the feed to 25 items but make the UI able to
>> page through the versions.
>>
>> Hope that helps,
>> - Bert
>>
>> On 11 Sep 2012, at 02:10, Nate Angell <[email protected]> wrote:
>>
>> Bert/Mark:
>>
>> Following up on your earlier versions curiosity posts ;)
>>
>> Do either of you know how to view what I'm thinking are "hidden"
>> versions of a sakaidoc?
>>
>> For example, a URL like
>> https://domain.tld/p/m5g95Ejui/id1995724.versions.json
>>
>> Returns what looks like the most recent 25 of 37 total saved versions,
>> as per below. I'm trying to view versions 1.11 and previous. I see
>> that v1.12 has _previousVersion of c2AqMPeXEeGwBzG0CjQLZA+, but I
>> can't figure out how to get to it.
>>
>> {
>> "items":
>> 25,
>> "path":
>> "m5g95Ejui/id1995724",
>> "total":
>> 37,
>> "versions":
>> {
>> "1.12":
>> {
>> "_created":
>> 1346787259428,
>> "_createdBy":
>> "User",
>> "_id":
>> "gyBMwPeXEeGwBzG0CjQLZA+",
>> "_lastModified":
>> 1346876590893,
>> "_lastModifiedBy":
>> "User",
>> "_nextVersion":
>> "iWKgEPeXEeGwBzG0CjQLZA+",
>> "_path":
>> "m5g95Ejui/id1995724",
>> "_previousVersion":
>> "c2AqMPeXEeGwBzG0CjQLZA+",
>> "_readOnly":
>> "Y",
>> "_versionHistoryId":
>> "isyt4PbHEeGqNrbsCjQLZQ+",
>> "_versionNumber":
>> 1346876601489,
>> "page":
>> "<p>content<\/p>",
>> "versionId":
>> "gyBMwPeXEeGwBzG0CjQLZA+"
>> },
>> "1.13":
>> {
>> etc...
>>
>> = nate
>>
>> On Wed, Jun 6, 2012 at 2:38 AM, Mark Triggs <[email protected]> wrote:
>>
>> Hi Bert,
>>
>> Yep, exactly--that neatly summarises what I'm seeing.  If this is the
>> expected behaviour then I'm happy and can work with it.
>>
>> Thanks,
>>
>> Mark
>>
>>
>> Bert Pareyn <[email protected]> writes:
>>
>> Hey Mark,
>>
>> If I'm reading this correctly I'd say this is expected behaviour.
>> From the moment you upload a new version the data that's set on the current
>> version will be stored, the data that's set after that upload will not be
>> applied to that created version.
>> Further break down of your workflow:
>>
>> - Upload new version through add content widget, creates version 1.0 and
>> sets the description to 'V1';
>> - Upload second version, this takes description 'V1' and creates version
>> 1.1. Afterwards you change the description to 'V2';
>> - Upload a third version, this takes description 'V2' and applies it to 1.2.
>>
>> Results:
>>
>> - 1.0 has description of V1
>> - 1.1 has description of V1
>> - 1.2 has description of V2
>>
>> So, in short, users would have to change their description to 'V2', 'V3',
>> etc. prior to uploading a new version.
>>
>> Hope to help (and make sense)
>> - Bert
>>
>>
>> --
>> Mark Triggs
>> <[email protected]>
>> _______________________________________________
>> oae-dev mailing list
>> [email protected]
>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>
>> _______________________________________________
>> oae-dev mailing list
>> [email protected]
>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>
>>
>>
>> _______________________________________________
>> oae-dev mailing list
>> [email protected]
>> http://collab.sakaiproject.org/mailman/listinfo/oae-dev
>>
_______________________________________________
oae-dev mailing list
[email protected]
http://collab.sakaiproject.org/mailman/listinfo/oae-dev

Reply via email to