Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [7]

Version tag to tag issues specifically related to Drupal 7.x. Please note that version tags should be used only 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
1answer
660 views

How to use drupal_add_library with a module?

I'm new to Drupal and don't really understand how to set up drupal_add_library. I've made a simple module that links out to a .js file. However, this .js file depends on a couple of generic functions....
1
vote
1answer
389 views

Get the breadcrumbs for a specific node other than the current

I have a list of nodes created by a view. Those nodes tend to have titles that are mostly the same, but since they are in a rather logical hierarchy defined by the menu I'd like to output the ...
2
votes
1answer
561 views

How to implement Drupal ajax API on non links and not form submit

There are many examples how to make ajax form submits and also many examples how to make drupal ajax links. But how to attach ajax click events for example on <button> or <div> elements?
1
vote
2answers
438 views

Change page URL structure based on node field value

I'm using Pathauto to produce nice URLs for my Drupal 7 site, and have run into the need to edit the URLs based on a node field value. Specifically, when the content is archived on my website, the ...
2
votes
1answer
1k views

How to set a validation error via ajax?

I am using the formapi to create a form. On one of my fields I have an #ajax call. When the field is changed I call the function. I recreate the form and then replace the whole form on the page. This ...
0
votes
0answers
13 views

How can I make the coupon code field in commerce mandatory?

Using D7 commerce coupon/discount modules. I need to make the coupon field mandatory. There is no standard "required" checkbox on the field and I tried using conditional fields module to no avail.
0
votes
1answer
16 views

Override a file from the parent theme

Adding in the child theme a CSS file with the same name as the parent theme CSS file overrides the parent file. It doesn't seem to work JavaScript files. How can I override a JavaScript file loaded ...
0
votes
2answers
409 views

Collapsed and collapsible Field Sets in Admin

I have created a fieldset (which groups a field collection). Because it has a few nested levels and many fields, I want it to be shown collapsed. I am trying this code but it does not work. The id is ...
0
votes
1answer
15 views

Alter Add to Cart form POST data provided by #action

I am going to be phasing out Drupal Commerce on our website in favor of a new custom built application that is hosted at another URL. Without completely rebuilding everything I am trying to override ...
0
votes
2answers
484 views

set min - max values drupal date_popup timepicker

