


Show node body fields for entity reference checkboxes widget?
I need to show the body field of the nodes next to their checkboxes in an entity reference field widget (default is just their node titles). Is there a way to do that without writing a new widget? read more
How to populate a node reference field that has multiple values?
I’m using the rules to create a new node upon changing the current node publishing status to published. And populate some field based on the updated node field. Im trying to populate a node reference field in the new created node based on the node reference... read more
Retrieve contents from a JSON URL using cURL and display them in an HTML table
I am trying to display contents retrieved from an external URL using JSON (the cURL method). So i wrote the below function: function file_get_contents_curl() { //JSON URL which should be requested $gry_str = “?timezone=” .... read more
How to add a javascript function after uploading file
I make a form using FAPI, and this form contains a file managed field. I want to show an alert after uploading the file (“uploaded successfully”), and a confirmation (“Are you sure you want to delete file”) when deleting the file. This my code.... read more
Description field has no text format
The Feed module successfully imports a RSS feed. However the Description field does not display. I can only see it if I click on “Edit”. The problem is that the feed-items do not have a text format. How can I give the Description field a default text... read more
Generate unique ID in hook_redirect_form
I’m trying to write custom payment method for a custom bank gateway (off-site method). bank service expect me to send unique ID for each pay request per bpPayRequest() call. currently I sending $order->order_id, but its wrong because: if first request fails... read more
OpenLayers default zoom level
I have a map setup with Openlayers and mapbox. I need to set the default zoom level to be in-between 1 and 2. So something like 1.5, as 2 is too zoomed in and 1 is too zoomed out. I have entered different values under ‘zoom level’ within ‘center... read more
Create a simpletest test to add additional form elements using the "Add another item" button
I am trying to create a test case for my custom module using simpletest in Drupal7. I want to create a node. The problem is that the node edit form contains a number of fields which can have multiple values. Addition values are added by clicking on the “Add... read more
Content region not visible in blocks setup page in Sky Adaptive Theme
I checked the ‘content’ region, being one of the prerequisite regions and it is present and referenced in the sky.info file as well as in the page.tpl.php. That is: (in sky.info file) regions[content] = Main content (in page.tpl.php file) <div... read more
Pre-process drupal_goto or use hook_exit to stop redirect
I want to unit test some drupal custom modules but the drupal_goto() function is causing problems by creating header errors (e.g.: PHP Warning: session_start(): Cannot send session cookie). My question is, is it possible to stop the drupal_goto() function from... read more
Pricing changes based on line item fields in the add to cart form
I’ve been using commerce_custom_product to add custom line items options to products I’m selling in the shop. The shop is selling servers and if someone when adding a server to their cart wants a bigger hard drive for instance they select it in the... read more
Content for textgroup views is not allowed for translation because of its text format
I have this problem with a view’s header. I am allowed to enter a translation but the translated text is not rendered when the view is displayed in that language. I have the following warning in the Views interface. content for textgroup views is not allowed for... read more
Taxonomy term node count with depth
I want to achieve the following term listing: clothing (17) dresses (2) skirts (3) tops (12) accessories (5) bags (1) jewelery (4) necklaces (2) rings (2) Is this possible with views? I know you can use the “Taxonomy Term: Content with term” relationship,... read more
Date with an option for end date being either a date or "ongoing"
I have a content type that contains relevant information of a project. It should hold the projects start date and the end date OR the status “ongoing”. How do I make this happen? With the date field type I can only specify the starting and ending... read more
How to display nodes based on the taxonomy terms of the current logged in user, with multiple vocabularies?
Say I have 3 taxonomy vocabularies: Products, Professions and Support Each vocabulary has 2 terms: Products -> product1, product2 Professions -> profession1, profession2 Support -> support1, support2 Users can be tagged with terms. User A is tagged with:... read more
Aggregation and grouping with dates and integers
I am using Views along with Highcharts Module. Here is my objective: I have some integers that are contained in nodes 3 different integer fields to be exact. These integers occur over a duration of time and are entered on various days. What I am trying to do is sum... read more
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 fields using references. PDOException: SQLSTATE[42S22]:... read more
The link of "Pdf version" on node page does not appear in chrome
I have installed the the print module on my drupal 7 site. I configured the the print module pdf settings. Now the link “pdf version” is displaying with each node on the content area at bottom. When I click on the link, it save the node in pdf format. But... read more