New to Drupal or a little rusty? This checklist is to help speed up your troubleshooting process. The list is currently at version 0 and I hope to improve it by giving more structure along with associating/clustering each item with symptoms. Let me know if you want to help!
How to use: Check through this list from top to bottom when something’s not working like it’s expected to. Items near the top are what I find most commonly occur and those below less so.
Theme functions or hooks not working
Template files not working.
White page of death (WSOD)
Contributed module not working
Not getting a call from external API/services
Entity metadata wrapper cheat sheet
Theme functions or hooks not working
- Have you checked recent logs?
- Is the extension correct?
- Is there a missing .tpl in the file name?
- Is the naming of the function (prefix of module name) correct?
- Have you double checked the spelling letter by letter? Look out for ‘_’ v.s. ‘-’, ‘__’ v.s. ‘_’.
- Did you flush Drupal’s cache?
- Did you make sure the flushing actually happened?
- Did you flush the correct cache (class / css/ page and else, etc.)?
- Is the file on the server? Did you git pull on server?
- Was the git pull successful?
- Are there committed changed on the server not pushed to remote repo that is overwriting your changes?
- Did you clear your browser cache?
- Have you tried opening the page in an incognito window?
- Is the module enabled?
- Are the paths correct?
- Have you double checked the path letter by letter?
- Is the file you are editing loaded by Drupal? Is it module_load_include’d somewhere or defined in the module’s .info file?
- Is the module weight affecting the processing order? Have you tried changing the module weight and clearing all cache?
- Have you turned off block or page level caching?
- Are you using the correct DB?
- Is the module in the right folder?
- Does the folder have the right permission for the web server user?
- Is the template (.tpl.php) file being overridden downstream? For example if you are editing the template file within a module, a template file with the same file name in the theme would override it.
- Is the block in the right region?
- Are the targeting css classes, ids, element types, correct?
- Is there an extra hide($content[‘xxx’]); that is hiding your content?
- Is the hook function supposed to return something? Check the docs. Some hook implementations alter the variables passed in by reference, some are expected to return something.
- Is the hook implementation’s parameters correct? Should anything be passed in as reference but not so?
- If it is an alter, remember the function name pattern is [module name]_[hook_name]_alter.
- If it is an alter, is some other module overriding your changes?
Template files not working.
- If you are implementing a template with a base template? For example, node–article.tpl.php requires the base node.tpl.php to be present in the same theme.
- Are the right theme_hook_suggestions present? Try dpm() $variables[‘theme_hook_suggestions’] in your hook_preprocess_node(&$variables).
- Is the template file named correctly? The ‘_’ in theme_hook_suggestions or hook_theme()s are replaced by ‘-’ by default unless specified otherwise in hook_theme()s.
- Are you using the right theme? Has the theme been enabled?
- Have you flushed your theme registry? drush cc theme-registry.
- Are you using the right view mode?
White page of death (WSOD)
- Have you checked the web server error logs?
- If a new function was added recently, have you checked for a function naming conflict? It may not be your problem – some other module may have wrongly named the function. Check the include files on top of the .module files of the current module too.
- Does the folders and files have the right permission for the web server user?
- Did you upload that file / deployed that repo in the right place?
- Was a file not included in the repo? Some files can be excluded by .gitignore and not show up in git status.
- Are you accessing the correct address? Are you accessing the correct instance? Only applicable in a multi-instance environment.
Contributed module not working
- Is the module really enabled?
- Have you checked the installation steps outlined in the module’s project page on drupal.org?
- Is there any required library missing?
- Have you checked the status report for any other requirements?
- Have you flushed cache?
- Have you set up new permissions this module may have defined?
- Have you checked version compatibility with other contributed modules?
- Did you download the right version of the module?
- Did you download the right module?
- Have you re-read through the details on the module’s project page on drupal.org?
- Have you searched through the issue queue for the module?
- Have you ran update.php?
- Does the folder have the right permission for the web server user?
Not getting a call from external API/services
- Is your web server password protected?
- Is your web server accessible?
- Are you checking the correct instance?
Entity metadata wrapper cheat sheet
// Source: http://drupal.stackexchange.com/a/98514 $wrapper->author = 0; $wrapper->url = 'dummy'; $wrapper->author->mail = 'foo'; $wrapper->author = NULL; $wrapper->author->set($GLOBALS['user']->uid); $wrapper->author->set($GLOBALS['user']); $wrapper->body->set(array('value' => "<b>The second body.</b>")); $wrapper->language('de'); $wrapper->body->set(array('value' => "<b>Der zweite Text.</b>")); $wrapper->language(LANGUAGE_NONE); $wrapper->set($node); $wrapper->reference->name->set('foo'); $wrapper->reference->set($wrapper); $wrapper->save(); $wrapper->delete(); $wrapper->type->set('article'); $wrapper->author = $user->uid; $wrapper->{$property}[0] = '2009-10-05'; $wrapper->field_image = array('fid' => $file->fid); $wrapper->$name->value(); $wrapper->parent[] = $term_parent2; $wrapper->field_tags[1] = $term_parent; $wrapper->field_tags->set(array(2)); $wrapper->field_tags = NULL; $wrapper->$field_name->set(NULL); $wrapper->field_text[0] = 'the text'; $wrapper->field_text[0]->set(array('value' => "<b>The second body.</b>")); $wrapper->field_text2->summary = 'the summary'; $wrapper->field_text2->value = 'the text'; $wrapper->field_file[0] = array('fid' => $file->fid, 'display' => FALSE); $wrapper->field_file[0]->description = 'foo'; $wrapper->field_file[0]->display = TRUE; $wrapper->field_file[1]->file = $file; $wrapper->field_file[] = array('description' => 'test'); $wrapper->field_file = NULL; $wrapper->field_image = array('fid' => $file->fid); $wrapper->field_image->alt = 'foo'; $wrapper->field_image->file = $file; $wrapper->field_image = array(); Generated from entity.test via: # grep "^\W*\$wrapper->" entity/entity.test | tr -s " "
Recent Comments