Fixing Drupal Module Errors
Run the Update Script and “Clear All Caches”
When my site behaves oddly, shows strange errors, or displays a blank page—especially right after enabling a module—the first thing I do is refresh the page I'm on.
After that, I’ve often found that “running the update script,” followed by “clearing all caches,” solves most problems.
“Clear all caches” is a simpler and quicker fix to try, and sometimes it’s effective, so it’s the first thing I do whenever my site is giving me trouble.
Usually, I always follow up running the update script with clearing all caches out of habit, because my Drupal 7 site’s DHTML Menu module required it every time I ran the update script.
So these next two steps seem the most logical to me as the first actions to try when troubleshooting any site issues, and you are free to run the update script or clear all caches at any time.
- Clear all caches
[d8-root]/admin/config/development/performance
Click the “Clear all caches” button.
- Run Cron
Go to the “Reports” > “Status Reports” page and click “Run cron” at the top of the page.
- rebuild.php
Try running “rebuild.php” just like you would run the update script with “update.php” mentioned above.
Try searching your chosen search engine using the first part of the error message. You can also put quotation marks around the message in your search query.
When your site shows a blank page and you can’t see the issue in the browser or log page, run the Drush command below to clear caches, and the error will appear in the terminal output.
drush cache:clear
You can also clear truncated cache tables in your database by running:
drush sqlq "TRUNCATE cache_default;TRUNCATE cache_bootstrap;TRUNCATE cache_container;TRUNCATE cache_discovery;TRUNCATE cache_data;" -l <uri> --no-interaction
Drupal’s online documentation is © 2000-2020 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution-ShareAlike 2.0. PHP code is distributed under the GNU General Public License.