All Questions

Filter by
Sorted by
Tagged with
1 vote
1 answer
504 views

How do I replace part of a webform component label with a variable token?

I have webform component labels like this: Did [your pet] have any illnesses? and I want to replace [your pet] with a variable token? Do I need to write a custom module or can I do this by editing ...
0 votes
1 answer
1k views

How to get the vocabulary terms for the current language

How do I programmatically get all the terms within a vocabulary for the current language? This is a similar question to Get translated term name, but not for a single term, but for the entire tree.
0 votes
1 answer
480 views

Drupal 7 Webform Components Related To Individual Nodes

I am attempting to create a decision making "questionnaire" in Drupal 7. I am currently using the Webform module to create the questionnaire. The questionnaire (webform) will create a list of related ...
0 votes
1 answer
41 views

Is there an API to read file content?

Most references seem to read files using PHP functions like file_get_contents(), fgets(), fread(), or readfile(). Is there is any Drupal API that allows to read uploaded files independent of ...
1 vote
0 answers
141 views
+50

How can I allow users to change their email addresses without a password via REST/JSON:API?

To change the password of a user account, Drupal requires the user to input their password. I have a decoupled Drupal app using JSON:API. The Nocurrent Pass module disables the password check when ...
0 votes
0 answers
5 views

Theme Drupal comment reply page exactly like comment submitted page

I have created a custom content type 'article' where a custom comment field has been added along with other fields like images, taxonomy terms, etc. In the theme file (page.html.twig) for this content ...
0 votes
3 answers
513 views

How to get searched item value in search form?

How do I get the value of searched item value, if I searched for "cat" in a search box then it also displays on a search page?
0 votes
2 answers
559 views

Geting values for multipart form elements using Twig

Whereever you are, I hope you're fairing well under the circumstances. To some of the hardest hit areas, we are thinking of you constantly. Webform Advanced Elements I am having difficulty ...
0 votes
1 answer
2k views

hook_services_request_postprocess_alter() does not identify the requested resource

According to the Services API in Drupal 7, we can use hook_services_request_postprocess_alter() to alter drupal's REST response before returning it to the user. This is useful if you want to alter the ...
3 votes
1 answer
754 views

dpm function doesn't display results for arrays

I need to work over the hook_menu_alter function and I found that the dpm() function is not working for arrays. I have devel and admin_devel enabled. I flushed all cache to make sure the hook is fired....
3 votes
1 answer
750 views

Using token in page.tpl.php?

I downloaded the social media module and I found this token: [socialmedia:sm-twitter_username]. I want to show it where the Read more / Add new comment section is, under an article. Since I can't find ...
4 votes
1 answer
1k views

How to implement StackMiddleware for a redirection correctly?

I'm working on a redirection (for unauthenticated users) for my Drupal 8 site. Currently, the redirection works however, the redirection persists even after user is authenticated. I found this article ...
0 votes
2 answers
420 views

Insert Record Using db_insert in Block

