- Issue created by @jeroen dost
- Merge request !17Issue-3480116-always-keep-homepage: Added functionality to .module file for... → (Open) created by divyansh.gupta
- 🇮🇳India divyansh.gupta Jaipur
Added the feature where it always keeps homepage, 403 and 404 and prevents them from being deleted as the site may crash if these important nodes are deleted.
- 🇩🇪Germany Anybody Porta Westfalica
This is really a nice idea! But implementation looks a bit hacky to me and I think this should be optional, so it would need a settings page to enable this functionality.
But just my 2 cents ;)
- 🇳🇱Netherlands joshahubbers
I agree that a setting should be preferrable to prevent unexpected functionality.
What I was wondering: the normal work of this module is a checkbox at the node page (I did not live test the module, but that's what I got from the documentation, correct me if I'm wrong). If this is the point, the checkbox should be checked and grayed out on the page that is set as homepage, 404 and 403 by default to keep consistency with the normal working way of this module.
A last point: is unpublishing of the page also prevented for these modules?
When these points are fixed, I think we can deprecate the prevent_homepage_deletion module in favour of this one.
- 🇮🇳India divyansh.gupta Jaipur
Hello @joshahubbers, @anybody
I proposed my solution as per the problem mentioned in the summary that if a page mentioned in system.site.yml is deleted than it may cause the site to break.
So as per your suggestions i will work and create a option to enable/disable this feature in settings form.
Also @joshahubbers i have not created any checks while unpublishing the pages mentioned in system.site.yml. - 🇳🇱Netherlands joshahubbers
Thank you! That's nice.
Maybe the check for unpublished should be a seperate ticket because it is new global functionality, don't you think? If so than I can create a new issue for that?
- 🇮🇳India divyansh.gupta Jaipur
Hello @joshahubbers,
I have applied the changes according to requirements and it would be a great idea to create a seperate issue for it.
Also if you think my work is correct and requires no changes according to this issue, can you please move my ticket to needs review. - 🇳🇱Netherlands joshahubbers
Hi @divyansh.gupta,
you said in #7:
So as per your suggestions i will work and create a option to enable/disable this feature in settings form.
I am missing that in this branch?
- 🇮🇳India divyansh.gupta Jaipur
Sorry forgot about that will make the changes.
- 🇮🇳India divyansh.gupta Jaipur
Created a option to enable and disable this functionality in settings form also tested it and it is working fine from my side.