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

hook_node_access() doesn't work for anonymous users

I am new to Drupal 7, I am still unable to understand hook_node_access operation I am trying to give view access to the basic content types nodes for anonymous users but it is not working. It is still ...
1
vote
1answer
28 views

How to programmatically create an image style?

I need to create image style programmatically in Drupal 7. I found this issue: https://www.drupal.org/project/drupal/issues/2735969 and much more other issues, but all are for Drupal 8. I can't find ...
0
votes
0answers
15 views

How to fire Drupal Rule when more than single term (from multi value vocab) is selected

In this Drupal tutorial - https://www.drupal.org/node/2815377 - the author demonstrates how you can get a rule to fire if you have a field with a vocabulary with terms termA, termB, termC, and termD ...
0
votes
0answers
11 views

Is it possible to rewrite sort field in views (Drupal 7) without using additional modules?

I need to sort by title but some of titles start with a space and sort is putting titles with a space first (before a,b,c, etc). So I would like to use trim when I sort by title. The view is part of ...
0
votes
0answers
28 views

Is there a way to bring content files into views with white space removed?

I am trying to have the title in a view, once as the first letter, once as full title, and then have Drupal group these fields, as follows. A Alabama Alaska Arizona C California Connecticut However,...
-3
votes
0answers
68 views

How much do I need to pay to use Drupal? [closed]

Is Drupal free? How much do I need to pay to use Drupal?
-6
votes
0answers
74 views

What exactly is Drupal? [closed]

I asked this question which I later learned is apparently preposterous and was heavily downvoted. I'm not sure what Drupal is or what it's for. I am wondering of someone could enlighten me, like how ...
0
votes
1answer
14 views

Check if the user has flagged content with any flag

