Highest scored questions
88,154 questions
153
votes
10
answers
215k
views
What are the recommended directory permissions?
I'm gearing up to deploy a Drupal 7 site and I can't find any documentation. What are the recommended security-conscious permissions for files and directories?
I am specifically interested to the ...
125
votes
14
answers
19k
views
What is the basic concept behind hooks?
I am intermediate in PHP. To polish my skills I start learning Drupal 7. While learning Drupal architecture concepts, the terms hooks and bootstrapping puzzled me a lot. I read the "Pro Drupal ...
111
votes
2
answers
68k
views
Contextual filters taxonomy name
I'm adding a contextual filter to a view for a custom content type that has a taxonomy field. The contextual filter allows me to filter by the taxonomy tag id but not by the taxonomy tag name. Meaning ...
108
votes
1
answer
45k
views
How should I implement hook_menu()?
What are the fundamentals of implementing hook_menu()?
I would like to see the basics covered in a single question, to avoid having to answer the same similar but different questions over and over.
102
votes
11
answers
101k
views
How can I change a user's password from the command line using Drush?
How can I change a user's password from the command line using Drush?
98
votes
7
answers
15k
views
What are the downsides of using PHP Filter code in blocks, nodes, views-args, etc?
I have seen many times people saying not to use custom PHP/PHP filter (from the Drupal UI) in blocks, nodes, views-args, rules, etc. I have searched around a bit and haven't found much, it seems like ...
93
votes
9
answers
9k
views
Do non-enabled modules affect performance?
Does having Drupal modules present, but not enabled have any effect on the performance of a Drupal site?
To put it another way, would removing disabled modules on a Drupal site have a positive affect ...
92
votes
7
answers
47k
views
How to take a site offline using Drush?
How can I take a site offline using Drush?
89
votes
11
answers
206k
views
How do I get the current path alias or path?
How can I get the current alias and/or path in Drupal 8?
In Drupal 7 I did this with drupal_get_path_alias(). What is the equivalent code I should use in Drupal 8?
88
votes
7
answers
18k
views
When is it appropriate to create an entity instead of a new content type?
What is the benefit to creating new entity types over just building a new content type?
It seems a bit overkill to do all of the custom coding that is required to create a new entity when you have ...
81
votes
4
answers
94k
views
What does "The provided host name is not valid for this server" mean?
I am running a Drupal 8 website, and when I browse to any page, I get a plain white page with just the following error message on it.
The provided host name is not valid for this server.
What does ...
81
votes
12
answers
55k
views
Any way to add CSS for a single page/node?
I'm cleaning up my big crazy style sheets (possibly pertinent to a future question) and I'm wondering the best way to add custom CSS to a specific node or page.
In particular, my work site's home page ...
80
votes
12
answers
241k
views
How do I access a field value for an entity (e.g. node) object?
node_load((int) $nid) loads a fully-populated node entity. $node->title->value gets the title, but how do I access field values in Drupal 8?
80
votes
7
answers
9k
views
Suggestions for settings.php - Local dev, Development server, Live server
Basically, one of the greatest questions of all time: What are some ways you're using settings.php in your development/staging workflow?
Right now, I have my settings.php file set up like the ...
78
votes
4
answers
74k
views
How do I load a field collection from a node?
I have a node that has a few field collections on it.
When I look at node_load() output, I see:
[field_rich_text_group] => Array
(
[und] => Array
(
...