Closed (fixed)
Project:
Hosting
Version:
6.x-0.4-alpha3
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Sep 2010 at 02:00 UTC
Updated:
12 Jun 2014 at 08:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedThis is generated on hosting_context_register, and we remove the hosting_context for items that are deleted, and so we should.
So I guess our ajaxy refresh stuff needs modification, to refresh and take us back to the node itself and not the alias.
... or can we just get rid of the aliases altogether? :)
Alternatively we can just not delete the url_alias on hosting_context_delete(): granted that leaves some cruft in the database, but I'd prefer cruft than 404s.
Comment #2
helmo commentedJust for completeness this also happens when a platform is deleted. And probably also when a server is deleted.
It would be nice to get a confirmation on this page something like: "The [site|platform|server] has been deleted."
Either that or redirect the user to a listing page, e.g. the list of sites, platforms or servers.
But such a redirect could also cause more confusion.
Comment #3
helmo commentedMarked #922538: Deleting Sites / Platforms results in 404 as duplicate of this issue.
Comment #4
Anonymous (not verified) commentedComment #5
joestewart commentedHow about just leaving the alias alone since the node isn't deleted?
git format-patch style patch for 7.x-2.x attached for review.
Comment #6
helmo commented@joestewart: Wouldn't that land you on the site node page of the site you just deleted?
There would have to be a very clear visual indication that the site no longer exists.
Comment #7
Anonymous (not verified) commentedThat's what used to happen anyway. The only indication was the 'Status' in the info within the node body. Maybe we need a drupal_set_message() or something on sites that are considered deleted, or a css change of some description.
Comment #8
helmo commentedA drupal_set_message() would be a nice way to report the results of a delete action after a redirect to a listing page.
For the old site node, that has status "deleted", a drupal_set_message() would be less appropriate.
Marking the text "deleted" bold and/or red might be a way to make that clear.
Comment #9
joestewart commentedThanks. I'm going to put this back to needs review since the patch fixes the regression. This returns to the previous behavior without error.
Maybe some change in display/notification is needed other than the "Status: Deleted" that is already shown. But it seems beyond a simple fix. As skwashd noted in #922538: Deleting Sites / Platforms results in 404 the javascript in hostingTaskListRefreshCallback is where the reload happens.
Comment #10
anarcat commentedI agree. Can anybody confirm this is not breaking anything else? I'm especially concerned about removing the context but *not* the alias...
Comment #11
joestewart commentedJust to be clear, we are referring to path alias and not drush alias. The node still exists, so why not be able to refer to it by it's url alias.
Comment #12
Anonymous (not verified) commentedI'll test this this week, I'd love to see it get into 1.2.
From memory there was some concern about leaving the alias in the db, something to do with if you add a new site with the same URL and whether there's some sort of clash there when the new context with the same name is created?
Comment #13
omega8cc commentedThe alias must be deleted to avoid collision when you will create the site with the same domain name again, so we can't use the patch from #5.
Comment #14
omega8cc commentedOr maybe we could force deletion of the old alias (if exists) when the site or platform is created? Then we could avoid deleting the alias when the site/platform is deleted.
Comment #15
joestewart commentedSorry I can't duplicate any problems whether recreating a site on the same platform, different platform, nor creating another platform with the same name as the deleted platform.
Thanks for the review.
Comment #16
omega8cc commentedMy bad, I didn't try the patch, so maybe it works already as I expected. I will try it but for now I'm reverting the status.
Comment #17
Anonymous (not verified) commentedI tested this and was satisfied with the result. There is no unexpected behaviour (creating a new site with the same name) and the experience is a lot better than a 404.
Granted that when you create a new site, you lose the history of the previous site's node & tasks because it 'takes over', but that probably happened / happens already despite this bug. (Edit: it's not lost, it's just the alias takes over for the new node, and if you know the old site's nid, you can still see the history of ran tasks no problem)
I've committed this to the 6.x and 7.x branches.
Thanks Joe Stewart!
Comment #19
steven jones commentedSo I've worked on the proper fix for this one over here: #1256508: path aliases for deleted sites are not deleted should mean that you can easily access old sites as well as new ones!