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
0
votes
0answers
32 views

Related nodes view block based only on child Taxonomy Terms

I have a 2-levels Taxonomy Hierarchy structured like this: Parent Term - Child Term 1 - Child Term 2 - ... My goal is to create a view block, where related nodes based only on child ...
1
vote
0answers
30 views

Help me write a Rule condition and action to remove discount line item and to add payment

I am trying to write a rule for an existing order. Order has a zero total due to (Commerce) discount, e.g.: Widget $3.00 Discount -$3.00 For the condition, I'd like to check if a specific discount is ...
1
vote
2answers
43 views

Override a function in a contrib module

My company received a maintenance contract for a website developed in Drupal 7. The Drupal 7 website uses the Quiz contrib module, ver. 7.x-4.0-rc10. The module is used to implement a feature where ...
0
votes
1answer
39 views

CKEditor doesn't work after updating

I've updated a drupal website to the latest 7.x version, and CKEditor stopped working. I had it originally getting //cdn.ckeditor.com/4.5.4/full-all, I've updated to //cdn.ckeditor.com/4.13.0/full but ...
0
votes
1answer
21 views

views_get_current_view performance

Does this function views_get_current_view inside views header or footer (to count rows number for example) means running the same view twice? Or is it somewhat simplified version of running full view?...
2
votes
2answers
58 views

After changing a webform multi-select field to single-select, submissions made pre-change show only the first selection

I've created a webform in Drupal 7 with a component drop-down list. I selected 'multiple' for multiple selections. Now, I need to unselect 'multiple' giving users just one choice of the drop-down ...
0
votes
0answers
32 views

hook_default_rules_configuration can't debug it or force it to load

I am trying to debug a hook from title, here it says http://api.drupalhelp.net/api/rules/rules.api.php/function/hook_default_rules_configuration/7.2 "This hook is invoked when rules configurations ...
0
votes
3answers
77 views

How do you deploy a change to a main menu?

We have a small D7 site. We want to deactivate a main menu item. On dev server I was able to deactivate it in /admin/structure/menu/manage/main-menu I believe The menu is stored in the DB, right. ...
0
votes
1answer
13 views

MiniOrange SAML SSO Drupal Module – Multilanguage Support

This is my first post at Drupal StackExchange. Please feel free to redirect it to the proper forum if this is the incorrect one. How do I configure Apache Server so that MiniOrange SAML SSO Drupal ...
0
votes
0answers
18 views

Dependent fields

I have 3 content types; team, player and game. When adding a new game, I would like user to first select team, and have the player list loaded only for that selected team. Is there a module that would ...
-1
votes
1answer
25 views

How can I programmatically create a Profile 2 profile?

I am taking a look in the Profile 2 API documentation: http://api.drupalhelp.net/api/profile2/function I guess profile_create() or profile2_save() are what I need. But I have read somewhere ...
0
votes
1answer
21 views

voting entity reference field

I have two content types, game and player. Each game can have a number of players assigned to it. I would like to have the capability to give votes to each player in a game. What are some ways to do ...
1
vote
1answer
29 views

How do I know when another contributed module deletes a block?

I have written a Drupal 7 module that adds about ten fields to the block administration configuration form and saves the values for those fields in its own database table. My module does not create ...
0
votes
2answers
27 views

Form submission handler is not executed

