Questions tagged [7]

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
21 votes
6 answers
18k 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 ...
Jayaram's user avatar
  • 791
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 ...
Pierre.Vriens's user avatar
41 votes
1 answer
6k 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'] <- ...
Joren's user avatar
  • 2,440
2 votes
3 answers
730 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 ...
bunset's user avatar
  • 131
153 votes
10 answers
213k 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 ...
ack's user avatar
  • 2,149
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 ...
Pierre.Vriens's user avatar
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 ...
Patoshi パトシ's user avatar
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 ...
powers1's user avatar
  • 1,253
9 votes
10 answers
13k views

Unable to send e-mail. Contact the site administrator if the problem persists

When my web form is filled and submitted, I get redirected to a page that says: Thank you for submitting. but theres a red warning box there that says: Unable to send e-mail. Contact the site ...
saadlulu's user avatar
  • 1,760
108 votes
1 answer
44k 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.
21 votes
5 answers
6k views

Is displaying a working Field Widget Form on its own possible?

I'm interested in embedding a Field Widget Form out side the context of the whole node edit form. I have displayed full forms in the past using drupal_get_form but that doesn't seem to apply for ...
SMTF's user avatar
  • 946
30 votes
5 answers
58k views

Dynamic select list in the form (dependent dropdown)

I'm using Drupal seven. I want to make the options in a select list be dependent on the value chosen in another select list in a form. I'm sure this has been asked many times before, but I am having ...
Ben's user avatar
  • 1,010
16 votes
4 answers
14k views

Properly bootstrap drupal for standalone PHP file?