It is possible with the following code to check if a content has been flagged by the current user with a certain flag: $flag = flag_get_flag('flag_name'); if ($flag && $flag->is_flagged($...
-1
votes
0answers
22 views

Warning: call_user_func_array() expects parameter 1 to be a valid callback,

I'm modifying a custom module and when I tried to add a custom inc file, I'm getting the following message: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '...
0
votes
0answers
10 views

How do I restore/recreate accounts created using OpenID after restoring from a backup?

After performing a rollback of our Drupal 7 site, we realized we had 20 - 30 users that were "lost". Looking for the most efficient / possible (?) way to recreate those users with the least ...
0
votes
0answers
12 views

Workflow Rules breaking site deployment

I'm trying to deploy a development Drupal instance to a test environment, but something is going wrong with Rules. I copied the entire site's filesystem, dumped the database with mysqldump, imported ...
-1
votes
1answer
16 views

Alter Webform email body

I'm unable to find an example of altering the body of the Webform email confirmation according to the value submitted. I've got in my form a select field, I would like to change the body of the email ...
1
vote
0answers
22 views

How do I translate a programmatically-created custom block?

I am searching from long hours about this problem. I created a block programmatically, in my custom module, with hook_block_info(). I create its fields in hook_block_configure() and save values of ...
0
votes
0answers
17 views

REST API and Multi value date field

I have a React native front end with D7 backend. I am populating a content type that has a multi-value Date field. I am successfully creating the content-type with all other fields except the Date ...
0
votes
0answers
35 views

Where do I check whether the logged-in user is administrator, moderator, or just an authenticated user?

I have two separate login pages for users and administrators: /users/login and backend/login. I have created a new function in my custom theme. function customtheme_theme() { $items = array(); ...
0
votes
0answers
11 views

Taxonomy exposed fields options should be visible even when there is no result

have a multi exposed filters for a view. All are taxonomy reference fields. For filtering content based on some exposed filters options, for which there is no result, the exposed filters fields also ...
0
votes
0answers
13 views

How to update value of single field of same node using node_save?

The problem statement: I have one content type called 'Employee' which has 10 nodes. I have to perform the voting for each node. I am saving the vote count in the field called 'vote count'. But when ...
0
votes
0answers
7 views

Best way to keep customized ckeditor library up to date

Background A D7 site I am working on uses wysiwyg module with ckeditor library. (I know there is a dedicated ckeditor module, but we want to stick with what we have on this existing website. The ...
0
votes
0answers
25 views

I need to convert a field in a view to uppercase in Drupal 7. The view is in a module with templates

This is a text field that needs to be converted to uppercase. Where do I put strtoupper to covert the field? Module file or in the template file for that view?
0
votes
0answers
14 views

Boost cache files are not regenerating after they expired

We are using Boost static page caching for a website. Cache files are generating when we visit the pages first time. Then after that it never regenerate even after the expiration time is over. Cache ...
0
votes
1answer
34 views

I need to group a view by first initial (A,B,C) but both A and a are considered separate groups

How can I get views to group upper and lowercase together? I have the title field added twice in the view and the second instance under REWRITE RESULTS I have "Trim this field to a maximum length&...
0
votes
0answers
13 views

When is [“und”] necessary in pre process hooks?

I've noticed in preprocess hooks that sometimes a field's value is found at - for example: $vars['field_caption'][0]['value'] and sometimes it's at $vars['field_caption']['und'][0]['value'] Which ...
-1
votes
0answers
16 views

Search for a title doesn't give any search results

I'm using the solr search api, and it's actually is working great. Except, I cannot search for the title of the node, if I do, no results will show up (except if the title is also in the body) But the ...
1
vote
1answer
37 views

Retain Guzzle Session During Batch Operations

On a Drupal 7 site, I am using the Batch API to perform operations on many entities, one at a time. During a typical operation, the D7 site uses Guzzle to make a POST call to a Drupal 8 site. The D7 ...
-1
votes
0answers
15 views

Carousel View items disappear on mobile

I have a Drupal 7 site and on the front page it has a bootstrap carousel View with 3 items. When the page is narrowed enough (happens at about 897px) the items in the carousel "disappear". ...
0
votes
1answer
18 views

get value from content type B, in a view of content type A

i have a content type named songs. among other fields, it has a field named title of the song, which has as its field type the Node reference. i also have a second content type named songsTitles which ...
0
votes
0answers
29 views

Undefined function in module

I use taxonomy_get_term_by_name() in one of my modules, and it throws a Undefined function exception. My best guess is that this is due to Drupal core system not being ready for function calls. I've ...
0
votes
1answer
34 views

Set Default Value for Image Field contain Multiple Images

I've added a multiple image field to the user account that uses the multiupload_imagefield_widget and it works when I edit the account. On the other hand, I have a custom module with a form that I ...
0
votes
1answer
33 views

Change workbench moderation state with VBO does not work properly

I have two workbench moderation states draft and publihsed When I try to change the state of a node from draft to published using VBO's set moderation state action, It actually republish the published ...
0
votes
1answer
30 views

How do I redirect a domain but keep the URL structure?

I have example.com and example.co.uk. They both point to the same Drupal installation on my server, so both domains load the exact same site. I am now trying to redirect the .co.uk to the .com domain. ...
-3
votes
1answer
56 views

How to show Users facebook page feed on their profile page? [closed]

In my website users can specify their Facebook page id in their profile. Then when we view the users profile page it should show posts from the mentioned page as a block. I have developed this feature ...
0
votes
1answer
22 views

How to allow multiple values in a single value textfield

I am using views_conditional module for Drupal 7 and would like to use a comma separated array (i think this is called an array?) of values in the "This value" textfield. For example, I ...
-2
votes
0answers
17 views

different files in single view

I am using Drupal 7 and have created on view with the name daily tasks and uploaded the files one by one from 2019-2020 till date and place date filter in it but now I have some data from 2016-2019 ...
0
votes
0answers
20 views

Views Data Export module duplicates node titles

I need to export a content type that has paragraph bundles. I'm using the Views Data Export module (in CSV format) to do the export. I am able to export the content, but not in the correct format. As ...
0
votes
1answer
28 views

Delegate user administration to a limited set of users

We are currently using the excellent domain module (allows segmenting users by domain) in and the user_import module (allows uploading users via CSV) in Drupal 7. We've got a new requirement where we ...
0
votes
0answers
20 views

Incorrect field of a content type in its display after migrating from a backup

The following two screen shots should explain the issue well: Here I have a content type Poll, where the first field is Question with machine name title. However, in Managage Display tab, the second ...
-3
votes
1answer
30 views

Which version of drupal, php, mysql combination will work on RHEL6? Which version of drupal, php, RHEL will work if we need to use mysql 8.0?

We have a working application which runs on RHEL6 with Drupal 7, php 5.3.3 and mySql 5.1.73. We are planning to migrate it AWS with latest versions which gets support. We need to know the working ...
-1
votes
0answers
12 views

Total paid amount deviates from the order total

A user has an order with a total of $269.35. The amount deducted was $327.48. The payment gateway was Authorize.Net AIM - Credit Card, where the order balance is -$58.13. I have debugged ...
0
votes
1answer
34 views

How do I get the roles of the currently logged-in user?

In Drupal 8 I would use the following code. $current_user = \Drupal::currentUser(); $roles = $current_user->getRoles(); What is the equivalent code I should use in Drupal 7?
1
vote
1answer
43 views

drupal_set_message doesn't display message sometimes

I'm uploading a file, to process and display a message at the end. However, the messages that drupal_set_message is set to display are displayed sometimes and don't display sometimes, even, if the ...
2
votes
1answer
68 views

Drupal downloads the module update but need FTP

As the above screen shots, from Drupal 7 shows, the updates are downloaded! However, it still says Updating modules and themes requires FTP access to your server. I have tried the ownership of sites ...
0
votes
1answer
34 views

Converting a page created with panel into PDF

I'm working on D7 Panels and I created few pages using panel. I have a use case to generate the pdf for the data existed in the panel rather than the whole page with header and footer. Are there any ...
0
votes
0answers
16 views

Optimized images in custom theme

All of the image optimization modules are for images you upload through the admin portal as an Image content-type, but how would one optimize images that are in your images folder in your custom theme?...
1
vote
1answer
17 views

save views->execute result as a static variable

Does it make sense (performancewise) to store view->execute() as a static variable in order to avoid running same view multiple times? And then call view->render() wherewer I want to print the ...
1
vote
0answers
22 views

Local action on node but path a child of node?

I have created two local actions which I want to display on my nodes, General Configuration and Advanced Configuration. General Configuration will show at node/%node, but Advanced Configuration is ...
0
votes
0answers
30 views

How do I convert the text value of the node:field_frequency to the ISO-8601 (Biennial -> R/P2Y) in DKAN 1.14?

I have Dkan 1.14 distribution installed on Drupal 7.67. Also catalog file generation (catalog.xml) is configured for harvesting. When setting up data mapping between Drupal and Open Data entities ...
0
votes
0answers
29 views

Is there a way I can access the user profile picture filename?

I want to create a view in the Drupal 7, where I can show the User Profile picture name (the original which user uploaded) and the path its saved.
0
votes
0answers
43 views

Display the fields of the current taxonomy with an exposed form

I'm using the Taxonomy term view. I expose the "Has taxonomy term" filter to my users in a block. I want to display the title and the fields of the current taxonomy even when a term has been ...
0
votes
0answers
32 views

How can i set an error message in the right place?

Using Webform with custom template, and this code. I have code below for validation and validation errors, and it works fine. But errors always appear in wrong place. I think the problem is with $...
1
vote
1answer
21 views

Make the suggestions of an autocomplete exposed form clickable

I'm using Drupal 7 and Views. I have an exposed form of type "autocomplete". I would like the suggestions to be clickable, which avoids having to click on apply. Do you know how to do it ?

1
2 3 4 5
529