From 08e651067402622cb4079c0beaef0c990b15e04d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?benjamin=20melan=C3=A7on?= Date: Fri, 1 May 2020 08:23:35 -0400 Subject: [PATCH] Add more to resource blog --- blog-when-not-a-module-for-that-resources.md | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/blog-when-not-a-module-for-that-resources.md b/blog-when-not-a-module-for-that-resources.md index d5a7276..4e70a5b 100644 --- a/blog-when-not-a-module-for-that-resources.md +++ b/blog-when-not-a-module-for-that-resources.md @@ -106,9 +106,32 @@ drupal.org/project/grammar_parser +## Development Tips + +* When Something Isn't Working, Clear Caches +* When Anything's Missing, Check Permissions +* Set Your Site to Show All Errors + +Lines to add to settings.php to show all notices and errors: + +``` +error_reporting(-1); +$conf['error_level'] = 2; +ini_set('display_errors', TRUE); +ini_set('display_startup_errors', TRUE); +``` + +These days i just look in the error log but it never hurts to have errors blared at your face. + The most important thing about this code is that i stole it. I looked at how another module did it. Implementing hooks is simply following patterns, it would be crazy not to copy. + + +## Best practices + +* Make dependenices optional when possible. +* Provide granular suggestions in theme functions so people can override when they want to.