2022 Developer Survey is open! Take 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
3 votes
3 answers
1k views

Views UI doesn't provide links to expand fieldsets anymore

I have moved an entire drupal site to another server. While everything else seems to work fine, I can't quite access collapsed fieldsets in Views UI anymore. It looks like this All fieldsets (STYLE ...
0 votes
2 answers
456 views

hook_node_access() returning NODE_ACCESS_DENY is ignored

I am trying to block the current user from performing any action (view, update, delete) on a node. The user should only be able to view, update, delete the node being displayed if he is the owner of ...
3 votes
1 answer
63 views

Is there some way to compress CSS and Javascript only for certain users?

When I check the source of my web pages I am appalled at the amount of Javascript links in the page, but I have disabled the CSS and JS compression as I am often in development mode. Is there some ...
0 votes
1 answer
80 views

Trying to list all articles where category field is empty

I have drupal 7 site and I'm trying to listing all articles (with title) and where category field is empty (taxonomy). I'm running this code in my page with ->isNull and without, but not any results. ...
3 votes
5 answers
1k views

how to get content type field name as drop down for filter in view

In Drupal 7.10, I have created new content type with 15 fields and file upload for collecting input from end user(named inputdata). I need to create a search page with content field of "inputdata" (...
0 votes
1 answer
641 views

jcarousel not working on block?

1) Place this module directory in your modules folder (this will usually be "sites/all/modules/"). 2) Enable the module within your Drupal site at Administer -> Site Building -> Modules (admin/...
0 votes
1 answer
1k views

What's wrong in my code for setting up entity title in a Computed Field?

I have written inside a Computed Field's Computed Code section the following code: <?php //work if the node is new and there is no value for the field yet if (empty($entity_field[0]['value'])) { ...
3 votes
1 answer
2k views

Using Views for a custom table with multi-value fields

I have a custom table with two columns - the primary is simply entity IDs (nids), and then there is a data column, but it it can be a multi-value (from 1 to anything). How can I structure the MySQL ...
0 votes
3 answers
983 views

Organic Groups "create post" content link needed with posting content type specific to group

Organic groups 7.x-2.6 Entity reference prepopulate 7.x-1.5 Hello, I am trying to create custom "create posting" link for my organic groups. Each Organic Group has its own content posting content ...
0 votes
1 answer
549 views

How can I get a default value in a dropdown using form API?

$results = db_select('users', 'u')->fields('u', ['name', 'uid', 'mail'])->execute(); $options = []; foreach ($results as $result) { $options[$result->uid] = $result->name . ' | ' . $...
2 votes
1 answer
883 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?
2 votes
3 answers
7k views

How to improve search results filtering on taxonomy

I would like to know the best way to filter drupal search results using taxonomy. I want users to be able to search for particular results from a particular taxonomy..this can be done to refine ...
4 votes
1 answer
1k views

Using a View in a tooltip for an image map hover link

I have a imagemap with various tags, it works well in my Drupal instance, I can click on the various areas to get to my pages. Now I want to hover one area and display a tooltip with information ...
1 vote
2 answers
429 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 ...
0 votes
2 answers
419 views

Sync user roles across websites

I am using Drupal 7. I want to sync my Drupal website roles on 2 websites on the same top level domain, as in, one is example.com, the other is other.example.com, how can i achieve this? Bakery module ...
1 vote
2 answers
679 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'...
0 votes
1 answer
776 views

Create and pre-populate a mutiple value field in field collection on new node with ajax call

This question is in the same area as a previous I asked (How to create (& pre-populate) multiple “field collection” fields on an ajax call), but with the extra level of complexity that I'm trying ...
0 votes
1 answer
431 views

Get the url for an images in a Field Collection for the Node Template

This is a bit messy so bear with me. I've built a node with a field collection 'field_meet_videos'. That field collection contains another field collection 'field_about_video'. The inner field ...
3 votes
3 answers
1k views

Dynamically add input field using #ajax

As the question says, im not clear on how to go about adding new input fields depending on values of certain fields in the form. I got as far as setting a callback and a wrapper, but i just can't ...
2 votes
1 answer
672 views

Data in field_revision with Create new revision unchecked

The field_data_myfield and field_revision_myfield have the same row entries (D7 fields). All of my content types have the "Create new revision" unchecked. Is this how it's suppose to work? If yes, two ...
0 votes
1 answer
401 views

View displays only the title

I've got a view for the content type article to display them. I'd like it to display the full content or the teaser. As a format I've chosen unformatted list. But whatever I choose (rendered entity/...
1 vote
2 answers
5k views

CKEditor placeholder text doesn't work (config.js)

I'm trying to add placeholder text to my ckeditor screen like for example Type here ... . You can do this with the configuration helper plugin. I've placed the ckeditor library in sites/all/libries. ...
0 votes
4 answers
394 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/...
2 votes
1 answer
745 views

Separate Exposed Filter Widgets

Howzit! I have a sandbox site set up, and one of my views overrides the default taxonomy term page for one of my vocabularies. The image below shows how it currently is (unstyled) - and this works ...
1 vote
1 answer
1k views

How do I enable Backlinks View and What Links Here?

We used the backlinks view in D6, as well as the What Links Here tab for each node. We're now using Commerce Kickstart 2. I don't see that View and it appears that the search_node_links table is ...
0 votes
1 answer
520 views

Move all files and folders from a directory to another directory

I am unzipping some files and folders from an upload but the zip contains the files and folders one directory too deep. So currently they are located path-to-folder/anotherdirectory/ When I need ...
1 vote
2 answers
750 views

Get path of Page Manager page

Basically I have created a page and it shows up fine. When I do a arg or current_path on that page it shows as a 404 path, not the one defined in the page. current_path() => error-404 $_GET[q] =&...
1 vote
1 answer
748 views

Pass multiple ids as Views Arguments in the Rule action Save PDF as file on server

I'm using views PDF to print out a list of nodes on a single PDF, one per page. Now I have more than 1000 nodes/pages on a single generated pdf, so I'm trying to use VBO and Rules to create a view ...
4 votes
3 answers
1k views

Get field_collection values in field template

I have installed field_collection and have a collection called field_contact, each entry of which has a field called field_contact_url I'm trying to customise the display of that field by overriding ...
0 votes
2 answers
474 views

Change HTML output of a view

I have a view which displays products. The fields shown are altered via hook, and I want to add <div> and <h3>, when I find an appropriate field value. (I tried with adding style to the ...
2 votes
1 answer
1k views

Image preview thumbnail does not display

Drupal 7. When adding a core image field to a content type to display an image, the preview thumbnail does not display on the edit page when uploading an image. What appears after clicking on the "...
0 votes
1 answer
742 views

OAuth token parameter missing when configuring Google Analytics Reports

I'm displaying Google Analytics reports at my site using Google Analytics Reports module which uses Oauth. At the localhost on my computer it works fine. But on a site my.example.com it is showing "...
0 votes
1 answer
618 views

How can I programmatically reorder active menu items?

I have an 'audience' menu which has 4 links. When a user visits one of these links, it becomes active, and I want to push it to the front of the menu item list. Outcomes would like like; Pitchers | ...
0 votes
1 answer
584 views

Using 'return' with an ajax callback renders an entire page before my content is loaded

I'm developing a module that uses Openlayers maps and Drupal Commerce. When you click on the map, you should see products that relate to those coordinates of where you click. I have this working ...
0 votes
1 answer
370 views

How to pass theme variables in #theme in a form element?

I need to pass product variable defined in hook_theme() and invoked in #theme but not sure how to pass product variables in #theme Please suggest. function storeinv_theme() { return array( ...
1 vote
1 answer
1k views

Pagination in search results

I have installed search configuration module to alter pagination on search results. I've set the pager limit in Configuration > Search settings > ADDITIONAL NODE SEARCH CONFIGURATION > RESULTS to 3 (...
1 vote
1 answer
477 views

Multistep form loses input when visiting previous step

I am developing a custom module with the ability to store data on an external database using Drupal 7 Form API. I started with the multistep form example, added few more steps and other fields. To ...
0 votes
1 answer
2k views

How to automatically select the organic group audience when adding content?

How can I setup a link on a group page to add content that automatically selects the group audience as the referred group? For instance: I'm a member of the group "Puppy Kittens" and I'm logged in ...
1 vote
2 answers
2k views

Custom field widget form - Multiple values

I've create a custom field form widget for an entity reference field. When only one value is allowed it shows a (filtered) select list, but I want to allow user to assign multiple reference values to ...
0 votes
1 answer
941 views

Change field input type on node edit form

I'm looking to change the input field widget on my form, but still accept the same value at the end of it. I have an integer field, and I only want them to be able to select certain integers which ...
0 votes
1 answer
489 views

“&” displaying as “&amp;”

I'm Using File (Field) Paths “&” displaying as “&” in the file name i tried to solve it by change the the display of the field to plain text and use the token view mode but nothing change ...
0 votes
1 answer
2k views

reCaptcha does not display on modal window(colorbox) webform

I have a webform that I want to add a reCaptcha to. So far I've done everything properly, the webform will display a recaptcha box below the form when viewing the node form. I have a modal window ...
1 vote
3 answers
2k views

Dynamic select lists (dependent dropdowns)

I created 2 dependent dropdowns in Drupal 7. In the first dropdown you need to choose the device, in order to see its attributes in the second dropdown. When an option from the first list is ...
0 votes
1 answer
352 views

file_field_widget_form error when programatically creating nodes

I have a simple routine which I use to create nodes. The logic is something like this: function make_node($node_type, $field_data) { foreach ($field_data as $k => $detail) { $field_key ...
0 votes
1 answer
614 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 ...
5 votes
2 answers
2k views

Passing dates or date ranges into a view as arguments

Drupal 7, Views and Date modules installed. I have a view on a content type with a date field (timestamp, but I can change it if necessary) When I use it in filter criteria, I have no problem to use ...
2 votes
4 answers
2k views

How to delete all translations when deleting a node using default language?

I'm trying to delete all translations when deleting a node using default language? For that purpose, I am using the hook_node_delete, but I am not able to invoke node_delete() from it. It cause a ...
2 votes
2 answers
8k views

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 ...
2 votes
2 answers
387 views

How to hide a field in a views row if the row is about content type article?

I have a view that is showing all my content types. What I want is to hide a certain field in its row if the content type on this particular views row has a content type of Article. How can I do that?...

1
2 3 4 5
530