:operation=delete

classic Classic list List threaded Threaded
7 messages Options
JCR
Reply | Threaded
Open this post in threaded view
|

:operation=delete

JCR
Hi all,

I send a POST with :operation=delete as hidden input field to a
resource, and it returns with http 200 OK. But the node is still there.
This also happens when using curl according to the doc

        $ curl -F":operation=delete" http://host/content/sample

Again, 200, but node remains in its place. Has the syntax changed
meanwhile?

Thanks,
Juerg


Reply | Threaded
Open this post in threaded view
|

Re: :operation=delete

Michael Marth
Hi Juerg,

are you using the latest Sling or the version bundled with CRX Quickstart? I
think in the latter :operation=delete does not work, unfortunately.

Michael

On Tue, Sep 16, 2008 at 11:44 PM, Juerg Meier <[hidden email]> wrote:

> Hi all,
>
> I send a POST with :operation=delete as hidden input field to a
> resource, and it returns with http 200 OK. But the node is still there.
> This also happens when using curl according to the doc
>
>        $ curl -F":operation=delete" http://host/content/sample
>
> Again, 200, but node remains in its place. Has the syntax changed
> meanwhile?
>
> Thanks,
> Juerg
>
>


--
Michael Marth | Day JCR Cup 08 | Win a MacBook Pro: http://dev.day.com/
Reply | Threaded
Open this post in threaded view
|

Re: :operation=delete

Bertrand Delacretaz
In reply to this post by JCR
Hi,

On Tue, Sep 16, 2008 at 11:44 PM, Juerg Meier <[hidden email]> wrote:
> ...Again, 200, but node remains in its place. Has the syntax changed
> meanwhile?...

>From the top of my head, what you're doing should work.

The Whole Truth will be told by the tests as usual, in this case that's
launchpad/testing/src/test/java/org/apache/sling/launchpad/webapp/integrationtest/servlets/post/PostServletDeleteTest.java

The tests there should help you find out what's happening.

-Bertrand

Reply | Threaded
Open this post in threaded view
|

Re: :operation=delete

Bertrand Delacretaz
In reply to this post by Michael Marth
On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <[hidden email]> wrote:
> ...are you using the latest Sling or the version bundled with CRX Quickstart? I
> think in the latter :operation=delete does not work, unfortunately...

I checked the CRX quickstart jar file at [1], and it uses Sling code
from 2008-05-13.

At that time the syntax was different, to delete /foo you'd do

 curl -F :delete=/foo http://admin:admin@localhost:7402/foo

That works for me against that Sling instance.

Hope this helps,
-Bertrand

[1] http://dev.day.com/microsling/content/blogs/cup/downloads.c.html

Reply | Threaded
Open this post in threaded view
|

Re: :operation=delete

Michael Marth
Hi Juerg,

alternatively, you can update your CRX Quickstart (see [1] for a how-to)

hth
Michael

[1] http://dev.day.com/microsling/content/blogs/main/updatecrxqs.html

On Wed, Sep 17, 2008 at 11:50 AM, Bertrand Delacretaz <
[hidden email]> wrote:

> On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <[hidden email]> wrote:
> > ...are you using the latest Sling or the version bundled with CRX
> Quickstart? I
> > think in the latter :operation=delete does not work, unfortunately...
>
> I checked the CRX quickstart jar file at [1], and it uses Sling code
> from 2008-05-13.
>
> At that time the syntax was different, to delete /foo you'd do
>
>  curl -F :delete=/foo http://admin:admin@localhost:7402/foo
>
> That works for me against that Sling instance.
>
> Hope this helps,
> -Bertrand
>
> [1] http://dev.day.com/microsling/content/blogs/cup/downloads.c.html
>



--
Michael Marth | Day JCR Cup 08 | Win a MacBook Pro: http://dev.day.com/
JCR
Reply | Threaded
Open this post in threaded view
|

Re: :operation=delete

JCR
In reply to this post by Bertrand Delacretaz
Thanks Bertrand, worked perfectly!

But let me say here, the new approach is definitely more elegant.

-- Juerg

On Wed, 2008-09-17 at 11:50 +0200, Bertrand Delacretaz wrote:

> On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <[hidden email]> wrote:
> > ...are you using the latest Sling or the version bundled with CRX Quickstart? I
> > think in the latter :operation=delete does not work, unfortunately...
>
> I checked the CRX quickstart jar file at [1], and it uses Sling code
> from 2008-05-13.
>
> At that time the syntax was different, to delete /foo you'd do
>
>  curl -F :delete=/foo http://admin:admin@localhost:7402/foo
>
> That works for me against that Sling instance.
>
> Hope this helps,
> -Bertrand
>
> [1] http://dev.day.com/microsling/content/blogs/cup/downloads.c.html


JCR
Reply | Threaded
Open this post in threaded view
|

Re: :operation=delete

JCR
In reply to this post by Michael Marth
Michael, thanks for the link, but I have to take the YMMV risk a little
bit later.

-- Juerg


On Wed, 2008-09-17 at 17:30 +0200, Michael Marth wrote:

> Hi Juerg,
>
> alternatively, you can update your CRX Quickstart (see [1] for a how-to)
>
> hth
> Michael
>
> [1] http://dev.day.com/microsling/content/blogs/main/updatecrxqs.html
>
> On Wed, Sep 17, 2008 at 11:50 AM, Bertrand Delacretaz <
> [hidden email]> wrote:
>
> > On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <[hidden email]> wrote:
> > > ...are you using the latest Sling or the version bundled with CRX
> > Quickstart? I
> > > think in the latter :operation=delete does not work, unfortunately...
> >
> > I checked the CRX quickstart jar file at [1], and it uses Sling code
> > from 2008-05-13.
> >
> > At that time the syntax was different, to delete /foo you'd do
> >
> >  curl -F :delete=/foo http://admin:admin@localhost:7402/foo
> >
> > That works for me against that Sling instance.
> >
> > Hope this helps,
> > -Bertrand
> >
> > [1] http://dev.day.com/microsling/content/blogs/cup/downloads.c.html
> >
>
>
>