All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
349 views

How can I use tokens for Addressfield values without using Addressfield_tokens?

I would like to use the Town/ City field as a token for Pathauto. I thought the Addressfield_tokens module was perfect for this, but Entity Tokens breaks Pathauto's patterns control panel; the issue ...
2
votes
2answers
3k views

How can I change the temporary file directory path without the UI?

In Drupal 8, Is there any way to change the temporary file directory path if I don't have access to the UI page /admin/config/media/file-system, either with Drush or by modifying a config file?
-3
votes
0answers
12 views

Drupa 7 getting error of production file on local server such as xampp [closed]

drupal 7 website ulr on production server like www.drupalweb.com and i want to setup on local machine on xampp server as http://localhost/drupal_7/, but get encountered error how to config this?
1
vote
4answers
828 views

Create duplicate registration form with extra fields

I have a site built using Drupal 7. The site has a registration form now. There is a new requirement to add a couple of new fields in the registration form and put it in a new page. http://example....
30
votes
4answers
18k views

How know if user is visitor or logged member?

How can I determine programatically whether the current user is anonymous or authenticated?
1
vote
1answer
541 views

Install Admin Theme

I have a question that hopefully has a simple solution. I'm trying to get the Adminimal Theme as my admin theme. What I do is, install the theme with composer. composer require drupal/...
0
votes
1answer
17 views

How to add Download link to File field

I would like to know how I can make File field type display the upload as a download link, instead of having a link. So that user can just click and it will download). The file field type, I added to ...
-2
votes
0answers
11 views

iterate on views in order to get views total rows programmaticaly, for each organic group member [closed]

In order to get the number of rows a view returns, I could add an element on Header, from the interface. I can cLick "Add" in header section and then add a "Global: Result summary" field. If i have ...
1
vote
2answers
33 views

How can I filter child terms in an exposed filter by parent term from contextual filter?

I have a vocabulary of Districts with nested taxonomy terms like below. I have a view of taxonomy terms in Drupal 8 which has an exposed filter of all terms with parent and child. What I want is that ...
0
votes
1answer
15 views

REST Api user login

I'm working on a react-native application with a clean D8 setup. I'm new to both. For some reason, my asyncstorage is being cleared on the emulator so I land on the login page even though I have an ...
0
votes
2answers
625 views

How do I allow full HTML while rendering a view?

