[SOLVED] HOW TO - Delete badly named sites?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2014 08:49 AM
Hi all,
I have some bad data in repository (some share sites with url names that contains invalid characters) so now I am not able to delete those using UI. Is there way to delete or mark as deleted those nodes directly in database?
Thanks…
I have some bad data in repository (some share sites with url names that contains invalid characters) so now I am not able to delete those using UI. Is there way to delete or mark as deleted those nodes directly in database?
Thanks…
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2014 09:04 AM
No. You to delete the site through the Sites API.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-08-2014 09:09 AM
Hi mrogers,
thanks for your answer. But I can not do it using Sites API. For example my client has sites with invalid characters and because of it alfresco is not able to delete those ("a-z, A-Z, 0-9 and -" are valid characters for site URL name). So is there any other way to delete bad data from repository, if it is not possible using db?
Thanks…
thanks for your answer. But I can not do it using Sites API. For example my client has sites with invalid characters and because of it alfresco is not able to delete those ("a-z, A-Z, 0-9 and -" are valid characters for site URL name). So is there any other way to delete bad data from repository, if it is not possible using db?
Thanks…
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-09-2014 06:49 AM
Yes - you can do it directly in the database. But its high risk and be aware that you are bypassing business logic. Test it first!
Also be aware that you need to delete the contents of the site as well as the site itself.
You can delete it through the java API. You just need to suspend the policy that prevents deletion of a site. Look at the SiteServiceImpl to see how the site service does it.
Also be aware that you need to delete the contents of the site as well as the site itself.
You can delete it through the java API. You just need to suspend the policy that prevents deletion of a site. Look at the SiteServiceImpl to see how the site service does it.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-14-2014 05:11 AM
Hi mrogers,
you are right. I am able to delete wrongly named sites using Java API (SiteService#deleteSite()). In that method, aspect that marks node as undeletable had been removed before site has been deleted. It was not possible to delete those sites from UI because this method in SiteService is not invoked at all because execution of the code was stopped with exception somewhere before in JavaScript.
Once again thanks a lot…
you are right. I am able to delete wrongly named sites using Java API (SiteService#deleteSite()). In that method, aspect that marks node as undeletable had been removed before site has been deleted. It was not possible to delete those sites from UI because this method in SiteService is not invoked at all because execution of the code was stopped with exception somewhere before in JavaScript.
Once again thanks a lot…
