You can use the File Permissions module to correctly set up your file permissions, especially if you are seeing errors about your sites/default/files and sites/default/private directories being incorrectly set up.sites/default/files: This directory should have the permissions rwxrwx- or 770.The extended documentation can be found here. 'unix_socket' => '/Applications/MAMP/tmp/mysql/mysql.sock' ,Ī lot can go wrong if your files and directories are not properly secured. ![]() Add the following to your database credentials within your settings.*.php file: 'host' => '127.0.0.1' , Are you getting an error similar to this when using Drush, but the site works fine? exception 'PDOException' with message 'SQLSTATE No such file or directory' in core /lib /Drupal /Core /Database /Driver /mysql /Connection. MAMP is a fantastic local development tool, but it can sometimes be tricky to set up with Drupal and Drush. An easy way to make sure caching is turned off is to put these lines in your settings file: /** Generally, when you’re developing, you don’t want your CSS and JS cached, so that you can debug it. If you don’t have this file already, you can simply create it in sites/default and put the following: /** When you run a Drush command that requires the uri, such as drush uli, specify the uri, like so: drush uli -uri=. Setting the $base_url of the site in settings.php doesn’t affect Drush. If the site uri isn’t specified correctly, you’ll get a url of instead of the correct url. Many developers rely on Drush to do a variety of tasks, such as drush uli to log in to sites. Click the block instead, and click what you need from there. When Kint loads the object you’re debugging onto the page, don’t click the plus sign! That expands the whole tree. In a preprocess function, add the following: kint_require ( ) '/modules/contrib/devel/kint/kint/' Ĭreate a /modules/contrib/devel/kint/kint/config.php file and add / modify the line: $_kintSettings = 3 In settings.php: require_once DRUPAL_ROOT. The next option is to limit the number of output levels. The first option is to just output one variable if that’s all you need to see, like so - but be aware that even just one variable can be a giant object, so try to be as direct as possible: Kint is a great and detailed new debugging tool in Drupal 8, but it very often runs out of memory when you’re debugging within a Twig template, which defeats the purpose of using it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |