Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [7]

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

0
votes
1answer
34 views

Adding fields to user registration form for admins

I use the Entity Registration module and I created a registration form for specific events in a Drupal 7 site. For the registered users, the fields are name, surname, birth date, upload administrative ...
0
votes
0answers
22 views

Gmap / Location modules not showing map without manually entering the latitude and longitude values

I am using the GMap Module for Drupal 7 along with Location, with Node Locations enabled. During the creation of an article, when I enter the location values as text fields (e.g. countries, cities) ...
0
votes
1answer
27 views

Use custom variable in html.tpl.php for critical css

I have built my current theme in my D7 site upon the Foundation theme, and with that comes a LOT of unused CSS that gives me a low score in Pagespeed Insights. I have tried different things, among ...
0
votes
1answer
24 views

Trying to get property of non-object in simplenews_scheduler_node_page()

I am using simplenews_scheduler in Drupal 7 to set up a weekly digest of new content. I am getting the following error on the screen and scheduled newsletters aren't going out, even after running cron....
0
votes
1answer
21 views

error_get_last() doesn't show last warning

Drupal has its own custom error handler, so when I try to get the message from the last warning (e.g. for an invalid regex), there is nothing there: if (@preg_match($regex, NULL) === FALSE) { dpm(...
0
votes
0answers
9 views

list_text not defined in installation profile

I am building a custom installation profile. I am trying to create a field on module installation of type list_text. I have the 'list' dependency inside of my profiles .info file, and it's ahead of ...
0
votes
0answers
32 views

Why do unwanted hidden images get added?

Due to some reason some unwanted hidden images get added to textarea field if kept empty. like below. I have no idea why this is getting added. Please help if some one know about it.
0
votes
1answer
12 views

Using innerJoin() in TableSort

In the examples modules I see a simple example of tableSort with one table. Searching online I find a post where they claim Drupal 7 allowed a db_select() object to be created and then extended it ...
0
votes
1answer
17 views

Group By Taxonomy term on view but show all articles containing it

I am trying to generate a view that groups nodes by a taxonomy attached to them but only shows the Taxonomy term once then all the titles under it. Term 1 Article Article Article Article Term 2 ...
0
votes
0answers
19 views

Pathauto not automatically creating URL aliases

I have a fresh install, using pathauto 7.x-1.3 and for some reason it does not create an URL alias like configured "/admin/config/search/path/patterns" when creating nodes. What happens: When ...
0
votes
1answer
21 views

How do I use a views data with a paragraph? [duplicate]

I have a content type with dynamic content block section. Each block section is managed by paragraph bundle. Let's explain using an example to make more clear- Content type name is Employee. A ...
0
votes
1answer
21 views

How to add a checkbox to form builder component settings form?

I have webform and formbuilder modules installed. In the file field settings form I want to add an extra checkbox field just like the required field but I am unable to do that. I can add it to the ...
0
votes
1answer
13 views

Disable (or workaround) form rebuild with managed_file field

I'm using the Form API to create a custom form. It has a managed_file field and some other fields, some of which are required. If any of the required fields are not filled in, the file upload for the ...
0
votes
0answers
10 views

Google Merchant error: Not Found

I have integrate Drupal 7 Site with Google Merchant by using the following instructions: https://www.drupal.org/project/commerce_gmerchant but after integration with this when I add the new product ...
0
votes
0answers
16 views

How can I redirect to a different page after webform submission with a custom href attribute?

I have this snippet in one of my nodes folder: node--experience.php At the moment, the section has a download button which holds a URL: // Download Info pack (PDF). if ($entry_info) { //var_dump(...
0
votes
0answers
175 views

PDOException: SQLSTATE[HY000] [2002] Connection refused Upon Drupal 7 Installation

I have already installed LAMP in my Ubuntu 18.10 server. I have also downloaded Drupal 7 files. But after I navigate to http://10.0.34.74/drupal-7.65/ in my browser. The error below occurs: Error The ...
1
vote
1answer
79 views

How to install drush properly

I am trying to install drush on my new computer and it's a mess I'm on Mac Os High Sierra, with Mamp 5.3, PHP 7.2.14 I'm mainly interested in Drupal 7 On my previous computer, it was simple i just ...
0
votes
1answer
12 views

Template suggestions periodically not being recognized

I have some simple template suggestions setup in my THEME_preprocess_node() function. Example: function my_theme_preprocess_node(&$vars) { if ($vars['node']->type == 'MY_TYPE' && $...
0
votes
1answer
17 views

Rules add date variable from webform submission

I have a webform where the user also submits date. I would like to populate a date type field with the submitted date. I tried making variable by "Add variable", but I do not know how to access my ...
1
vote
0answers
24 views

EntityFieldQuery: Filter by field language

How would I use EntityFieldQuery->fieldCondition() or similar to filter by field language? E.g. give me all nodes where field_description has items in English, or in LANGUAGE_NONE? There is a $...
0
votes
1answer
26 views

Is there any way to create a discount that only discounts one product in an order?

We have a Drupal 7 site using Commerce and Discounts and we need to create a discount that will discount one product in the order by 100%. Basically, we need to give a coupon discount for ONE free ...
1
vote
1answer
35 views

Send “Views PDF Display” generated PDF by mail as attachment

TLDR: How to send Module "Views PDF Display" generated PDF by mail as attachment without another deprecated module ? I have a Drupal site with the Views PDF Display module on it. I can generate a ...
1
vote
1answer
20 views

Set max_execution_time for view?

I've got a view that generates a CSV report on user information. However, due to the size of the dataset it's causing the server to timeout. Is there some way that I can set the max_execution_time() ...
0
votes
0answers
36 views

How do I find the lost administrator login credentials?

How do I find the lost administrator login credentials? I have deployed locally an old Drupal 7 website and I can't find the administrator login credentials since Windows had crashed 3 years ago.
0
votes
0answers
43 views

View filter if field contains a value?

I'm trying to filter my view based on data in a single field. My field targetuser contains a string of numbers: 47,505,100,20. I'm trying to setup the view so that if targetuser contains the logged ...
0
votes
0answers
14 views

Redirect old URL to new URL via htaccess with path

I am using HTTPS and WWW only rules in Drupal 7's .htaccess like: RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # ensure https RewriteCond %{...
0
votes
1answer
16 views

Drupal 7 how to use item menu as MENU_LOCAL_TASK and MENU_NORMAL_ITEM simultaneous?

I have hook_menu with 3 pages they are defined by default as MENU_NORMAL_ITEMs and I see them from in main menu: $items['accounting'] = [ 'title' => 'Accounting', 'page callback' => '...
0
votes
1answer
36 views

Get user list according to node field value

I have created one content type named "Project". I have added one field in it named "Skills". Skills is a multiple select field. And I have added one submit button. Which I want to use to get records ...
0
votes
0answers
25 views

Cannot add a domain to existing drupal 7 site

Sorry in advance if this is a dumb question, I can't seem to figure out how to add a domain name to a D7 site, (currently using an IP). The website is hosted on digitalocean, the new domain is from ...
0
votes
1answer
23 views

Can I aggregate all stylesheets core, contrib and custom into one single stylesheet?

Is there any way to avoid Drupal from serving multiple stylesheets and instead bundle them together? I am going to look into https://www.drupal.org/project/webpack I want to avoid all the multiple @...
0
votes
1answer
38 views

AJAX calls significantly slower in production environment than development environment

I am using Commerce AJAX add to cart in Drupal 7, and the average time for an AJAX call on the development site is 100-200ms. On the live site those same calls take between 1-3 seconds. The ...
0
votes
0answers
32 views

How do I add custom JavaScript code after execution of google chart loader?

In hook_preprocess_page(), I added a custom JavaScript file used for adding a chart to the page. drupal_add_js(drupal_get_path('theme', '****') .'/js/loader.js', array('type' => 'file', 'scope'...
0
votes
0answers
17 views

Get the field for a value of a “List (integer)” field using entity_load()

I am trying to get the label for a value of a List (integer) field using entity_load(). With the code I am using, I'm able to get the field key with $flagging->field_form_status['und'][0]['value'],...
0
votes
0answers
23 views

Cannot login as admin

I cannot login as admin anymore on my Drupal 7 installation. I tried: Generate a new password with user_hash_password; Generate a new password with SQL Query; Clearing the sessions table; Clearing ...
0
votes
1answer
43 views

drupal_get_path function for third party PHP includes files

I am trying to add some PHP includes files into Drupal 7 site. The files are on this page - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/...
0
votes
0answers
23 views

Display users with quiz results and users who didn't take the quiz

Views shows only users that took the quiz and shows their score from the Quiz module. If I create Users views there is no relationship for Quiz fields and if I create Quiz view it shows only users ...
0
votes
0answers
8 views

Webform response - user permissions

Using Drupal 7 I have created a webform where submissions are entered by any authenticated user. The goal is to have one user (not an admin) have the ability to see the submissions and respond in the ...
1
vote
1answer
14 views

Node is flagged, node author comes back to the site, how to show how many new flags since last visit?

I created a "new activity feed" view page in which a user can see how many new comments have been posted to his own nodes since his last visit Eg : since you last last visit : - 21 new comments have ...
0
votes
0answers
20 views

Making a Display Suite Block field visible only to node author

I've been stuck with this issue for two full days. I've created a view including a VBO field and want to put that on a specific node type making it available/visible only to the author of each node. ...
1
vote
2answers
11 views

How do I add a minipanel to a panel page?

In D7 I've created a new minipanel and would like to add it to a panel page. However, when I go to add it I cannot find it. It's not under the category I've set it in and it's not under the Mini ...
2
votes
1answer
28 views

How do I add custom pages or view pages to search index?

Suppose I have a custom page built in a custom controller. Or similarly, a view page the displays the list of nodes, such as the classic "admin/content" page. I want certain user roles to be able ...
0
votes
1answer
15 views

How to print author's email address in in node template

I have a content of type summary only visible by the author and administrators. I need to print in my node--summary.tpl.php the author's email address that was set at the account creation. Any idea ...
-1
votes
2answers
39 views

How do I get the value submitted for a form element?

I have a custom form for emails with the following form element. $form['type'] = array( '#title' => t('TYPE DE SOIN SOUHAITÉ'), '#type' => 'select', '#options' => array("Choisissez le ...
0
votes
1answer
20 views

Views arguments as part of path

Is it possible to create views pages with urls like "prefix-%-postfix" instead of "prefix/%/postfix"?
0
votes
1answer
16 views

Custom form template

So I am recently started working on front-end development, and have started messing around with making my own custom templates for modules. I have been able to get page related templates to work, but ...
2
votes
1answer
28 views

How do I clear a specific cache entry?

I saved a cache entry using cache_set(). How can I clear this entry using Drush?
-2
votes
1answer
21 views

How do I stop the unexpected error with drupal watchdog and variables = i:7;

I am using a watchdog command to log watchdog(self::MODULE_NAME, "Successfully written to %file", array('%file' => $local_file), WATCHDOG_DEBUG); it causes a database row with i:7; in the ...
0
votes
1answer
82 views

Translating a taxonomy term does not populate content into fields

When translating a node into another language it does the following: automatically populates all fields with content from the source node on the edit form ensures the two nodes are linked as ...
0
votes
1answer
28 views

Location Contextual Filter: Distance/Proximity works for all nodes but one

Drupal 7 site with Location and Location CCK modules. Client has custom content type with Location field provided by Location CCK module. Each Location node has a Views block display of Nearby ...
0
votes
1answer
14 views

Replacing Private message module with nodes

I was looking for a quick answer to the problem of allowing members to write each other messages. The Private message module looked like the most complete solution. However, it has some significant ...