Frequent Questions
8,329 questions
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 ...
21
votes
6
answers
19k
views
White screen of death: Fatal error: Allowed memory size of X bytes exhausted
I have a issue with my Drupal installation, for example:
when I enable or disable the modules, It redirects me to a blank page,
when I create a new content type and save it, redirects me to a blank
...
6
votes
1
answer
3k
views
What are the various roles supported by the Group module?
The Group module is an alternative for Organic Groups. For each group you can specify appropriate permissions, and this for various "roles" that are specific to the Group module (these roles are not ...
29
votes
4
answers
21k
views
Database general error: 2006 MySQL server has gone away
Recently I started getting an error every time I try and add a content no matter what type. This is the error that shows up in the browser:
Additional uncaught exception thrown while handling ...
41
votes
1
answer
7k
views
Why is hook_form_alter() so messy?
Here's an example I just ran into. I'm trying to put some HTML in the label of my field.
$form['field_feedback']['und']['#title'] <- has the title
$form['field_feedback']['und'][0]['#title'] <- ...
2
votes
3
answers
758
views
How can I display the value of a variable inside a condition?
I have created a rule using the Rules UI. My rule is not working, and I need to debug it, displaying the values of my variables inside a condition where I make a comparison.
I see within Rules ...
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 ...
5
votes
5
answers
1k
views
How to stop a Views block from displaying to administrators, such as user/1?
I created a view and put an access role of anonymous user. When I log in with normal user account I don't see it, but when I log in with my admin account I see the view.
I would like to not see it. ...
46
votes
9
answers
161k
views
How do I get the raw field value in a twig template?
myfield is a plain text field. {{ content.field_myfield }} renders the field with HTML markup and the field label.
How do I render the raw value of the field? {{ content.field_myfield.value }} doesn'...
5
votes
1
answer
3k
views
What's the alternative to using the Conditional Rules module?
The Conditional Rules module allows for including Rules Conditions within Rules Actions (using its If/Else constructs), something you cannot do by only using the Rules module. Here are just a few (out ...
40
votes
7
answers
14k
views
Drupal SA-CORE-2014-005 - How to tell if my server / sites were compromised?
I just updated all my sites using the patch method of resolving the Drupal SA-CORE-2014-005 exploit. I just read reports that just yesterday there is someone from a Russian IP infiltrating 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 ...
45
votes
10
answers
109k
views
How can I programmatically display a block?
I'm developing a site using Drupal 8 beta-14. I've created a view block of different terms and now I want to display it using code. How can I display it programatically?
I used to do it in Drupal 7 ...
25
votes
7
answers
24k
views
How to see the error messages when I get the white screen of death?
How can I see the error messages when the site I am working on gets a white screen?
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 ...