Drupal

Drupal Role Specific Development Feedback

On rare occasions you may have to work on a production site and need some development feedback. If you want to control which role sees your output, this snippet can help. With this logic in place, only appropriate roles will see your working on the site.

Drupal Display PHP Errors on One Domain of Multi Site

When using a multi-site setup, You may want errors only to appear for one site. In that case, use $_SERVER[‘HTTP_HOST’] in an if statement to only display PHP error messages for the domain of your choice:

drush cc Not Showing All Options (only showing 2 options cancel and drush)

Trying to clear your Drupal site chache with drusch cc or drush cc all? Drush should out put a list in response that looks like this:

But instead, you may see something that looks like this:

Chances are you are not in the document root of the Drupal site on which you are… Read more drush cc Not Showing All Options (only showing 2 options cancel and drush)

Drupal: How to solve Warning: file_put_contents The file could not be created

Sometimes when migrating or setting up a local development site you may run into an error that looks like this:

Likely the Drupal temp directory isn’t writable. An easy fix for this is to navigate to /admin/config/media/file-system and enter the correct temporary directory or if you’re not sure what it should be, then delete… Read more Drupal: How to solve Warning: file_put_contents The file could not be created