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
1
vote
2answers
467 views

Views : Use a custom template field even if it's excluded from display

In a Views, I have two field : Link field : With 1 to n links to display (excluded from display) Body field : Who use the previous link field (via rewrite output and token) I have created a custom ...
0
votes
2answers
1k views

Perform bulk operations on a custom database table

I have a custom database table. I implemented hook_views_data() to make it available with views. /** * Implements hook_views_data(). */ function uploader_views_data() { $data = array( 'texts' =&...
1
vote
1answer
549 views

how do I build a dynamic URL in views?

I am using drupal 7, have a content type and two taxonomy categories, size and shape. Im trying to build a dynamic url such as mysite.com/node/nid/tid/tid, which would get rewrote as e.g mysite.com/...
1
vote
1answer
487 views

Create a View of Books

I'm using the core Book module for organizing meeting notes and documentation. How do I create a list of books with the views module? That is, I'd like a list of only the top-level Books, not all the ...
23
votes
10answers
37k views

dpm() does not display any results on screen

I have the same problem as file_scan_directory() takes about 10 seconds to execute. I just tried the dpm(func_get_args()) suggestion, and unfortunately it doesn't show anything to me. I've cleared ...
0
votes
3answers
2k views

Automatic Node Expire / Unpublish with Renew Option

I have a classifieds site and would like to have a node expire after 45 days (unpublished), no matter how many times the user edits and saves the node. However after the node expires, the user has the ...
0
votes
1answer
601 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 ...
1
vote
1answer
450 views

How to add an autocomplete field to a form

I've got a page that, in response to a button click, brings up a Bootstrap modal form. In that form is a textfield with the standard Drupal autocomplete behavior; it's working fine. I now want to ...
1
vote
1answer
541 views

Fetch result of query twice

I faced with problem while fetching query results, my code: $result = $query->execute(); $array1 = $result->fetchAllKeyed(1, 0); $array2 = $result->fetchAllKeyed(2, 0); But the $array2 is ...
-1
votes
0answers
34 views

Writing to the db from a module isn't working

In a custom module in Drupal 7, I have a form that checks if a site title translation is entered in variable_store and then creates a form which has as a default the site title (which can be updated). ...
0
votes
2answers
545 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....
0
votes
1answer
405 views

Endpoint services with url alias name

Is it possible the to view xml/json format data with url alias name instead of endpoint_path/node/1 or endpoint_path/node/2
0
votes
1answer
746 views

Load Javascript when a particular form is loaded

I have the code below in my own drupal module(myid): myid.module file: function myid_init() { drupal_add_js(drupal_get_path("module", "myid") . "/js/myid.js"); } function myid_menu() { $...
2
votes
1answer
537 views

How to deal with login attempts coming from 1-127.0.01 and what does it means? [closed]

Recently on my drupal 7 site happens that i find the admin account blocked. Looking to the flood table i see a lot of failed login attempts from ip "1-127.0.0.1". It's an external attack or something ...
2
votes
1answer
735 views

How do I change the order of the form elements?

I am using Drupal 7, and trying to make a custom register form to fit my needs. I am also using a contrib module named "Auto Assign Role" to let the user choose his role. Now heres the issue, the ...
1
vote
1answer
422 views

Change the bulk operations confirmation page

How to change confirmation page in bulk operations? Currently it is printing "You selected the following 4 items:". I want to list titles of all items included in the bulk operation.
1
vote
1answer
747 views

How can I get the translated path to the current node?

How to get path to current node but of another language? Available languages: English (URL prefix: en) Polish (default, no URL prefix) Enabled detection methods: URL (by prefix) Session (parameter:...
0
votes
1answer
818 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
873 views

How do I set the sender name?

When emails are sent from my dev drupal site to new users the sender is listed as the first part of the site's email address ("info" from "info@mydomainname.com.au" (screenshot below)). Ideally I ...
2
votes
1answer
632 views

How to set up path for library and include files

In Drupal 7, I am writing PHP from inside the Front Page module, say: $page = include_once "templates/page.php"; I put the "templates/page.php" under /sites/all/modules/front and Drupal complains ...
50
votes
17answers
136k views

Configuring the temporary directory

I have recently moved a site from a localhost to a VPS. I have managed to make the public and private files writable; however, I am not sure where to find the temporary folder and how to change the ...
0
votes
0answers
24 views

hook_user_insert() doesn't fire a custom rule

The operation should be as follows: Trigger an event after registering a new user. test_rules_rules_event_info (example_rule_event) it's my event test_rules_user_insert when a user is registered ...
1
vote
1answer
420 views

Custom php code using the site header and footer

I have a very complex page (Multiple Ajax calls and access to other three other mysql databases) that i would like to create within Drupal or find a way to embed it into Drupal. Now I do not want ...
0
votes
1answer
512 views

View displaying field collection items based on taxonomy term

I have a set of nodes that include a field collection item GeoImages. (Each node can contain multiple Geoimages, if that's relevant). Geoimages includes (among other fields) an Image and and Image ...
0
votes
1answer
706 views

Accessing fields from view template

I have a block view which filters for a specifiy content-type. I'd like to fully style it myself and also write the html myself it outputs. So I went and created the file views-view-fields-header-...
1
vote
1answer
401 views

How to manage Sticky Content?

I want to manage sticky content on front page of website. I have made five content sticky on top for front page but my query its show by default according to publish date order but I want to fix the ...
7
votes
3answers
4k views

How to output plain URL to the node in Views?

I would like to output plain absolute URL of the node from Views as part of my XML feed (via Views Datasource). So far I have found the following field handler: Content: Link - Provide a simple ...
3
votes
2answers
634 views

hook_node_insert() sporadically not being fired after node_save()

I have a situation where, every once in a while, I'll save a new node, and hook_node_insert() appears not to be called--AT ALL, for any of the modules that implement it. For example, if I look through ...
1
vote
1answer
559 views

How to capture form fields to programmatically create new users

I briefly worked with Drupal several years ago, and now have come back to it for a single project. For all intents, I'm a total beginner. I need to create a new user from a custom form (html in a ...
0
votes
1answer
463 views

What configuration is required to use date_views with a field?

I have a custom entity "referral" which is available for views: function mymodule_entity_info() { return array( 'referral' => array( 'label' => t('Referral'), 'controller ...
3
votes
6answers
2k views

Oauth and Facebook

Is there a way to make users auto register to a Drupal site if they are logged in to Facebook? I know Drupal for Facebook and Facebook - Auth but they are using tables, and not user profiles.
2
votes
1answer
626 views

Why cannot anonymous users vote, even though they have permission for it?

I installed the Fivestar module and added the Stars (rated while viewing) field in a content type. I gave to the rate content permission anonymous users. They can see all the content and the voting ...
0
votes
1answer
557 views

View not displayed for other roles

I have a block view that displays own articles created (this view is inside a panel page). But this view didn't displayed for other users except administrators, or when I check the permission 'Bypass ...
0
votes
3answers
548 views

Organic-Groups multisite architecture

I have a task to build a series of websites all related to the same core business. Initially, I was going to build each one as a separate website. Later however, I was told the sites have to be able ...
1
vote
1answer
445 views

Can I create an “unlimited” values variable?

I'm trying to create an exclude list of sorts that is configurable via the variable admin interface. I have created lots of single value variables, but never a variable as an array where through the ...
0
votes
1answer
469 views

Adding zip archives to the Document File Type

I have many PDF documents in my site, assigned to the Document File Type by the File Entity Module. I have added a few fields to the content type, thus allowing nice interface in showing all PDF ...
1
vote
2answers
461 views

Hide url in subdirectory install?

in my site I use version 7 of Drupal and Linux OS on the server, and need to hide the subdirectory of the installation when access by LINK ... explaining better: Current link: www.site.com/folder I ...
0
votes
2answers
408 views

Titles not showing for tabs pages

Below is the array in my hook_menu The only issue that I have with it is that the titles are not displaying for tabs pages (the last three array collections). They are showing the title for the ...
1
vote
1answer
403 views

How to delete a large amount of nodes effeciently during cron?

I implemented hook_cron() to delete nodes older than 30 days using node_delete function. Tracing the performance displays this: 2015-07-06 21:28:49 Drupal watchdog ApCleanup::node_delete|/fpe/...
0
votes
1answer
6 views

How to allow access to page variant (Page Manager) if user belongs to list

The Situation I have an ECK entity called "Event" in my Drupal 7 site. I have an entity reference field on Event that collects users who flag the Event with a non-global flag called "...
1
vote
1answer
416 views

Checkboxes, Radios, 'select or other' wont render inside table select element

I want to render elements of type checkboxes or radios inside tableselect, but what I get are empty html tags. Textfield and select type elements render fine. Basically this renders fine. $...
0
votes
2answers
550 views

How to hide nodes in a VIEW where the user is not referenced?

This is a follow-up to How to show nodes where the user is (not) in the reference field with Views? I have a node with multiple user references and need a node VIEW that hides all nodes where the ...
0
votes
1answer
473 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 ...
3
votes
1answer
417 views

Limit menu items available as possible parents on node creation

As I create a node I want to assign i to a menu item parent. I know that I can limit it to what menu(s) are available on: /admin/structure/types/manage/my_type But it would narrow it down to "only ...
0
votes
1answer
423 views

How to remove “catalog” from Ubercart Catalog View URL

I need to remove the word "catalog" from the URL when viewing a category of products. I am using the stock uc_catalog view. Its Page (Table) display has a URL of "/_catalog". What can I change so that ...
3
votes
1answer
496 views

Adding confirm email field to entityform

I am using email field module and entityform for a simple contact form on a Drupal 7 install. I need to add an extra field where the user re-enters their email address (no copy and paste) to prevent ...
1
vote
2answers
640 views

How to display the output of my module without clearing cache and refresh page?

I created a very simple module which generates a tag cloud based on user input; you can see the code here. // wow.module function wow_menu() { $items = array(); $items['wall/of/words'] = ...
1
vote
1answer
398 views

exporting/importing nodes without losing disqus comments / social media stats

I've been working on a website and the live version there is still content being created while i develop the local site. Whats the best way for me to import the new nodes that have been created on ...
1
vote
2answers
723 views

How to get a complete list of blocks that are active content on current page?

I'm trying to get a full list of blocks that are active content on the current page. Preferably it would include details of what type of content is displayed in the block. I need this information to ...
0
votes
1answer
335 views

Can't get fid of the saved file after file_save_data

I have been trying to get the fid of the file which my custom module is saving and every time I end up getting the error "Trying to get property of non-object in report()". I have tried file_object->...