You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Juerg Meier <jc...@proxymit.net> on 2008/09/16 23:44:14 UTC
:operation=delete
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
Re: :operation=delete
Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,
On Tue, Sep 16, 2008 at 11:44 PM, Juerg Meier <jc...@proxymit.net> 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
Re: :operation=delete
Posted by Juerg Meier <jc...@proxymit.net>.
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 <mm...@day.com> 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
Re: :operation=delete
Posted by Juerg Meier <jc...@proxymit.net>.
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 <
> bdelacretaz@apache.org> wrote:
>
> > On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <mm...@day.com> 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
> >
>
>
>
Re: :operation=delete
Posted by Michael Marth <mm...@day.com>.
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 <
bdelacretaz@apache.org> wrote:
> On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <mm...@day.com> 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/
Re: :operation=delete
Posted by Bertrand Delacretaz <bd...@apache.org>.
On Wed, Sep 17, 2008 at 8:59 AM, Michael Marth <mm...@day.com> 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
Re: :operation=delete
Posted by Michael Marth <mm...@day.com>.
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 <jc...@proxymit.net> 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/