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
373 views

Wrapping fields together in a Views Exposed Filter

I'm trying to insert divs (or any tag) in my exposed filter form with the purpose of grouping related fields together. I want to have something like this: <div class="my-group"> field one ...
1
vote
1answer
431 views

How to make select option works like a button?

I have created a contact form by using webform module, in that I have added one component as reset and the type is select options. My requirement is when I choose this reset option from that dropdown ...
0
votes
1answer
405 views

Set node to flagged by default

I'm using flags on my site as a way of filtering content through views, when a user views a certain node content type, I have a rule setup which resets the value of my flag and sets it against that ...
0
votes
1answer
372 views

XML sitemap module is not updating. Why?

I have Drupal 7.x and the XML sitemap module version 7.x-2.3. I noticed that I have 900 nodes, but only 480 are indexed. I cleaned the cache, ran cron tasks, but nothing changed. The Minimum sitemap ...
0
votes
2answers
540 views

How to pass an array from module to template file?

I have an array printing in module file. I want to theme that array data,so I am not getting how can I get that array data in template file. I don't want to create theme function and all. is there any ...
2
votes
1answer
425 views

How to execute ajax action after image file upload with media widget?

I want to prepopulate some node fields with image metadata (using the EXIF module) right after an image is uploaded/inserted in a node image field with media browser widget and before the node is ...
0
votes
1answer
524 views

Change toolbar config to latest CKEditor toolbar groups

There is a ckeditor plugin that I really want to use (Line Height), but after looking at its .js file I can see that it is configured to work with the ckeditor config.toolbarGroups concepts, which ...
0
votes
2answers
1k views

What HTML tags for image with style?

In below codes, there is style="float: left;" that make the image float. <p><img alt="" class="image-medium" src="http://localhost/d7/files/styles/medium/public/about-us/images/2012/02/28/...
1
vote
1answer
339 views

Mailchimp: How do I find the mapping between drupal fields and the merge fields

I implemented mailchimp in my project about a year ago, I'm using version 7.x-3.6. The client has asked for an extra mergevar for "Gender". At the moment, we just have First Name, Last Name, username,...
1
vote
1answer
53 views

How to hide user picture based on the value of a field in their profile

This last bug is the only thing between be and launching this site. Please help! I have a field called publish photo? that is a checkbox in the user's profile. For users with this box unchecked, I ...
1
vote
1answer
123 views

How can I set a default node owner for anonymous nodes on the node edit form?

This question is refining the poorly asked Is there any easy way to set the default author for a node being edited to the current author if it is currently anonymous? The site I'm working on has a ...
0
votes
1answer
329 views

content type field not printing

In drupal 7, I defined a field for a custom content type and am trying to display its value via page.tpl.php. Nothing is appearing in the rendered page. Here's the relevant piece of page.tpl.php. ...
5
votes
10answers
7k views

Drush CC all returning “No Drupal site found, only 'drush' cache was cleared”

I've tried other solutions, but none of them are specific to my setup. I just started using the new Linux subsystem featured in the recent Windows 10 update. I'm using WAMP x64 v3.0.6, and have ...
0
votes
1answer
339 views

An ajax jump menu using Drupal views?

I've got a Drupal view that contains a jumplist of items filtered by taxonomy (which is pulled from the current page URL). The problem is that I need this jumplist to work without a page reload (so ...
0
votes
1answer
410 views

Internal server error on node save

I'm getting internal server error on node save. In db log messages there is no such error regarding this issue. In apache error log I have these messages mod_fcgid: read data timeout in 40 seconds, ...
0
votes
1answer
379 views

How to embed and play on same page like popup?

I'm learning web development with Drupal 7. I can embed youtube video using CKEditor on a node. I like to play embedded video looks like on YIFY and IMDB as popup/overlay. It means when I click on ...
0
votes
1answer
343 views

How to add onBlur attribute to ZIP code field in Address Field

In order to control the input format in the ZIP code field in the dynamic address fields provided by the Address Field module (I use it in Drupal Commerce) I need to add the attributes onKeyUp and ...
0
votes
4answers
374 views

Theme image broken link

I am recreating an existing website and part of the process is enabling a theme from the same existing site on my new version. The theme is called microsite and has an image located in /microsite/...
0
votes
1answer
665 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
405 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
568 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
445 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
1answer
17 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
411 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
486 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
350 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
37 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
406 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
351 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
367 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
532 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
52 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
41 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
14 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
389 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
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
390 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 ...
0
votes
1answer
400 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
613 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
381 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
945 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
29 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
418 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
446 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
584 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 ...