In a module, I am using the following code. function mysimple_form($form, &$form_state) { $form['#method'] = 'get'; $form['#action'] = '/buy/{_val_}'; $form['search_location'] = array( ...
0
votes
1answer
37 views

How can I disply the regex match in a view?

This is a Drupal 7/Views 3 question. I am using a regex as a filter in a view to select Body fields with certain characteristics. However, when it comes to displaying the field, I don't want to ...
0
votes
0answers
21 views

How can I write query of search api to get row count for every condition

$query_search_api = search_api_query('search_products', $options); foreach($arrFilterSa as $machine_code => $efield_value) { if($efield_value) { if(...
0
votes
0answers
33 views

“Drupal is initializing” rule firing multiple times

I am using the Rules module and the event "Drupal is initializing" in a rule to check if a user has clicked their confirmation link in their email that Drupal has sent them to verify their account. ...
0
votes
0answers
16 views

How can i get node type in template.php [duplicate]

I want to configure breadcrumbs depending on the node type. How can I get the node type in a function theme_breadcrumb in template.php? I try it, but it doe't work. function zen_breadcrumb($variables)...
0
votes
1answer
27 views

How do I construct an authenticated HTTP request in Postman?

I have Drupal 7 installed locally on my computer with the domain set to http://drupal.local. I am trying to prepare an external script in PHP or Python (or even in pure Bash using curl, if it does ...
0
votes
0answers
23 views

Is it possible to auto-translate a block?

I am hosting a Drupal 7 site and require some quick translations. I have found how to set up some auto-translations which I can then modify for all the content types (articles, basic pages, etc), but ...
0
votes
0answers
22 views

Access Denied when Sellers add new product

We created a store with Drupal 7 Commerce. Because we wanted to let specific users create new products on our store, a user role Seller was also created with the following permissions: Create, edit, ...
1
vote
2answers
58 views

Does hook menu accept a wildcard as argument 0?

In a custom module I have implemented hook_menu() using the following code. function MYMODULE_menu() { $items = []; $items['%/review'] = [ 'page callback' => 'review', 'page ...
0
votes
1answer
22 views

restrict page callback url?

With this callback code - is it possible to restrict url just to be example/page1 (2 arg) but not example/page1/321 or example/page1/abc/efg...? // hook_menu example function example_menu() { $...
1
vote
1answer
61 views

Generate PDF with wkhtmltopdf after batch finished

I would like to generate a pdf with wkhtmltopdf at the end of my batch. I integrate the generation in the callback function but it does not offer me the download of the file This is my finished ...
1
vote
1answer
14 views

Using different .inc files with same function names in .module file

In our project, we have this module meant strictly for our custom API endpoints for our mobile applications to use. Currently, this is handled in a single .module file like so: my_project_mobile_api....
0
votes
0answers
21 views

Add helper text to payment method form

I would like to add helper texts to the different options in the payment methods form, in Drupal Commerce, like this: /Radio button/ Payment method 1 Helper text option 1... /Radio button/ Payment ...
0
votes
0answers
18 views

Reference custom entity

I'am on Drupal7 and wanto to reference this custom entity function myentity_entity_info() { $info['myentity_basic'] = array( 'label' => t('Ind (myentity)'), 'controller class' => '...
0
votes
0answers
34 views

How do I get rid of anonymous sessions?

In a Drupal 7 site taken over from an ex-colleague, sessions for anonymous user always are generated as this screenshot shows. The security-scanning service provider always claims: Our ...
-1
votes
1answer
25 views

Translating english node to spanish

How to create a Spanish version of node which is in English and that Spanish version of node should contain all fields from English content except one field. That one field should translate to Spanish ...
0
votes
0answers
21 views

Add the presentation role to an image

I have an events page and I don't want screen readers to pay attention to the image links as each event already has a link associated with it. Having 2 links read out seems like overkill. In my ...
0
votes
0answers
8 views

Simplenews D7 double opt-in view to show who has and hasn't opted-in

I'm trying to work out the % percentage of our users who don't click on the link. I want to set up a view to show all those who have entered their email address in a Simplenews newsletter sign-up box ...
0
votes
1answer
47 views

setup Drupal with Docker: clone repositories via deploy token

I am quite new working with docker. I tried to set up drupal via docker and docker-compose. So far i got a running instance and installed drupal via the installation script. No i want to clone ...
3
votes
1answer
45 views

How do I free the memory used from node_load()?

I am using code similar to the following one. for ($i = 0; $i < 1000000; $i++) { $nid = get_node_id($i); $node = node_load($nid); $data = [ $node->field_1, $node->field_3, ...
0
votes
0answers
30 views

Querying entities taking an insane amount of time

Is the entity system in D7 not very well optimized? I am trying to iterate through 1500 entities using EntityFieldQuery(), and I had to extend my execution time to 300 seconds in order for the ...
1
vote
1answer
18 views

redirect after login in drupal without impacting the password reset functionality

The problem: When using hook_user_login to redirect a user to the correct language this is also triggered during password reset. And the hook params do not provide a way to deal with this. This How ...
0
votes
1answer
13 views

How to make Panel Page variant selection rules detect URL parameter?

On D7 I have set up a new panel page variant and want to use it with a certain selection rule: String: URL path Current path is "*/cars/*?buy" Eg I want this panel variant to be used if the URL ...
0
votes
0answers
34 views

Modify entity values with Views Bulk Operations failed (PHP Fatal error: Cannot unset string offsets)

Related question : How to deal with PHP Fatal error: Cannot unset string offsets in field.default.inc when implementing custom widget? Working on Drupal 7.67 with Views Bulk Operations 7.x-3.5 ...
0
votes
0answers
19 views

dropdown multiple values

I am trying to display multiple values of drop down and store it to the database. How could I do that? Any help would be appreciated. $form['options'] = array( '#type' => 'value', '#...
0
votes
0answers
34 views

Using Payment with Webform and without Commerce?

Has anyone had any luck integrating Webform with the Payment module but without Commerce? I'm considering attempting to refactor Commerce Webform Order so that Commerce integration isn't needed ... ...
0
votes
0answers
17 views

How to prevent page refresh after a button click?

I know this question is already asked, but my problem is different. I have a code field created with Display Suite, that displays an audio player named AblePlayer, with a playlist of three tracks. In ...
0
votes
0answers
6 views

Form still submitted after form_set_error() is invoked [duplicate]

I've a case which is driving me nuts. Form is still submitted after form_set_error() is invoked for an element. I have in form alter function custom element_validation $form['field_test']['#...
0
votes
1answer
51 views

Display the results of a form submit on the same page just under the form

I have created a form and it takes in 3 values which are Brand, Item and Zipcode. The values are queried and the results are fetched the database table. I want the results to be shown in a table ...
0
votes
0answers
7 views

Get date exposed filter value

I have a view with a date exposed filter. I need use this date exposed filter value in custom php code. How can I get current date exposed filter value?
0
votes
0answers
65 views

Getting “EntityMetadataWrapperException: Unknown data property” error when I delete a users custom field

I have added extra fields to the user object. One of the fields I have added was a Skype text field to hold the user's Skype contact information. The field had a machine name: ...
3
votes
1answer
25 views

404 Not Shown For Custom Module - Drupal 7

In a hook_menu() implementation, I am defining a route for login. function my_account_menu() { $items['login'] = array( 'title' => 'Customer Login', 'page callback' => '...
0
votes
0answers
19 views

How to edit the line item manager widget in Drupal Commerce?

On the Commerce Order edit form, we can add a product manually. Using the autocomplete field Product SKU, you may find the exact product you need to add by browsing among SKUs. Unfortunately, I can ...
1
vote
2answers
208 views

Change remove from cart button to an image button

I want to change the remove-button, that removes line items from the cart to an image button representing a trash can like this: The code I am using in a custom module looks like this: <? php ...
0
votes
1answer
26 views

How to alter the search api views exposed form field value?

I have a search api view. Which has an exposed some exposed filters. The exposed filters contains postal code, city and latlong field. The user will enter the city and postal code and then in the ...
0
votes
1answer
24 views

How can I get lat/lon from an address?

I have these modules addressfield geofield geocoder Is there any function to which I can pass an address like Stree, zipcode city, Country and it returns a lat/lon from that address? I have ...
0
votes
2answers
24 views

How to change the value of a commerce token?

When an order is submitted on our D7 site an email is sent to us with all the details of the order, including the payment method. I use the token [commerce-order:payment-method] in the commerce email ...

1
3 4
5
6 7
527