Is it possible to set the minimum and maximum values of the timepicker in a date_popup field? I use this code for the field, but something like 'minTime' is not working. $form['fetch_date'] = array(...
1
vote
1answer
349 views

How to send a vote using Advance Poll and Services Voting Api?

I need to expose a poll to a mobile app. After doing some research I found out that I could receive the votes, through a web service, using the services_votingapi module, and the go-to poll to use was ...
0
votes
0answers
26 views

Remove duplicate records from view result with pager

My project is setup in Drupal 7 and i am using search API for display my custom search result. Actually i want to show search result based on two content types content so i have configure the search ...
0
votes
1answer
404 views

Combine hook_search_execute

I have hook for user_search_execute and node_search_execute for both user and nodes but i want to merge both into mymoduel_search_execute but only node_search_execute uses index not ...
0
votes
1answer
336 views

User must click Back button twice after adding item in cart

I have added Drupal Commerce in an existing D7 site and I use the existing product nodes, in which I have added the Add to cart form. Everything looks nice and works fine, except for one thing. When a ...
1
vote
1answer
366 views

Strip overlay context from File field

I have a basic File field set up to allow my users to attach files to nodes. However, the File field widget in the node edit form displays files as a link to the file, and the URL contains #overlay-...
1
vote
1answer
531 views

Sending email notifications to webform submissions

I am trying to create a rule that will send an email to a list of webform submissions, notifying them when new content is created. So far, here's what I have: Event: after saving new content of type [...
0
votes
2answers
51 views

Create a Corresponding Entity Reference preset programmatically

I'm using the CER module in Drupal 7. Is there a way to create a preset programmatically?
1
vote
2answers
38 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
414 views

Ajax Form Not Working in some Some Regions

I created an ajax based contact form in my module.Then I made a block view for the form. I tried putting that block to several regions. When I put the block to 'Sidebar Second' the form works as ...
0
votes
1answer
12 views

How to create programmatically multiple URL alias of same taxonomy term?

I have category cars and I want to create its URL alias according to the region like if the user location is Australia than URL will mysite/australia/cars similar if the user location is USA than URL ...
0
votes
1answer
382 views

How can I query and order nodes with multiple date field values within a specific range?

I'm trying to get nodes that have date fields (multiple instances in some cases) and display them sorted ascending by start time for a given date. For illustrative purposes, here are some events and ...
0
votes
0answers
16 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 ...
0
votes
1answer
389 views

Errors when Taxonomy is chosen in node's Term Reference field

I have created a vocabulary called "Recipes" with several terms underneath (Appetizers, Dinner, etc). I also have a content type called "Recipe" with a Term Reference field for the Recipes vocabulary. ...
3
votes
1answer
388 views

Some fields are not sorting properly in view

I'm trying to create a directory list in view. But some of the fields are not properly sorting. See the below image for my view configuration. And the output of the view. Update: Style setting ...
-5
votes
0answers
65 views
+50

Installed module not working

I have a website hosted in Pantheon and I am trying to install the Security Kit module to the live website. I tried installing it on DEV (dev.website.com) environment, and then moved the code to ...
0
votes
1answer
396 views

Node is not created, but nid is returned

I have this code in my module. $node = new stdClass(); $node->title = "YOUR TITLE"; $node->type = "page"; node_object_prepare($node); $node->language = 'it'; $node->uid = 1; ...
0
votes
1answer
602 views

How to unblock IPs in bulk?

I use the Drupal Core IP blocking feature (/admin/config/people/ip-blocking) to block IP addresses during spam attacks. However, as most of these will be dynamic ones owned by legitimate users a day ...
0
votes
1answer
378 views

How do I add a more/less link in block?

How do I add a more/less link to drop-down and roll up a block? I have a custom search block with a lot of field items and as such, the block is so long. I want to be able to add a more link to drop ...
0
votes
1answer
940 views

Display date picker not inline in Drupal 7 Forms API

I have installed Date Picker Module and it works fine. Below is the code: $form['date'] = array( '#title' => t('Select your birthdate'), '#type' => 'datepicker', '#date_format' =&...
1
vote
0answers
25 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
1answer
4k views

hook_preprocess_html in my module

I am having a content type with fields select list, js, css, and body. In the select box it list a number of templates to apply on the current node. I have these custom templates in the templates ...
0
votes
1answer
417 views

Unknown engine type outputformat

Hello I've just updated Drupal (to version 7.53) and now in Drush when I try launch the commands: "drush @theflyingeye.org up" (to update my website) or "drush @theflyingeye.org cc" (to clean chache) ...
1
vote
1answer
366 views

Help with Theme Function

I can't get the theme() function to work. Cleared cache too. If I rename the function to: theme('wow_template', $output') it works but anything other doesn't. function wow_page() { $cloud = '...
1
vote
2answers
441 views

Views date filter by year - only one select list for the year

I have a content type "news" and a views page to list the news. The views contains a exposed filter (category and year). How can I realize the select list "Year" with the follwing options as exposed ...
0
votes
1answer
570 views

Add popup within the ckeditor dialog box?

Here is the scenario. I had added a custom plugin in ckeditor. The plugin provide a button on the editor menu and when we click on that button ckeditor dialog box opens up with a text field and and a ...
2
votes
1answer
331 views

Correct way to extended Field Settings

I'm doing something that works fine but I get the feeling there is a better way. I have managed to extend the field settings in the field's manage page to add two new checkboxes. The checkboxes in ...
0
votes
1answer
409 views

Taxonomy Term showing strange text

Having taxonamy term issues - as glossary terms showing with text below the text saying "There is currently no content classified with this term." does anyone know how to remove or hide the ...
4
votes
5answers
17k views

Render custom block by block name

I have created a custom block in the Drupal CMS. Say it is called "test_block". Is there a way to render this block in a template file using the name of the block? Thanks,
0
votes
1answer
378 views

Facebook Album fetcher

I am using facebook album fetcher module. It shows an error message An unknown error occurred while trying to fetch the album (empty reply). Can anyone tell me how to resolve this issue.
2
votes
1answer
414 views

Custom template for each profile2 profile type edit form

I am working on a Drupal 7 site and for a few days now, I've been struggling with this problem: I am trying to create a custom template for the edit profile form, but there are more profile types. I ...
0
votes
2answers
430 views

How to process a multiple values field (comma separated) in a Rules Action?

I am using modules "SMS Framework",Clickatell for sending message and I have configured all the settings which was required. I have also created a rule where node (Article) be saved and send a message....
1
vote
1answer
414 views

How to hide the (-) sign from facet filter block?

I am displaying faceted blocks and current search block on the search page. When I select a filter from any faceted block, it appears in the current search block and also in that faceted block with ...
0
votes
1answer
343 views

AJAX form doesn't update form on second submission [on hold]

I have an ajaxified form which does successfully update the form on the first AJAX call but not the second. When I debug the code, I see that the same AJAX command is returned in the javascript ...
0
votes
0answers
16 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
385 views

How can I create the views pager on top and bottom of the view?

I need two view pagers / pagination to sandwich the view content or view results. Is it possible to duplicate view pagers/pagination ? What i've done is just printed out the pagers in the template ...
1
vote
1answer
435 views

Can we call submit handler of one form into another form?

Can we call submit handler of one form into another form? I have two forms say user profile form and choose membership plan I want to unset submit function of choose membership plan and want to show ...
0
votes
1answer
498 views

How to use form_set_error if no form field is involved in the error?

In a form_validate hook, I have some custom validation and I'm using form_set_error('field_foo', "error_message"); to show validation errors. If the validation returns an error that is not linked to ...
0
votes
1answer
492 views

How to use the uc_csv module for getting reports

I am using the ubercart module for purchasing products. I want to export the order records/history as csv file and view it in spreadsheet. So I searched and got the uc_csv module. I have installed the ...
2
votes
1answer
427 views

Migrate : Update not working

Im using the migrate module to import data from a json feed. Mostly work fine however, i require that each time the feed is imported , updated records in the source are updated in the destination if ...
0
votes
1answer
423 views

mod_expires enabled and cache flush

I my apache I have mod_expires enabled. My htaccess contains: <IfModule mod_expires.c> # Enable expirations. ExpiresActive On # Cache all files for 2 weeks after access (A). ...