Skip to main content
Share Your Experience: Take the 2024 Developer Survey

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
1 answer
1k views

Webform: POST data and send user to external URL

I was reading this interesting post: Webform - Submit values from Drupal 7 from to external url I'd like to know: instead of just sending the data via POST and keeping the user on the Drupal site, ...
2 votes
2 answers
509 views

My page is in hook_admin_paths(), but doesn't show admin theme

function mymodule_admin_paths() { $paths = array( 'admin-dvr/*' => TRUE, ); return $paths; } I have a module which generates a page and I want that page to be themed with the admin theme....
0 votes
1 answer
2k views

Large file uploads stop immediately, 404 error

I am having a weird problem with uploading large files in the Drupal admin's file field. I have the size limit set to 500 MB. I also have the php.ini settings for upload size, post size, and memory ...
1 vote
1 answer
449 views

How can I create a custom landing page for a specific taxonomy term?

How would I be able to have a customisable page where in it will be a landing page for special taxonomy terms and will display the related articles of a specific taxonomy term. For instance, ...
0 votes
1 answer
475 views

How to send email invite user fill in webform automatically?

I'm using drupal 7, and had a seminar questionnaire form created using webform. I would like to invite seminar attendee to fill in this questionnaire after they attend the seminar, by sending them ...
0 votes
1 answer
652 views

Prevent redirect after submitting the form

In Drupal 7 profile2 module, want to make profile2 edit form to stay on the form itself after clicking SAVE button. With the following code, it stays on the form itself and displays the values ...
1 vote
1 answer
420 views

Pre-Populating a Form Field with something other than its default value

I'm having a strange problem. I am constructing a form with checkboxes to toggle email subscription preferences on and off. For the new user sign-up form, this is straightforward: $form['marketing-...
0 votes
2 answers
844 views

Can I create a link to a taxonomy page?

I have a page that has a single category applied to it, for this example, "Self Help Books". I want to put a place on content type that display a "view all [insert category here]" ...
5 votes
2 answers
3k views

Content type title field not available in manage display

I have two customized content types, both having a title field. Yet this field does not appear in the Manage Display panel. Moreover, they are not displayed when the content is displayed. Is this ...
2 votes
1 answer
964 views

how to index unpublished nodes to apache solr

I want to display unpublish nodes to some of the user roles. The apachesolr by default index only publish nodes. Is there a way of indexing unpublished nodes to the apache solr index?
0 votes
1 answer
534 views

Fallback value for contextual filter, in case the "provided default value" does not exist

