0

We've just followed this: https://github.com/2sic/2sxc/wiki/Html-Js-Command-Delete

But the delete command gives an error in F12: ../DesktopModules/2sxc/API/app-content/any/2fc3e603-a0f1-403d-a5ff-cc1cbf4ccb8e 405 (Method Not Allowed)

So is there something we have missed Daniel?

MBouwman
  • 43
  • 8
  • So those instructions are necessary so the toolbar gives you the buttons. If that works, you're doing well. Now apparently you're running into some kind of issue that I'm not aware of. My guess is it's either some http-filter preventing the command - pls check if it's doing a GET or DELETE - or the code is running, but finds an issue - check the DNN site-logs. Then post your findings. – iJungleBoy Nov 27 '18 at 08:49
  • Ok, just checked this is what it looks like in F12/Developers tools: DELETE https://www.websitename.nl/DesktopModules/2sxc/API/app-content/any/3289bb25-d49e-4c05-9980-b55a0bc7fdbb 405 (Method Not Allowed) send @ jquery.js?cdv=107:8526 ajax @ jquery.js?cdv=107:7978 t.request @ ToSic.Sxc.WebApi.ts:101 t.delete @ ToSic.Sxc.WebApi.ts:51 (anonymous) @ item-commands.ts:23 delete @ item-commands.ts:22 code @ delete.ts:31 e.run @ engine.ts:94 e.detectParamsAndRun @ engine.ts:44 (anonymous) @ Cms.ts:41 e.do @ Cms.ts:52 e.run @ Cms.ts:40 t.run @ instance-engine.ts:14 onclick... – MBouwman Nov 27 '18 at 16:10
  • It might be that the entity still is linked with some other entity. We're kind of looking to do a force-delete from the template – MBouwman Nov 27 '18 at 16:11
  • My guess is that your web.config forbids the verb DELETE. Could you check? – iJungleBoy Nov 28 '18 at 09:24
  • Actually, DELETE was allowed, well, kind of.... If you google for the 405 and the DELETE verb it gives some suggestions about disabling webdav, because webdav disables the DELETE verb by default so: does the trick.... – MBouwman Nov 29 '18 at 10:36
  • See here: https://stackoverflow.com/questions/15619075/webapi-delete-not-working-405-method-not-allowed – MBouwman Nov 29 '18 at 10:37
  • thanks. we'll probably change it in future to use a get or something. not as semantic :( but should have less side effects – iJungleBoy Nov 30 '18 at 11:24

1 Answers1

0

Is it possible you've bumped in to the same thing I did? Too much detail here in this Issue on GitHub/2sxc. In brief, if you got WebDav installed on the server, somehow it is interfering with the expected handler (extensionless). Anyhow, see if anything aligns... I hope this helps. Cheers!

Can't Delete Things - 2sxc Issue #2205

Jeremy Farrance
  • 536
  • 4
  • 7