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
1
vote
1answer
21 views

How do I name a mimemail-message.tpl.php template to be used with a specific webform?

I cant seem to get the naming of the mimemail-message.tpl.php correct in Drupal 7. I know the naming scheme says "mimemail-message--[module]--[key].tpl.php" but either I'm not understanding ...
0
votes
0answers
17 views

Boolean property from entity not available in rule

The setup I have an entity (ECK) that has a boolean property (not a field). In that same entity I have a regular text field property. I have a rule that contains a conditional in the action section. ...
1
vote
1answer
21 views

Get order of a content type's fields

When I manage fields in content type edition I can put them in order. How could I retrieve this information to use it in a custom module. In Database there is no any column which saves weight order ...
0
votes
0answers
24 views

How to change path of composer manager file directory?

I have Drupal 7 setup with Composer Manager installed in it. I wanted to set-up the website in dev environment hence took DB backup and files from the production environment, and installed it in dev ...
0
votes
0answers
23 views

Mobile application version

I've created a website in Drupal 7 and we would like an app version of the website. I'm looking at DrupalGap. Is this the best way to do this? If I use a function like DrupalGap do I need to ...
0
votes
0answers
16 views

View with multiple node arguments using an entity reference

We have a node type called: MEETING On Meeting we have a user entity reference called: PARTICIPANTS I create several MEETING's and reference 2 users: USER1 AND USER2 Now I want to build a dynamic view ...
0
votes
0answers
15 views

How to expose the URL alias of a taxonomy term in a View?

