Leveraging the Power of Drupal Without Hacking Core
Drupal is a scalable and secure content management framework which help organizations build their digital platforms. In this article I am presenting a situation where Drupal helped implement a feature for one of our client, without affecting the site's scalability and secure nature.
The client’s site went down to maintenance mode for some users unexpectedly. This happens very rarely and there was no immediate visible reason that could point to the cause of it. So it was imperative that we log when the site goes offline in order to debug the issue.
A simple and fast solution would have been to hack the core by adding a line of code that logs the back trace at the time when the site goes offline. But hacking the core leaves us open to security vulnerabilities and may have unintended consequences affecting other contributed modules and make it difficult to update. So it is always a good practice to use Drupal’s high value opportunities for customization, instead of hacking core.
Drupal, as a powerful content management framework gives us the flexibility to do almost any kind of customization by using custom modules and themes without hacking core.
So here we overrode the maintenance page theme in our custom theme to include the back trace log function to find and fix the root cause.
Do you know other reasons why core should not be hacked. Or why is it difficult to update when core is hacked? Share your comments...