I want to display a block on each page (nodes as well as pages created by Views) that displays links to nodes that are tagged with a certain taxonomy term. How to decide which tag should be used: {...
0 votes
1 answer
388 views

How to create queue for email sending

I am using PepiPost mail service and I created custom mail system class for integrating PepiPost service. I can successfully send email from Drupal site. If a connection timeout 504 occurs during ...
1 vote
1 answer
491 views

How to wrap / manipulate element outputs on a form's checkboxes html?

I have the following form that contains a big list of checkboxes. The first checkbox is the parent of the children below it. In my case it is called "Africa" and the ones below it are "Africa-child" ...
0 votes
2 answers
696 views

How to show view item by trimming?

I'm trying to show articles by trimming. So, first I tried it by managing the display of body field to trimmed from content type. After fail to get desired results I tried it with views module by ...
1 vote
3 answers
649 views

Completely hide/remove views exposed form?

I created a view with exposed filters. The only purpose of the filters is to have url query parameters, which are controlled through custom UI elements. There is no purpose in displaying the exposed ...
0 votes
2 answers
440 views

Users cannot log in to new site in multisite

I am working with the Drupal multisite functionality. I have been asked to implement the following architecture: mysite is a Drupal site with several angular pages. mysite/backend is a separate site ...
1 vote
2 answers
477 views

Update command won't work for multisites

I have a Drupal 7 site with a half-dozen multisites/subsites and I am trying to setup Drush so that I can run my modules updates from the command line for the subsites. Running Drush for the main site ...
2 votes
1 answer
2k views

What may cause Column not found (nid) in on clause?

I'm using Drupal 7.14 and Entity API and Reference 1.0-rc3. And I'm also using i18n, entityreference (not References) and field_sql_storage. I get this error when saving a node that has some custom ...
2 votes
1 answer
409 views

Create an Action on 'node_insert' or 'node_presave'

I created a new action on a new node being created, it shows up in my triggers and the action gets triggered. Works so far. Problem is trying to add additional functionality using some submitted field ...
2 votes
2 answers
1k views

How to validate file is selected or not on ajax processed jquery validation

I am trying to do jquery validation on file upload for file is select or not. I want when user click on upload before submit check file is selected or not. if not stop ajax request. Any Idea to ...
3 votes
1 answer
730 views

Why does my site fail after restoring the database?

I tried migrating my Drupal live site to localhost to test it there. I followed the instructions in Migrating a site. Cleared the cache Disabled clean URLs Enabled mod_rewrite Then I backuped my ...
3 votes
2 answers
1k views

Why is redirect after login not working?

I use Ctools Modal to show the login form to users in an overlay. If a user enters right data then he is logged in and the page is refreshed. The code: function login_overlay_menu() { $items['...
0 votes
2 answers
4k views

get file path of image style as replacement patterns in views

i need something like <img attribute1='value' src='sites/default/files/styles/thumbnails/**pic_0**.jpg'> in views. i have to use rewrite result because i need attribute1. but i have no idea ...
0 votes
1 answer
508 views

Using Entity metadata wrappers to change field value under hook_node_insert()

I am trying to change a field value inside both hook_node_insert() and hook_node_update() using EMW. It actually changes the original $node object that is passed to these hook functions but the change ...
1 vote
1 answer
540 views

Adding a subtitle to the main title

My Website name is Subham Soni. I want to add two more lines below it. One as "Developer" and then in another line a quote along with the author. How do I do it?
0 votes
2 answers
1k views

Problem with menu position module

I have a menu like this: In the first sidebar you see the main menu with links. The second sidebar is a block that is visible on pages that begin with stocklijst/. The link in the first sidebar ...
11 votes
3 answers
8k views

How do I get the file URI from an EntityMetadataWrapper object?

Getting hold of file objects related to nodes through a field is easy using an EntityMetadataWrapper: $wrapper = entity_metadata_wrapper('node', $node); $images = $wrapper->field_images; So that'...
10 votes
1 answer
2k views

Programmatically impersonating another user without causing the currently logged-in user to log out

How should a module change the value of the global $user, execute its own code, and restore the original value of $user without causing the current user to be logged out if an error happens?
1 vote
2 answers
693 views

How can I add a field in Entityform / hook_form_alter

I'm trying to add a field to the form in hook_form_alter. What's the proper way of adding fields in this hook in case of entityform? I tried to add it this way: $form['leadname'] = array( '#type'...
2 votes
1 answer
387 views

menu_get_active_trail returns page not found

I want to add a meta description to a custom module 'mymodule', but this doesn't load as expected. The problem is in the active trail, when menu_get_active_trail is called inside array 1 the ...
3 votes
1 answer
574 views

drupal_http_request() returns "Invalid JSON primitive"

I am developing a module for Drupal 7 which calls a remote API. I am using drupal_http_build_query(), drupal_http_request(), and drupal_json_decode(). My code is as follows $username = $form_state['...
1 vote
1 answer
2k views

How do I display, in a ColorBox popup, a caption AND a title (caption from image 'alt' attribute and title from 'title' attribute

I am trying to display in a ColorBox popup, a caption AND a title (caption from image 'alt' attribute and title from image 'title' attribute). The colorbox is opened when an image is clicked. Here ...
2 votes
3 answers
2k views

Looking for something similar to "Views selective filters", just with "inactive" instead of "removed"

The Views Selective Filter module reduces the filter items in a views exposed filter to only those having actually results. I'm searching something similar, but I don't want to hide the options with ...
0 votes
1 answer
394 views

Ckeditor Wordcount plugin - How to target specific textareas

I'm using the CKEditor - WYSIWYG HTML editor Drupal 7 module and wordcount plugin. I've added the wordcount plugin file in the ckeditor plugins directory and got it working, however my config max word ...
0 votes
1 answer
396 views

How to parse definition lists ckeditor?

I want to write definition lists with , and tags with drupal commons 3 in CKEditor. I am writing code directly (while I am in source mode) then switch to WYSIWYG and go back to source. CKEditor ...
1 vote
1 answer
1k views

Hook active trail path

I' am trying to make a custom module to set an active trail path to a menu. I created a views page. The active trail must be to a node or taxonmy term. When I open the pages created by the view the ...
5 votes
1 answer
2k views

jquery date picker in views exposed filter changes the date values

I have a node type "tasks" and created a view so that current logged in user can see his/her assigned tasks. I have used a "time ago" formatter in the field "deadline" which shows the remaining time ...
2 votes
3 answers
552 views

How to create an Ecommerce Loyalty scheme for customers?

How can I create a 'loyalty scheme' where customers are awarded with 5 pence for every £ spent, to be used on furture purchases. The rewards will be saved up until the user decides to redeem them ...
1 vote
3 answers
2k views

Feeds unlock tab

I had one of my feeds freeze up and I can't unlock it. I did some searching and found a function for adding an unlock tab form this page: http://drupalcontrib.org/api/drupal/contributions!feeds!feeds....
0 votes
1 answer
2k views

Making text fields autocomplete in views exposed filters

I want to make a text field auto complete in a views exposed form. I tried using the following code but nothing happens(I don't see that blue icon in the text field): <?php function nk_menu() { ...
0 votes
1 answer
533 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 ...
1 vote
1 answer
762 views

How I can include Commerce SKUs in search result?

How I can include Commerce SKUs in search result? I am using “Search API and Search API Solr” modules. Any suggestions?
0 votes
2 answers
387 views

Delayed error messages for webform blocks in template

I am printing a webform block in my node.tpl.php: <?php $block = module_invoke('webform', 'block_view', 'client-block-72'); print render($block['content']); ?> And when I ...
0 votes
1 answer
508 views

invalid token: [node:title] when Token module installed

I'm on Drupal 7.80 and a Drupal newb so help with how to debug as well as things to try appreciated. Taking over a Drupal install that might have some outstanding issues. Problem: It looks like 'core' ...
0 votes
1 answer
884 views

Conflict between ajax callback and jQuery UI dialog

I have a button that triggers an AJAX callback with the form api like so : $form['show_modal'] = array( '#type' => 'submit', '#value' => t('Some crazy text'), '#ajax' => array( '...
0 votes
1 answer
387 views

EntityDrupalWrapper->value() causes infinite recursion on user login?

I have a few instances on my site where I perform actions on User Login. I create an EntityMetadataWrapper like so: global $user; $uw = entity_metadata_wrapper('user', $user); And then I go to ...
1 vote
2 answers
488 views

How do I retain the query string after login?

I need the user,opening a certain page of my site (www.foo.com/page_to_visit), to login and then go to the requested page, so I set up an hook_menu for this specific page and a callback. In the ...
3 votes
1 answer
1k views

Entity Translation for custom entity

I've created a custom entity and in the next step, I would like to use the Entity Translation module to make the entity translatable. My entity is defined like this /** * Implements ...
0 votes
1 answer
674 views

how to save checkboxes values in node programmatically

i want to save checkboxes values in entity reference checkboxes field with node_save : $form['wrapperrr']['id_offre'] = array( '#title' => t('Liste des Offres'), '#type' => '...
0 votes
2 answers
880 views

Feed Import Error

This import was working, now I'm stumped on why it's breaking. An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /batch?id=79&op=do StatusText: OK ...

1
2 3 4 5
530