I have a View showing Taxonomy Terms as JSON, and want to expose the URL aliases of those terms: { "terms" : [ { "term" : { "name" : "Media ...
1
vote
2answers
32 views

How to allow users to 'add' values to a multi-value field but not edit any previously add values?

I have a field called 'Remarks' on an ECK entity (not a node) and Role A is allowed to leave remarks but I don't want them to edit previous remarks, I just want to give them the option to add one. ...
0
votes
1answer
32 views

How do I update an old project?

I have been tasked with updating my code shop's long-abandoned Drupal 7 codebase to the most recent Drupal core, in order to bring in the latest security fixes (it's currently using v7.67). But all ...
0
votes
1answer
19 views

I need to update a longblob value in the variable table using variable_set

This would be in an install file in a module. The purpose is to create setting for a module that is already installed (the module is node_revision_delete). I know how to use variable_set to change a ...
1
vote
1answer
17 views

What is hook_field_default_fields()?

I'm looking through a Drupal 7 module code in an attempt to understand what it does. It implements hook_field_default_fields(), but I can't find any documentation on this. What does this hook do? I ...
0
votes
0answers
19 views

Center concatenated fields in theme table

In the attached image I have two similar tables. The first one was created using views, the second one is the table I'm creating with my own module. My question is: How can I center the information in ...
0
votes
0answers
12 views

Add custom param data-cmp-src in drupal_add_js [duplicate]

I added js files in the header of my drupal 7 site by using drupal_add_js as the example below: drupal_add_js(drupal_get_path('theme', 'ims') .'/js/qc2.js', array('group' => JS_THEME, 'scope' => ...
0
votes
0answers
13 views

Views contextual filter with php validation

The problem: How to use php code to fetch 2 UIDs from a View and compare them to validate the View The situation: I created a View in Drupal 7 that lists all entities of the entity type of "...
0
votes
2answers
42 views

Alter Services JSON Response

I have created a view to render all taxonomy terms and displayed it through a service. I have also created an endpoint in the service module to hit the url through firefox add-on RESTer to test the ...
0
votes
2answers
47 views

Sanitization of the q parameter

I'm using Drupal 7. My question regards the sanitization of the "q" parameter. We know about SQL injection, so I was wondering if this parameter may be a vector for this kind of security ...
0
votes
1answer
19 views

Link video (media_youtube) to node

I have a content type called 'webtv' for adding videos from youtube with media, media_youtube modules. On the webtv page I want to add blocks with video preview image and node title. My problem is ...
-1
votes
3answers
32 views

How can I place a view on a page? [closed]

I would like to add a view at the bottom of a page. Is it possible? How?
0
votes
1answer
21 views

Have a child node inherit taxonomy from a parent during /node/add?

In Drupal 7, I have two content types: Parent Events with tags (like "outdoors" or "popular" or "suitable for kids"). "Tags" are taxonomy terms in a vocabulary,...
0
votes
1answer
15 views

How do I create a view with mixed languages, showing the node's original language by default?

I have a site with mixed languages, Spanish and English. Some content was originally created in English, then translated into Spanish. Other content was originally created in Spanish, then translated ...
0
votes
0answers
11 views

No such file or directory in theme_render_template() for site that doesn't exist

I was recently assigned a Drupal 7 site to work on despite the zero Drupal knowledge that I have. The people before me who had experience in Drupal or with this site have all left the company. The ...
0
votes
1answer
24 views

How can I programmatically flag a user?

I am creating a new user programmatically in drupal7. At the time of user creation is there any way to flag the user automatically. I am using flags module. I tried in the hook_user_presave function ...
1
vote
0answers
23 views

Copy a field's value to another field and modify it

I have content type "Video" When i do a new "video" I have a field "iframe_vimeo" thats it contains a value of the iframe's video link. I want to do some modifications ...
0
votes
0answers
22 views

Avoid the “form-text” class is added

Drupal 7 adds the form-text class to my input fields, which messes with the layout from my custom Bootstrap-derived theme. How can I strip these out? I tried with hook_form_alter(), but the form-text ...
0
votes
1answer
35 views

What's The Security Implications for “Send arbitrary files” in Permissions

For my webforms, I want to receive attachments, when I receive an email. I had issues receiving them until I set the permissions for Anonymous User to allow them to use "Send arbitrary files"...
0
votes
1answer
24 views

How can I save parts of the URL to the database when a certain page is viewed?

Can a page be created the normal way (not by module) in Drupal 7, using Content Type an so forth, yet still trigger a module and pass a variable from the URL. The idea is to let the web team create ...
1
vote
1answer
149 views

“Deprecated function: implode()” on GMap Drupal module [closed]

I have containerised a legacy Drupal 7 website with Docker. This is the docker-compose file: version: '2.0' services: drupal: build: . ports: - "8080:80" ...
0
votes
1answer
18 views

HTML tags after umlauts causing premature header sending - CK editor

I'm maintaining some old Drupal 7 site (not created by me) and since couple of months ago it started acting strange (I didn't make any change on site): Inside some content type there is a formatted ...
1
vote
1answer
42 views

Error: Call to undefined function in inc file

I searched for an explanation to this issue but didn't find anything. I have other sites where this is working but not in this one. So, my module info file (draws.module): name = draws description = ...
0
votes
0answers
12 views

Does calling filter_xss() or filter_xss_admin() more than once have undesired effects?

Background Some sanitization functions cause undesired effects if called more than once. $str = 'a < b'; $f = 'check_plain'; $f($str) === 'a &lt; b'; $f($f($str)) === 'a &amp;lt; b'; It ...
0
votes
0answers
11 views

Permanent status/error/warning message on page

Background The Drupal 7 messages system works like this: drupal_set_message() adds a message (status, warning or error) to a message queue in the user session. When the page is rendered, theme('...
0
votes
0answers
14 views

Why boost module does not work for https sites in D6&D7?

For my site now Boost module is working fine. It wasn't working though it was indeed generating the HTML files. I tracked it to .httaccess rule: RewriteCond %{HTTPS} on [OR] After commenting out it's ...
0
votes
0answers
24 views

Computing statistic values and sorting views result

I want to show views results in specific order. [( yearly view count / 365 ) + ( monthly view count / 30 ) + ( daily view count ) / 3 ] Is there a way compute statistic values for sorting?
0
votes
1answer
19 views

How do I make a checkbox form initially have all options checked?

I have a drupal form in a module that doesn't pull in information until submitted. Can I make the checkboxes initially checked? $form['search_block_type'] = array( '#description' => "...
0
votes
1answer
25 views

Javascript in Drupal

I was following this post on drupal.org - https://www.drupal.org/node/3075055 But I'm not getting the same result. I'm not experienced at all in javascript so maybe I'm missing something. Do I need to ...
0
votes
1answer
51 views

How do I remove the progress bar in Webform module?

I am using Drupal 7 and I have version 7.x-4.23 of Webform. When I create a Webform it is a simple one-page submission form. There is a really unnecessary "Start > Finish" progress bar ...
1
vote
1answer
19 views

How to programmatically import a block to existing view?

I need to programmatically import a block to existing view with its settings. I know how to export the whole view and import it programmatically. But I don't want to export whole view and then import ...
1
vote
1answer
23 views

How to create flagged nodes views that show up to colorbox using custom link

I Have flagged nodes, but because there are many flagged list with user, I want to show flagged list if user click on the text link as I describe on the picture. How to figure out this stuff?
0
votes
0answers
12 views

How can I allow a filter in a view to be modified by a site admin without granting full permission to alter the view? [duplicate]

I have a module with a view and some other functionality. I want to give site managers the ability to change the filter on the view (this isn't an exposed filter) but not give access to change the ...
0
votes
0answers
12 views

Update View When Filtering By Facet

We are using Commerce 7 to sell mattresses that may or may not have size variants like Single, Double, Queen, King. We have a facet filter on size that allows us to filter mattresses that are say ...
1
vote
0answers
81 views

Access Denied upon order completion

in drupal commerce every time logged in as a authenticated user and can get all the way through checkout until I am redirected back to the site. redirected to this page: /checkout/15/payment/return/...
0
votes
1answer
31 views

Can't update nodes / node unpublishes itself

This problem has been bugging me for some time now and I haven't been able to find this issue online anywhere else. My Drupal 7 website has a very simple photo gallery, using a custom node type called ...
0
votes
1answer
34 views

hook_node_access() doesn't work for anonymous users

I am new to Drupal 7, I am still unable to understand hook_node_access operation I am trying to give view access to the basic content types nodes for anonymous users but it is not working. It is still ...
2
votes
1answer
37 views

How to programmatically create an image style?

I need to create image style programmatically in Drupal 7. I found this issue: https://www.drupal.org/project/drupal/issues/2735969 and much more other issues, but all are for Drupal 8. I can't find ...
0
votes
0answers
22 views

How to fire Drupal Rule when more than single term (from multi value vocab) is selected

In this Drupal tutorial - https://www.drupal.org/node/2815377 - the author demonstrates how you can get a rule to fire if you have a field with a vocabulary with terms termA, termB, termC, and termD ...
0
votes
0answers
16 views

Is it possible to rewrite sort fields in a view without using additional modules?

I need to sort by title but some of titles start with a space and sort is putting titles with a space first (before a,b,c, etc). So I would like to use trim when I sort by title. The view is part of ...
0
votes
0answers
32 views

Is there a way to bring content files into views with white space removed?

I am trying to have the title in a view, once as the first letter, once as full title, and then have Drupal group these fields, as follows. A Alabama Alaska Arizona C California Connecticut However,...
0
votes
1answer
22 views

Check if the user has flagged content with any flag

It is possible with the following code to check if a content has been flagged by the current user with a certain flag: $flag = flag_get_flag('flag_name'); if ($flag && $flag->is_flagged($...
0
votes
0answers
10 views

How do I restore/recreate accounts created using OpenID after restoring from a backup?

After performing a rollback of our Drupal 7 site, we realized we had 20 - 30 users that were "lost". Looking for the most efficient / possible (?) way to recreate those users with the least ...
0
votes
0answers
16 views

Workflow Rules breaking site deployment

I'm trying to deploy a development Drupal instance to a test environment, but something is going wrong with Rules. I copied the entire site's filesystem, dumped the database with mysqldump, imported ...