All Questions

1
vote
1answer
11 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 ...
-1
votes
0answers
10 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
9 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-...
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 ...
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 ...
-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
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? ...
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 ...
-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?
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'...
-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 ...
-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, ...
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
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....
3
votes
2answers
309 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
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
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 (...
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 ...
-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?
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\...
-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? ...
0
votes
0answers
11 views

How do I integrate a custom filter inside a view

I am using entity browser to view my uploaded images. And now I want to integrate a new filter to the view. My objective is to filter the images from the URI path. Currently view has a field in Filter ...
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
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 ...
0
votes
0answers
6 views

Default “Show Row Weights” On Node/Add (course options)

I am using Field Collections which allow users to add and order fields on node edit/add screen. I would like "Show Row Weights" to be set by default rather than the drag/drop. Is there a setting ...
0
votes
1answer
10 views

Drupal 8 views slideshow not displaying images

Created a content type with title, body and slide(image) fields. Created a views block(format: bootstrap carousel, fields: slide) After I place the block in a region, I see the slideshow block but ...
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
0answers
11 views

Creating a node via REST - Entity reference field value not updating

I'm trying to create a node on a Drupal 8 site via REST. Passing all the values to create the fields work fine apart from the field that is an entity reference field. The field is an entity reference ...
1
vote
1answer
20 views

How can I leave Subject as blank when fill nothing in the subject field of a comment?

When we fill nothing in the subject field of comment, drupal will use the comment body as the value of subject. See the code in CommentForm::buildEntity // Validate the comment's subject. If not ...
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 ...
-1
votes
0answers
19 views

Dev site redirecting to live site

I am new to Drupal and I am trying to upgrade an old Drupal 6 site to 7. Currently I am trying to transfer a version of the live site to a dev. subdomain on the server. I was able to transfer the main ...
-1
votes
1answer
28 views

Getting redirect to phantom page /user/register/thankyou

In Drupal 8, I created a page with the path alias /user/register/thankyou to redirect users to after registration. Later, I changed the url of this page to simply be /register/user/thankyou. I have ...
0
votes
0answers
7 views

View listing all product displays that reference inactive product variations only

I am trying to build a view which lists all product displays that reference inactive product variations only. So I built a view on product displays, set a reference to product variations and filtered ...
0
votes
1answer
15 views

How to alternate image on left/right using “Views Parity Row” module

This great tutorial explains everything except the CSS work. http://gogrow.org/tutorials/views_parity_row I need to add CSS class to each row so I can set left/right alignment accordingly in css ...
1
vote
0answers
34 views

How to add nofollow to all external links?

I have a site with external links and I want to add nofollow to all the links that direct to another site than mine. There is a module to do this : https://www.drupal.org/project/nofollowlist But ...
-1
votes
0answers
22 views

Replacing hook_boot() by using an Event Subscriber vs settings.php

OK, I’m trying the best way to handle this: On a Drupal 7 site I had a poor man’s URL shortener. I created a slug by encoding a node’s NID using an algorithm that wouldn’t contain a vowel. In ...
-1
votes
0answers
13 views

How to access RTL style?

My website theme should support RTL, but it is not loading RTL style. How to enforce it to load RTL style? I saw the answers to how to load RTL style in RTL language, but I don't know in which file ...
0
votes
0answers
24 views

Does an ajax callback work within a Views style plugin?

My module has a custom Views style plugin. In the style settings form, I want to implement an ajax callback, such as described here: https://www.drupal.org/docs/8/api/javascript-api/ajax-forms ...
0
votes
1answer
10 views

Display the exclude dates on a node

I have a Drupal 7 site with a content type called Weekly Repeating Event, and events of this type repeat at the same time and day each week. I use a custom template file to display this node type by ...
-1
votes
1answer
15 views

Views Bulk Operations on checkbox field

I have a field that's only 1 checkbox with "yes" that I use to categorise my list of people. I'd like to use bulk operations to add or remove the tick but I'm not sure what value to insert in the next ...
-1
votes
1answer
39 views

I need help with logging in

I'm in over my head. I work for a company who recently had to let go of a bunch of personnel. One of those people was the web developer. I have worked on Wordpress sites before but never a site built ...
-1
votes
0answers
25 views

Moving images to another location when entity update

I have an image field in my content type and when I upload image it will save to a location as expected. Now I want to move that saved image to another location when entity inserting or updating ...
0
votes
0answers
10 views

Convert content types to forum topic types and view in the forum tables

I want to migrate a site from Drupal 7 to Drupal 8. All right, perfect import. However, on the Drupal 7 site I populated some forums through RSS using the Feeds module. But the transfer from Drupal 7 ...
-4
votes
0answers
18 views

Upgrade Drupal 7 to Drupal 8 using Migrate Module [on hold]

when i am going to upgrade D7 to D8 than showing error "Source Database is Drupal version 8 but version 7 was selected " so plz tell me what i do.
-2
votes
0answers
14 views

Import images from RSS with Feeds module without Feeds Image Grabber

I'm passing all the sites from D7 to D8 and so far so good. But one of my sites gives me a couple of problems. I was populating the RSS site in Drupal 7 using Feeds Image Grabber. Now, Feeds Image ...
0
votes
1answer
13 views

Migrating input formats causes errors

I am trying to write custom migrations to migrate my Drupal 7 website to Drupal 8. I am currently using Drupal 8.6.7 and Drupal 7.61 for a copy of the production website. So far I have set up the D8 ...
-1
votes
1answer
24 views

How to place after each 5th item in a view a different content type?

I want to create a view with news which outputs another content type after every 5th result, in my case a newsletter subscription. How can I do this?
-1
votes
0answers
9 views

Drupal 7 Theme CSS js

my site upgrade drupal 7 to drupal 8 also install theme but CSS and js file not working . can you tell me how to embed CSS and js or any other solution ?

15 30 50 per page