Smartdoc - deleting method is not possible

Not applicable

When we try to delete a method in a model of a smartdoc it takes us to the detail page for the model. It seems that deleting a method through the smartdoc UI is broken. Is there a work around to this?

Solved Solved
0 18 491
2 ACCEPTED SOLUTIONS

Reposting from comment which resolved the issue,

@William K , Make sure node is deleted from Drupal content list. It might be of some other revision of same smartdoc model. Please navigate to admin/content page & delete it from there. Have a database backup before you do any changes.

Cheers,

Anil Sagar

View solution in original post

Not applicable

There is a bug in SmartDocs wherein attempting to delete a method which has not been rendered to a node fails. When this happens, the user is redirected to the detail page for the revision to which the method belongs. We are currently preparing a new Dev Portal release in which this issue is resolved.

I think this might address some (but possibly not all) of the questions in this thread.

View solution in original post

18 REPLIES 18

Not applicable

Hi José, you may want to try the management API for that. You can download the Postman collection here: https://community.apigee.com/questions/4449/are-there-any-management-apis-for-smartdocs-can-i.html

Thanks, this would most likely work. Is there a way to know if this is already a known bug of the drupal module? If not, where could I submit a bug?

Dear @José Cedeño ,

Couple of things here when we talk about delete smartdoc method. We need to delete method from API Modelling backend where the same has been stored when you import new model. You also need to delete Drupal Node to make sure it doesn't appear on UI of developer portal pages.

Above API helps you to delete method from api modelling backend in Apigee. You know the way to delete drupal nodes from one of the answer below.

Cheers,

Anil Sagar

Jose, the issue where the Delete button redirects to a detail page has been logged as DEVSOL-1655.

Stephen

Awesome, Thank you for quick action @sgilson .

Before I created a new thread in the forum, I want to make sure I understand this (because I might be facing a similar issue).

I have the SmartDoc JSON file that represents the latest revision of our model. I have removed a method from that file and then imported it as a new revision to the model. But no matter what I do, the method still shows up in the API "index" page (the listing of all methods).

I found that the method was still "published" in a previous revision. After un-publishing at that revision, I still see it. I then just deleted it from the old revision, but still I see it displayed.

I'm at a loss here and could use some guidance.

Dear @williamking , Do you see this issue as anonymous user or logged in user ? Did you clear Drupal Cache and see same issue ? Can you try clearing Drupal Page Cache ? You can clear cache either using drush or Admin Menu link under home icon -> Flush All Caches or Configuration -> Development -> Performance.

I see it as both logged in as an admin and logged in as a regular user. I just tried as an anon user and the result is the same.

Yes, I've cleared Drupal cache. I do not see how to clear a single page's cache beyond installing another module.

@William K , Make sure node is deleted from Drupal content list. It might be of some other revision of same smartdoc model. Please navigate to admin/content page & delete it from there. Have a database backup before you do any changes.

That resolved it @Anil Sagar. There were two nodes for that method listed in the content list. After I deleted them the method no longer displayed on the main page listing. Thanks!

Awesome, Glad issue is resolved 🙂 You can also click on accept link below the answer that i have posted. It will be helpful for others who are looking for same. Thank you 🙂

I think @José Cedeño has the ability to 'accept' since this is his thread.

We ran into this issue at well. The developer working on it at the time wasn't familiar with Drupal so didn't know he had to delete the drupal nodes by hand. We were only able to fix this problem because we had people familiar with Drupal 😞 .

Dear @José Cedeño , Agree, It should be ideally deleted with deletion of Revision. We will fix same in future releases of SmartDocs.

Reposting from comment which resolved the issue,

@William K , Make sure node is deleted from Drupal content list. It might be of some other revision of same smartdoc model. Please navigate to admin/content page & delete it from there. Have a database backup before you do any changes.

Cheers,

Anil Sagar

This is a good tip. The issue that I ran into and I mentioned in this post is that clicking on the "Delete" link under a method when viewing the smartdoc model (the smartdoc page and not the Drupal node for a method) just redirected me to a Drupal admin page instead of allowing us to delete the method.

Dear @José Cedeño ,

Agree, Delete should ideally delete the method in the smartdoc model. But , It deletes entire model as of today. Either we have to remove the delete to avoid confusion or give ability to delete method as well as respective node. Till we fix same please use above work around.

Cheers,

Anil Sagar

Not applicable

There is a bug in SmartDocs wherein attempting to delete a method which has not been rendered to a node fails. When this happens, the user is redirected to the detail page for the revision to which the method belongs. We are currently preparing a new Dev Portal release in which this issue is resolved.

I think this might address some (but possibly not all) of the questions in this thread.