All Questions

0
votes
0answers
3 views

Drupal 8 custom installation profile with standard content

For a school project I'm trying to use a custom installation profile to pre-install a couple of modules such as Drupal Commerce. The problem I'm running into is the fact that although my installation ...
-1
votes
1answer
20 views

Add programmatically exposed filter to view without removing the existing ones

I want to add an exposed filter to a view which contains already exposed filters but without altering them. When I add the following code it messes up the exposed filters from the view and only the ...
2
votes
1answer
530 views

ssl with boost and securepages module

I have this doubt. I have a website in drupal 7 currently live (Kickstart2) and use as cache management boost I have to buy a ssl certificate on my domain and with this certificate I would like to ...
1
vote
1answer
13 views

How can I process a node form from a custom submit handler?

I have a use case where I have a custom submit button on a node edit form that will take the user off to another page to do some other editing. If the user has made some changes to the node, such as ...
0
votes
1answer
27 views

How can I create Change Password block?

We can create reset password block by \Drupal::formBuilder()->getForm('Drupal\user\Form\UserPasswordForm') in d8, but change password block \Drupal::formBuilder()->getForm('Drupal\user\Form\...
1
vote
2answers
541 views

EntityFieldQuery: number of field values as condition

I have a node type which has a field that can contain an unlimited amount of images. I want to retrieve a set of entities, but only entities that contain at least one image. So far this is my query: ...
0
votes
0answers
18 views

Stack ajax_command_replace commands?

I am wondering if it is possible to stack two ajax_command_replace commands. In other words, to have code that looks like this: <br> $commands = array();<br> $commands[] = ...
0
votes
2answers
86 views

Print commerce pricing attributes to email receipt

Users cannot see what size or color shirt they purchased in the email receipt because tokens won't print the attribute fields provided by Commerce Product Attributes / Commerce Pricing Attributes / ...
0
votes
0answers
9 views

Scaling image using Imagick Module

i'm currently using the Imagick module for Drupal 8 and the imagick php extension on the server. Whenever I try to resize images with this tool, using the settings below, I get a really down sampled ...
-1
votes
0answers
12 views

Drupal mobile nav languages

I'm working on a country-specific web site and I've happened upon an issue with mobile navigation. This site will be offered in English and Arabic. I've created menus for the English site as well as ...
0
votes
0answers
10 views

Sub theme doesn't inherit base theme's style

I'm tryign to create a subtheme of Corporate lite (https://www.drupal.org/project/corporate_lite) following the instructions on https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-...
2
votes
1answer
556 views

How do I make Drupal File Description Field Required?

In Drupal 7, I need users to enter a file description, how do I make this field required? Also on another note, I would love to make this field a select list, there's no clear way to do this aside ...
0
votes
0answers
15 views

How to password protect private files

I would like to protect private files with password in a content. For example, I created a content with some files, this field "Protected files" uses private filesystem. I would like to protect these ...
-2
votes
0answers
15 views

How to import Users, Persons and Members from CSV file? [on hold]

In a custom module I created to manage a non profit organization in a new website, I have two custom entities Member and Person with these fields: Member: id, designation, postal address, start date, ...
1
vote
1answer
5 views

Calculate an average based on two existing fields

I want to calculate the average of two fields of type number, and have this average in a third field to make different sorts in views. For example: I have a content X which has as fields: A, with ...
-1
votes
0answers
6 views

Sandbox for Content Management

We are using OPIGNO LMS (Drupal 7 based Module). Within that we have 2 Roles Content Creator & Authenticated User. Content Creator - His Primary Role is to Create & Verify the Contents (...
-2
votes
1answer
26 views

How do I force the download of a .zip file, with contents retrieved using drupal_http_request()?

when i do this curl request my files are getting saved in drupal root instead of getting downloaded to browser in the bottom. can anyone help me what wrong am i doing here. below is the code i'm using....
1
vote
1answer
28 views

Batch API to process millions of records

I need to run Batch API on a huge dataset. Specifically I have a custom table with a lot of rows which I need to iterate over. The batch process works fine using small numbers. When using the full set ...
-2
votes
0answers
11 views

How not to index user profile images? [on hold]

On my site, users can add a profile photo. When I look at Google Image, profile images appear. Is it normal that google indexes the image of the user's page despite the noindex statement of the page? ...
0
votes
1answer
542 views

Upgrading to 7.26 - Internal Server Error

I recently upgraded from Drupal 7.25 to 7.26 in maintenance mode. The upgrading did not have any errors. Now when I go to the homepage I get an Internal Server Error. I added an echo statement to ...
1
vote
2answers
21 views

How to send mail with multiple images from node using Rules module?

$language = field_language('node', $node, 'YOUR _FIELD_NAME'); foreach($node->YOUR_FIELD_NAME[$language] as $file) { echo drupal_realpath(file_load($file['fid'])->uri); } I used this code to ...
0
votes
0answers
12 views

How can I downloand PDF file and show thanks message after submitting the custom form

I am new in drupal I want to perform two functionality after submitting my custom form. 1. First one is download the PDF file. 2. Second is want to show Thank message. Right now It only downloading ...
-2
votes
1answer
25 views

How can I submit a value to the Poll module via POST method?

I am using Drupal 8 and I have installed the Poll module. I created a view to show polls and exposed that view to REST. I am able to get polls (using the GET method). How can I post a poll? ...
-3
votes
0answers
14 views

How to script detecting deprecated API usages on my custom module

Drupal 8 core marks deprectaed functions and methods. Some IDEs detect this well and warn the developer to not use it (crossing the function or method generally) I want to rely on a script (not an ...
-2
votes
0answers
7 views

How to position buttons of Drupal Commerce checkout forms?

Is it possible to position the checkout and update cart buttons elsewhere rather than aligned left in the footer in Drupal 8?
1
vote
1answer
531 views

How to load field value to custom form?

I'm using Drupal 7 for my website. I created custom settings page with custom form in it, but the problem is I don't know proper way to load inserted value from database to my form after saving it, ...
1
vote
4answers
99 views

Dynamic language negotiation by multiple top level domains

I am porting www.example.com, the German version is at de.example.com, the French is at fr.example.com and so forth. I could enter these domains in admin/config/regional/language/detection/url but I ...
0
votes
1answer
12 views

How to print alt or title field image in custom block programmatically?

I want to print alt or title field image file in custom module Drupal 8. I load file entity use Drupal\file\Entity\File; I checked core/modules/file/src/Entity/File.phpall public function but not get ...
0
votes
0answers
6 views

Views results + sort / keep order, order defined in a contextual filter

I have defined several NIDs, in a views and inside a contextual filter. The values are separated by a comma, and "accept several values" option is checked. But, If I display my view, the results haven'...
-1
votes
1answer
554 views

How to limit the number of authenticated users logged in simultaneously?

I'm building a project for a client who asked for: Limit the number of authenticated users logged in simultaneously. For example the site won't allow more than 20 users to be logged in at the same ...
0
votes
1answer
14 views

How to save data in entity form?

I have created one entity form using Entityform module and Entity type is clients. Created 3 fields below. Name - (type: text) Email - (type: Email) Logo - (type: Image) Now I want to save data ...
-2
votes
2answers
249 views

getting error when doing the composer install

Drupal version was 8.6.2 and moved to new server. When doing the core update , getting an error like below. Problem 1 - remove drupal/drupal No version set (parsed as 1.0.0)|remove drupal/core 8.6.3 ...
-2
votes
0answers
9 views

Is there a way to add view filters into Mega menu?

For our Drupal 8 website we want to get rid off the sidebar menu, where usually view filters are located. Instead, we would like to implement mega menu and place view filters there. Is there a way to ...
0
votes
1answer
15 views

Get delta of parent form field widget

I've got some form input fields in a paragraph whose visibility need to be dynamically toggled by the value of a another field. This can be done with the states API and the ...
0
votes
2answers
41 views

Making landing pages with taxonomy

I'm trying to make about 100 landing pages using taxonomy. I'm trying to stick to Drupal 8 core features as much as possible. I created two taxonomy vocabularies, Places and Main keyword. Now, what ...
3
votes
2answers
609 views

how to change the url based on region and language selection in drupal 7

I have five different regions and five different language. When loading my site url like domainname/regionname/langname .When user change the language or region url will be change selected region ...
3
votes
2answers
326 views

Node Load performance

I have a small question. If I use Node::Load on the route of the same node for example: I go to site.com/node/125 and in preprocess I use Node::Load(125), would Drupal load that node all over again? ...
0
votes
1answer
555 views

How do I reference an image inside my custom module directory?

I want to ship a default image in my custom module. I know I can reference images in the files directory with public://, but how can I properly reference my module's URL path? Update: I need to pass ...
2
votes
2answers
19 views

How to translate Groups in a multilingual site?

I have created a new grouptype and added some fields to have a "site". And then created a new group with this grouptype. I edited the overview site with some information. Now I would like to translate ...
0
votes
0answers
10 views

Making a view that shows pages for multiple taxonomy vocabularies

In Drupal 8, I'm trying to figure out how to use contextual filters in Views to make the following view. I have two taxonomy vocabularies. Fruits Apples Oranges Grapes Info Where they were grown (...
0
votes
1answer
530 views

Hide block on specific page through custom contextual link

We usually require to hide some blocks on specific pages for which we need to goto configure block page and add the URL of the page where we do not want to display a block. Instead of going to ...
1
vote
1answer
16 views

Views table columns not sortable

Standard drupal field types like Strings, Numbers, Dates and Taxonomies can be defined as Sortable in Views with Format: Table. But more complex fields like Hierachical Taxonomies and Paragraphs or ...
-2
votes
1answer
21 views

webform_submission_ID post blocked by CAPTCHA module

After solving reCAPTCHA and submitting the form I am getting error: The answer you entered for the CAPTCHA was not correct. Recent log message says: webform_submission_ID post blocked by CAPTCHA ...
-2
votes
0answers
11 views

Email with “Confirmation to attend” button link [on hold]

My scenario: Volunteering for a NPO: using Google Form to let user to register for a certain event. Collect user's name, mobile, email etc. NPO would like to further: Send these registrants an email ...
14
votes
6answers
22k views

Get path alias from NID (or node object)

I have a node object, and I am trying to use it to get a given path in Drupal 8. There was drupal_lookup_path() in Drupal 7 but I'm not seeing any equivalent or documentation for Drupal 8. What's ...
9
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 ...
10
votes
2answers
1k views

How to extend duration of the the one time login link?

Is it possible to change the valid duration time of the one time login link that is send out by mail to the new user? I think by default it is 24 hours, ist it possible to change this to 72 hours?
1
vote
3answers
529 views

Why doesn't my watchdog() function run when I execute my custom module from Drush

I have a custom module that performs an import from an xml file. It can be invoked two different ways. From a menu callback or a custom drush command. The import works fine and all of it's many ...
2
votes
1answer
3k views

Use a custom module to add JS to every page in Drupal 8

How can I use a custom module to add JS to every page with Drupal 8? I've found lots of example scattered over the internet that maybe used to work but no longer work.
-3
votes
0answers
9 views

Add title text property to image in ckeditor

Is there a way to add the title attribute to CKEditor images?

15 30 50 per page