I have created a block whose content uses the PHP as input filter. What I want to do is inserting a record into a separate database. The code I am using is the following one. $tracker = array( '...
0 votes
1 answer
1k views

How to add a custom field to views block

I have a view (block) created. When I modify the view block, I have only the field "block title" in the form. However they are 3 fields (block title, block description et block body) in a block of ...
0 votes
1 answer
868 views

How to redirect to modal?

I use the module "Bootstrap Login Modal". How to redirect /user/login to <a href="#" data-toggle="modal" data-target="#login-modal"></a> all over the site ?
0 votes
1 answer
2k views

How to enable spell check functionality of Apache Solr using contrib modules?

Apache Solr is designed to provide inline spell checking which basically makes suggestions if it thinks you have misspelt a word. I am trying to work out what is the most simplest way of implementing ...
1 vote
2 answers
5k views

Import xml data

I am new to drupal. To import xml data into drupal, i followed these steps given in this website which i mentioned it below. http://www.drupalprogrammer.co.uk/2012/12/use-feeds-module-to-import-xml-...
2 votes
1 answer
765 views

Data overlay filter

I have an OpenLayers View created to display products at various locations. I have some locations that don't have any products yet; therefore, should NOT be displayed. My page view filters these out ...
0 votes
1 answer
948 views

"Page not found" or "Forbidden" when submitting form Is it a problem with Apache?

I have some reseller hosting and I am running Drupal 7 sites on several different accounts there. I recently noticed a problem when updating one of them. It happens when I am editing content or ...
0 votes
1 answer
751 views

how view count number vote fivestar on comment?

it like this. examp: 5 star ***** (15) 4 star **** (150) 3 star *** (2) 2 star ** (0) 1 star * (12) now. 15 is number comment vote 5star for node this 150 is number comment vote 4star for node this ...
0 votes
1 answer
2k views

Change url alias for user profile pages based on role

I have two sets of users, faculty and staff, with corresponding Profile2 profiles. I can't figure out how to get different paths for users dependent on roles, e.g, staff/userid or faculty/userid. I'...
3 votes
1 answer
560 views

When reimplementing Drupal.tableDrag.prototype.dropRow(), how do I access classes of would-be parent?

Using code below, I can access classes of a row that's being dropped: Drupal.tableDrag.prototype._dropRow = Drupal.tableDrag.prototype.dropRow; Drupal.tableDrag.prototype.dropRow = function(event, ...
0 votes
0 answers
12 views

ECA: Cron Event - View - Message per Mail

ECA: Cron Event - View - Message per Mail I would like to send a notification by e-mail to a user when a certain event occurs. The event is then a view that outputs a content, this content is ...
0 votes
0 answers
8 views

CKEditor not respecting max image dimensions, alternatives?

Even though maximum image dimensions have been set, my users are still uploading massive images using CKEDITOR. this seems to be a known issue with no stable patch. What are good alternatives to allow ...
0 votes
1 answer
968 views

What is the best way to add a confirmation tooltip to the remove button of a managed_file field?

Another Update I'm trying to implement the solution found here: Intercept click event on a button, ask for confirmation, then proceed, but the remove button still submits normally. I know my JS is ...
3 votes
2 answers
4k views

How to translate field collection which has unlimited values?

My configuration: latest dev entity translation and field collection module + patch. I tried: 1. Entity translation is on just for taxonomy term and node, but not for field collection (it triggers ...
2 votes
1 answer
603 views

Change label max length on all field types

The default max length for all labels of all field types is 128. The db can handle 255. So no schema change. How can I change the default max length to 250?
3 votes
3 answers
7k views

Breadcrumb/block settings

Should Views (that are setup as a Page) be able to inherit breadcrumbs/block visibility settings? When I create a Views page, set a path, add it to the menu (then adjust it to be a sub-menu of another ...
0 votes
1 answer
556 views

How we can get the value entered in search API autocomplete field in jQuery?

I got a requirement to send the search text to GTM for tracking purpose. I have a field which is from search api autocomplete module. I am not getting the value in jQuery on click of submit button. I ...
0 votes
0 answers
14 views

How can I set eager loading for a Entity Reference field for Media (Image)?

I see this is done for an image field in the Manage Display options, but can't find this option for Entity Reference fields for Media (Image) with Rendered entity as the format. This affects Largest ...
0 votes
1 answer
513 views

"Image Upload Button" section remove after click on upload

I am trying to edit users's profile page in Drupal 7. I have an image upload button there, but it remove (hide) after click on upload button . But If i login with admin its working fine, means image ...
0 votes
1 answer
474 views

Change sort order for view when exposed filter text field submitted

I have a view that by default is ordered by date. It has several exposed filters one of which is for filtering by text (we use it as a search field). I'd like the view sort to change to Relevance when ...
1 vote
1 answer
531 views

Change the default timezone variable_get from views

What I want is to change the way drupal views get the site's timezone setting. I want to set it manually in code. Searching through the files I noticed that the function "views_get_timezone()" in ...
1 vote
1 answer
550 views

Contextual filter : Override Title

The content architecture of the site which I am working on is something like:- Song - Content type Genre - Vocabulory Song has an entity reference field which points to the terms in "Genre" ...
1 vote
1 answer
627 views

Service Userpoints : Missing required argument points

My environment : Drupal 7 & service 3.x I use userpoints and service-userpoints. I want to CRUD userpoints. So i create a xmlrpc server and test it by Postman from Chrome store. The xml code is ...
0 votes
1 answer
1k views

InvalidArgumentException: Field field_message_header is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField()

At a total loss as to what is the cause of this error. The field was added to a Message Notify template entity. It is basically used as a token in emails sent using that module. The only place in my ...
0 votes
1 answer
3k views

How do I add conditional fields to a paragraph?

I was able to add conditional fields in a paragraph, following Conditional Fields in Paragraphs Using the Javascript States API for Drupal 8, but it controls and hides only 1 field. I need to control ...
1 vote
2 answers
1k views

Views contextual filter - Contains search with taxonomy field

I am searching with taxonomy terms, is there a way to do the search with anything that contains what i am searching for will be returned? For example if i search Amer nothing will return, but i ...
1 vote
2 answers
949 views

One exposed filter for many views/views blocks

I want to have one exposed filter and 2 blocks displaying different content types. They both have 'date' field and I want to show same-day content with one date exposed filter. Anyone knows how to ...
-1 votes
0 answers
29 views

Are there preparatory steps required before moving to PHP 8.1?

Are there preparatory steps required before moving Drupal 7 to PHP 8.1? Everything works correctly on PHP 7.4. When switching to PHP 8.1, some URLs return 500 errors. Switching back to PHP 7.4 cures ...
0 votes
2 answers
1k views

add_where() causes the view not to be displayed

have a page that features a few views based on content types. Each content type includes a keyword field. This page is reached from a short quiz. I'm trying to limit the content in the views based on ...
0 votes
1 answer
761 views

Access MailChimp forms

I currently have a form that it is fully loaded from my Mailchimp Account. I configured it for display as a page using mailchimp configuration page (admin/config/services/mailchimp/signup). Then when ...
1 vote
2 answers
621 views

How do I create and render a custom region?

How do I create and render a custom region in Drupal 7, when the Display Suite module is used? I am not able to show/display a block into a custom region and confused with the files structure. Please ...
6 votes
1 answer
13k views

controller function use with ajax

I have one controller like as below . <?php namespace Drupal\users\Controller; use Drupal\Core\Controller\ControllerBase; class UsersController extends ControllerBase { public function ...
5 votes
2 answers
2k views

How can I manually send order details email to customer in Ubercart?

I have a cron job to read orders from the Ubercart database table, and manually send the order email to the customer. Usually, when customers checkout in Ubercart, they will get their order email ...
0 votes
1 answer
579 views

Source entity type and id in webform node

Im looking for a way to set the source entity type and id to a webform that is inside a webform content type (webform_node) I followed the modal convention: the address of the webform is /webform/14?...
0 votes
2 answers
2k views

Clearing cache breaks site

I'm trying to load a production site in a dev environment using the site's codebase (core 8.3.7, contrib and custom modules and vendor folder) and the current database. After struggling a bit with it,...
0 votes
1 answer
437 views

Enable clean urls drupal 7.56 / nginx - check failed

I have an issue with the clean urls check. When I test there is an error in the Nginx log: 2017/10/06 09:49:01 [error] 468#468: *199 open() "/usr/share/nginx/html/drupal-7/admin/config/search/clean-...
-1 votes
0 answers
23 views

How can I use route from 1 theme into another theme and also altering that route? [closed]

Hy, i have an route abc which belongs to theme1 but want to want to alter that route to xyz and also use this in another theme say theme2, how can i perform this in drupal 8? i also want to use ...
1 vote
2 answers
2k views

How to add twig code in View 'global custom text' field?

I want to show a link when a node is published. I added the Content: Publishing status field and hid it. In global custom text, I added the following code. {% if status == 0 %} <div class="...

15 30 50 per page
1
2 3 4 5
1754