Some HTML code like <iframe> is stripped out. How can I allow full HTML in a view? $options = array( 'id' => 'area_text_custom', 'table' => 'views', 'field' =&...
1
vote
1answer
852 views

How can I get webform file upload to display a thumbnail instead of a link?

I have a webform with a file field. When I upload the file I want to return a thumbnail of the file. Is this possible? If so how can I achieve this?
1
vote
1answer
24 views

How can I know if a type of content is moderated?

I'm trying to find out if a type of content (not a node) is being moderated. How can I determine it? For example: function MY_MODULE_form_node_type_form_alter(&$form, FormStateInterface $...
0
votes
1answer
338 views

SSESS Cookie (Session ID) is being changed when loading images that don't exist

I have a Drupal 8.6.10 site which has a very confusing logout bug: I have a page that has various elements on it as images, js, css and so on. I load that page and everything works fine I add an ...
1
vote
0answers
19 views

How to attach xdebug to drush in docker

How can I "attach" xdebug to drush in a docker container? By that I mean, how can I have xdebug show me a history of an import script? And to look at the single variables that are defined and ...
-4
votes
0answers
13 views

how to Display an uploaded image in a webform, rather than the filename? [closed]

IM using drupal 7 , while im uploading a picture via file upload .its coming up with name of the file , i want the image file to be like thumbnail
0
votes
1answer
42 views

Notice: Trying to access array offset on value of type null in while installing drupal

I am new to drupal. I have downloaded and extracted drupal into a folder. I have installed apache and PHP on my Manjaro Linux. here is my drupal specific apache conf:- Alias /noone/blogindrupal "/...
1
vote
1answer
460 views

Access to core comment preprocess variables in a custom comment layout twig template?

In Drupal 8 I have a custom comment type and when I use the default core comment.html.twig to render the comments then variables like 'new_indicator_timestamp' and 'parent' get rendered as expected. ...
8
votes
2answers
3k views

What is the equivalent of hook_translated_menu_link_alter() to Alter a menu link?

I want to alter the menu link in Drupal 8. In Drupal 7 we can achieve this using hook_translated_menu_link_alter function module_translated_menu_link_alter(&$item, $map) { global $user; if (!...
0
votes
1answer
521 views

Populating select list from a taxonomy term field

I'm trying to populate a select list dynamically by pulling its values from a taxonomy term field linked to the current-user account. Just to clarify, below function is a hook defined by a module that ...
7
votes
7answers
34k views

How do I turn off maintenance mode?

Does anyone know how to turn off maintenance mode for brainfx? I tried http://www.website.com/?q=user/login but that gives me a blank page (no html source or anything). I tried the following query. ...
2
votes
1answer
104 views

Entity field query condition to match multi-value field

Using EFQ, I want to add a fieldCondition that has to match both values in a multi-value field (fixed at two values). The following doesn't seem to work: $query = new EntityFieldQuery(); $query->...
0
votes
0answers
5 views

How can I use Tokens [uc_Coupon] with Search API with a custom coupon Server/Index?

I was wanting to create a custom block where an end user can search with a Search Input for an UberCart Store Discount Coupon via the Search API and after some 4 hours research, I'm stumped as to ...
1
vote
1answer
398 views

How to add an existing variation to a product

How to add an existing variation to a product? When I create a product the form forces me to create a new variation, but I also want to add an existing one to the same product.
0
votes
1answer
816 views

Firing a Ctools Modal on a link click

Once again, I am stuck asking questions on CTools that people have asked a million times before. I have a view that displays a list of custom-developed entities (built with ECK) and each one has a ...
1
vote
2answers
940 views

Webform Custom-Field Module and validation

I am currently working on a Webform that is used to enter some rather complex finance information (think tables with sums and other weird checks). Since the styling has to be rather specific for this ...
0
votes
0answers
29 views

Exporting and using site config / data? [closed]

I am still quite new to Drupal. I'm working through Lando to run my sites (locally for now) and I'd like to download my site elsewhere and actually edit, say, the blocks or pages I've setup. I'...
0
votes
1answer
329 views

Change a paragraph link field title at runtime

We have a site with numerous paragraphs, one of which is a Call-to-action, comprised of a title, summary and a link field (machine name: field_link). The CTA is used so much that to change the word '...
0
votes
1answer
404 views

How do I add fields and hide them from client?

I added fields to a Client profile using Profile2, such as first name and last name. But I added another fields, let's call it "Assigned Consultant". But the "Assigned Consultant" field... I don't ...
3
votes
3answers
1k views

Is it possible to integrate Zoho CRM with Drupal Webforms?

How would one integrate Zoho CRM with the Drupal Webform module? Salesforce has a webform module that woks well. As I understand the webform module API is different to the Drupal forms API, making it ...
10
votes
6answers
2k views

How do I allow a free product into a cart, but only if cart net value is above $10?

I'm interested in running a promotion ... I'd like to make a product free if the customer's cart total is $10. I was able to do that with this module: http://drupal.org/project/uc_discounts_alt ...
1
vote
1answer
15 views

How to use % arguments in Easy Breadcrumbs “Paths to replace with custom breadcrumbs”

I am trying to give a more logical breadcrumb flow to the Drupal Commerce 2 checkout path, as Commerce doesn't support breadcrumbs in the checkout process. When not displaying the current page in ...
0
votes
1answer
2k views

Making text fields autocomplete in views exposed filters

I want to make a text field auto complete in a views exposed form. I tried using the following code but nothing happens(I don't see that blue icon in the text field): <?php function nk_menu() { ...
1
vote
1answer
2k views

How to redirect the checkout complete page?

In my Drupal Commerce site, I redirect to a local payment API with a custom module after the user selected the local payment gateway in the review order page. The users enter username and password in ...
4
votes
2answers
2k views

Give a role permission to add and edit their terms in a taxonomy

In Drupal 7 I am trying to give users the ability to add terms to a taxonomy and then edit only the terms they have created. I'm using the Taxonomy access fix module to give users permission to add ...
0
votes
0answers
20 views

Blazy lazy loading still initialise all images when inspect page at first time in inspector Network tab [closed]

I use Blazy module version 1 8.x-1.0-rc4 in my Drupal project. I can't update now to version 2 because the Slick module version is also version 1 and can't update this module at the moment. I try to ...
0
votes
1answer
834 views

Embed Views remove pager

I have embedded view in a node with following code: <?php $view = views_get_view('articles'); $view->set_items_per_page(1); $view->set_offset(2); print $view->preview('page'); $view-&...
0
votes
0answers
8 views

MY_MODULE_entity_bundle_field_info_alter not firing in multistep commerce checkout page

I am trying to add a custom validation constraint $fields['field_phone_number']->addConstraint('CommercePhoneNumber'); via MY_MODULE_entity_bundle_field_info_alter but am having trouble getting the ...
5
votes
2answers
9k views

How do I get the content type of a node entity from the $entity object?

I'm using hook_ENTITY_TYPE_presave() to alter the values of nodes upon saving, but I only want to do this for a specific content type. How do I check the content type of the $entity object? I looked ...
-2
votes
0answers
25 views

how programmatically update the image field, in the webform element type Image Select? [closed]

This example shows the parcel because in administration mode sets the wms request by default in the configuration of elements, but I need to do it by programming for when I go to the second page the ...
1
vote
1answer
348 views

Rules: How to send an email when an OG membership field changes its value?

I have some OG groups in my site. Each group is an online classroom. The membership has a few fields (I use the default membership), and one of those fields is a select field with "approved" or "not ...
1
vote
0answers
17 views

Trying to access my old Drupal 6 site and getting an error

A few years back i created a Drupal 6 site and due to sickness i had to leave it. Well i am moving hosting and wanted to move this site over. I tried to hit the site but get this error. I assume ...
0
votes
0answers
14 views

Expose Drupal 8 Search API / search Pages

I am using the Search API / Search Pages module to perform searches on our D8 site. Does anyone know if there is an extension to the search module to expose the searches via an API or web services? ...
5
votes
2answers
346 views

How to create a chart for tracking Product stock over some period of time using Ubercart?

Does anybody know about a good solution for tracking Product stock in a certain timespan? It is nice to see the stock numbers of products, but I find quite handy to see product performance over time. ...
1
vote
2answers
547 views

How can I force HTTPS for all images?

I'm moving my Drupal 7 website to https but I keep having issues with some images that gets loaded with full path, but with http://. For example the site logo and view images have http:// path. (...
1
vote
2answers
3k views

Programmatically change the available options in a views exposed filter

I have an existing view in which I want to change the available options in a view exposed filter. I can't manipulate the form because the modifications are dependant on other views data, so I thought ...
0
votes
2answers
372 views

Load a variation (or Line Item) based a previous choice

I asked this similar question already (Variations price adjust based on previous variation), but I am thinking to make the solution more 'base'. Is there a way to 'load' different fields based on a ...
2
votes
2answers
341 views

Reference View in Entity Reference field

I have a content type that has an entity reference field allowing you to link to other pages and add a custom image, for nice big CTAs. However, it's come to light that some of the links may need to ...
0
votes
0answers
30 views

How do I create an entity reference from a webform submission?

I have two content types : Parents and students. each content type has a entity reference to the other content type. I am using module : webform and webform creator to create the content. Once a ...
2
votes
1answer
3k views

Why doesn't composer install drush on $HOME/bin directory?

I'm trying to learn to to use drush. I installed composer to my $HOME/bin/directory: $ ls ~/bin composer composer.phar subl sublime sublime_config.sh sublime_text Then I tried to install drush ...

15 30 50 per page