mulesoft / api-designer

A web editor for creating and sharing RAML API specifications
Other
1.07k stars 266 forks source link

Cannot delete empty folder #310

Closed brentryan closed 8 years ago

brentryan commented 9 years ago

I have an empty folder in the designer that I can't delete. When I select delete it gives me an error "The file cannot be deleted" and the folder disappears. But if you refresh it comes back.

dmartinezg commented 9 years ago

Thanks @brentryan, we'll take a look.

sichvoge commented 9 years ago

Can't happen to reproduce that. It has been the same just once for me, but then trying to reproduce it couple of time - nothing. :/

@brentryan can you try again with the current master and let us know if you have the same problem!

brentryan commented 9 years ago

@sichvoge I just tried this again and got the error

Bad Request

This file cannot be deleted

I did this within api designer here https://anypoint.mulesoft.com/apiplatform/brentryan/admin/#/organizations/1e4c4284-702e-421f-a318-10625ed74a45/dashboard/apis/16831/versions/17965/designer#answers

I have an empty folder that I'm trying to delete, but can't....

greg-hornby-roam commented 8 years ago

I'm having this issue too... And this post was a year ago

sichvoge commented 8 years ago

Are you using the master version here on Github or the one hosted on the Anypoint Platform? Using the hosted solution, I cannot reproduce it anymore.

Steps in the Anypoint Platform:

  1. Create a new API
  2. Navigate to the API Designer (at this point you should have one single file)
  3. Create new folder called "empty"
  4. Delete folder
  5. folder disappears
  6. refresh
  7. folder still deleted
sichvoge commented 8 years ago

Same with the standalone version. :(

greg-hornby-roam commented 8 years ago

The one hosted on AnyPoint.

  1. Create folder
  2. Add raml file to the folder with the version and a title. It'll give an error saying the file doesn't exist.
  3. Refresh page. The error is gone
  4. Delete the folder. It'll error but disappear
  5. Refresh the page, folder is still there, it is now empty, but cannot be deleted. Keeps giving error

Can rename the folder, so I tried renaming it then deleting it but that gives the same error.

sichvoge commented 8 years ago

I can confirm the very strange error in step 2, but not the others. Recorded it. Here's the gif.

aodjy1tenw

sichvoge commented 8 years ago

This strangely happened to me today :D But there was no way to replicate it.

greg-hornby-roam commented 8 years ago

Hasn't happened to me in a while now, but I still export my project as a backup if I'm moving files from one folder to another just in case

sichvoge commented 8 years ago

It really seems to happen randomly. :(

carowright commented 8 years ago

Already fixed in develop branch. Will be released in next version.