This is what I have right now: <?php define('DRUPAL_ROOT', '/var/www/clients/client1/web15/web'); include_once(DRUPAL_ROOT . '/includes/bootstrap.inc'); drupal_bootstrap(...
Joren's user avatar
  • 2,440
6 votes
1 answer
3k views

How to create a node from a Webform using rules?

I want to create a node based on a webform data using the Rules module. This is because of a complication surrounding relationships within the associated CRM system. I am already at the point where ...
Darren Whittenham-Gray's user avatar
34 votes
5 answers
33k views

Node count for taxonomy terms

How can I display the node count values for taxonomy terms with sorting the result list in descending order of node count?
ya.teck's user avatar
  • 5,584
1 vote
2 answers
2k views

How to specify a Rules event like "Content is 'going to be' viewed"?

To answer the question about "How to restrict access to a node via node/12 and allow access via a path like content/sometitle?", I thought it should be possible to use the Rules module to do so. I ...
Pierre.Vriens's user avatar
0 votes
1 answer
1k views

How to make the permissions of a module more granular?

Assume a (contributed) D7 module, say module ABC, comes with only a few permissions (which can be set on the typical /admin/people/permissions page). For example: Administer module ABC. Access (view) ...
Pierre.Vriens's user avatar
35 votes
2 answers
63k views

Custom validation for a form?

I need to add custom validation to a form, lets says add article form. I was expecting something like hook_FORM_ID_validate() to handle this, but cannot find anything relavant in the API ...
gilzero's user avatar
  • 6,037
9 votes
4 answers
6k views

PDOException when creating the table: Base table or view not found [closed]

I have Drupal running on MariaDB 5.5.33. When I run update.php (after upgrade to Drupal 7.28 from Drupal 6) I get an error: Failed: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 ...
Tilia's user avatar
  • 233
2 votes
1 answer
1k views

Rule to store user's last post date and scheduled rule based 30 day reminder

In this scenario, user's can post 1 node of a specific content type every 30 days (interval changes depending on user role). We are using node_limit to accomplish this; it's doesn't play with rules. ...
Sam Roy's user avatar
  • 53
14 votes
5 answers
21k views

Changing url of exposed filter

When I used an exposed filter the filter selection is passed as name/value pair in the url, for example: members?field_a=valuea&field_b=valueb How can I set it up to use more of a "pathauto" ...
uwe's user avatar
  • 12k
7 votes
3 answers
17k views

Resolve the error "An illegal choice has been detected..."

I have written code like below and all works fine, but while submitting the form I get the error below. I am trying to filter the second dropdown based on the first drop down selection. An illegal ...
Hacker's user avatar
  • 3,024
21 votes
5 answers
24k views

Image styles return Access Denied

I'm using the Insert module to allow users to insert images with a specific image style into a page. After upgrading to Drupal 7.20, the images are not stored in the files/styles folders, and the ...
Evan Johnson's user avatar
6 votes
2 answers
3k views

How to create a basic message - notifications system displaying a real time message counter badge? [closed]

I'm looking for a way to create a basic current user notifications system for my site, e.g.: "some user" has created a new "group" "some user" has joined your "group" "some user" has posted a node in ...
Billy's user avatar
  • 828
6 votes
2 answers
5k views

How to use the Rules module to implement a custom redirect for an outdated URL?

I used to show content from a catalog via the Views module, accessing an external database, so that all of the URLs would be something like /content?name=[name]. For various reasons, I've opted to ...
astrosa's user avatar
  • 75
2 votes
1 answer
332 views

Which user related token(s) can be used to create a Rule for setting up a message type?

I have created few activity logs using the Message module. All works ok, but when I try to create a message type for example "username started following you on github". When setting up the rules for ...
Umair's user avatar
  • 441
1 vote
1 answer
696 views

How to set multiple values to an unlimited Term Refence field with Rules

I have two content types: Ingredient and Recipe Sheets. Both Ingredient and Recipe Sheet have a term refence field called Allergens. Ingredient has the Allergens term reference field filled in. IE: ...
No Sssweat's user avatar
  • 31.1k
54 votes
19 answers
152k views

Configuring the temporary directory

I have recently moved a site from a localhost to a VPS. I have managed to make the public and private files writable; however, I am not sure where to find the temporary folder and how to change the ...
Jasmine Ahmed's user avatar
53 votes
6 answers
37k views

How can I automatically upload images on file selection rather than pressing the upload button?

I have a custom content type to allow users to upload images. I'm trying to keep the interface as simple as possible. The content type contains a single image field. This works, but some users don'...
Patrick Kenny's user avatar
49 votes
3 answers
30k views

How to provide template for particular view mode?

I want to theme the search result view mode with a template. I had it in my head that naming a template file node--article--search-result.tpl.php would do the trick, but I'm obviously wrong about ...
artfulrobot's user avatar
  • 3,989
48 votes
3 answers
19k views

How to migrate from test environment to production environment?

The migration is from the local environment to the production environment. The production environment has run some time and created a lot of articles. In order to add new things to my site, I added ...
enjoylife's user avatar
  • 3,788
30 votes
9 answers
45k views

How do I remove duplicates when using the random sort?

I have created a view where I am displaying the the node title and a logo (a cck field). In the arguments I have passed the taxonomy term name. In the result a node is displaying 2 or 3 times; I ...
Ahmad's user avatar
  • 2,835
23 votes
4 answers
6k views

Clean way of building simple taxonomy browser of arbitrary depth

I have spent days trying to determine a clean way to do the following: Display a list of all top-level terms in a vocabulary with links to their child terms Upon clicking a link, be taken to a list ...
beth's user avatar
  • 9,087
22 votes
1 answer
71k views

Strict warning: Only variables should be passed by reference

I get the following error: Strict warning: Only variables should be passed by reference in include() (line 18 of /home/sites/dev/theparce/sites/all/themes/parce/block--block--3.tpl.php). This is ...
silkAdmin's user avatar
  • 2,814
3 votes
1 answer
2k views

How to bulk assign existing content to a group created with the Group module?

The Group module is an alternative for Organic Groups. One of the features it offers is that you can assign nodes to a Group. Question: how to bulk-assign a set of existing nodes to a specific group, ...
Pierre.Vriens's user avatar
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 ( ...
Justin's user avatar
  • 3,703
62 votes
8 answers
81k views

Rebuild images from image style

I have an image style in Drupal 7. I attached several images to a nodes and display the images based on this style. I then changed the effects on this image style but the existing images are not being ...
Justin's user avatar
  • 3,703
59 votes
2 answers
46k views

Better understanding of Drupal behaviors

I read about Drupal behaviors today, and I tried writing the following code. (function ($) { Drupal.behaviors.mymodule = { attach: function (context, settings) { $('#mymodule_id', ...
Hacker's user avatar
  • 3,024
51 votes
6 answers
43k views

Programmatically create a user and assign a role

I'm programmatically creating a user with the following code. $newUser = array( 'name' => $mail, 'pass' => 'password', // note: do not md5 the password 'mail' => $mail, 'status' =&...
Nicola Peluchetti's user avatar
42 votes
3 answers
50k views

how to send variable from .php file to .js file?

I hope someone is able to help me. The problem is the following one: 1)I have module in which a assign the variable in order to send to the template file php.tpl <?php ... $testvar="Hello from ...
Alexey's user avatar
  • 941
40 votes
9 answers
33k views

Count of nodes by type [closed]

I am looking for a snippet that lets me display the total count for a specific node type, e.g. "Pages = 167" or "Products = 10630." What code should I use to achieve this?
Diane's user avatar
  • 565
21 votes
5 answers
29k views

Show forms in a modal window [closed]

I have a form and I am using Drupal 7. I need to show this form in a popup when a user clicks a link. The user should then be able to complete the form whilst in the pop up window. I can use anything ...
Hacker's user avatar
  • 3,024
18 votes
9 answers
47k views

Create template file for views block

There is a lot about theming custom blocks, but what about blocks created by views? My views block has id: block-views-posts-listing-block, I try many ways for naming template file, ex: block--block-...
Codium's user avatar
  • 4,955
12 votes
2 answers
26k views

How do I theme a webform? [closed]

I am in need to theme webform in D7. How can I do that ? In the search I've come to know that by using web-form-nid.tpl.php we are able to theme a drupal individual form. Could any one guide me in ...
Fero's user avatar
  • 1,547
3 votes
1 answer
875 views

Memory Exhausted after Drush install [duplicate]

I've made a drush install of drupal 7.28 on my AWS server. I can confirm that the memory is set to 128M, all green on the reports -> site status page. The website will function normally and ...
Collin White's user avatar
2 votes
6 answers
4k views

Is there a simple way to notify users about new posts on the site?

I want my users to be able to "subscribe" to new content that is posted on my site. I've looked at the Notifications and Subscriptions modules and they are just massive! I've also looked at ...
Svartepjotr's user avatar
1 vote
1 answer
415 views

How to show message view containing own and following activity?

I have created a message view using the Message module. I want this view to show the current user activity and activity of the user he is following using the "follow" flag (user). i.e own + following. ...
Umair's user avatar
  • 441
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 ...
epersonae's user avatar
  • 1,290
64 votes
7 answers
72k views

Print the query which is built using db_select()

I want to print the query which is built using db_select() in a programmatical way. Is there any API function provided by Drupal Abstraction Layer? It is similar to query output in Views, but I want ...
Sithu's user avatar
  • 4,953
57 votes
9 answers
53k views

How to programmatically create Fields?

How can I approach implementing the following in Drupal 7? What I need to do is create a module which defines a new fieldable entity, called 'Company'. I have a list of, let's say, 20 fields that ...
NRaf's user avatar
  • 853

1
2 3 4 5
59