All Questions

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

HTTPS Links behind AWS Load Balancer

I really tried many Solutions to get my site work on Amazon AWS. There is only one last thing i can not solve. Some of my links are still "http://"-links and i dont know how to get them right. My ...
1
vote
1answer
2k views

How do I use Bootstrap scrollspy?

I would like to use Bootstrap's scrollspy plugin in Drupal 8. So I edited the html.html.twig file replacing <body{{ attributes.addClass(body_classes) }}> With <body{{ attributes.addClass(...
-3
votes
0answers
22 views

Terms of service description not linked

I am creating a webform with two pages. The first page has an element of type terms of service that is set up as a link. I have not found any reference anywhere to show how it is linked to the Terms ...
5
votes
2answers
12k views

Sort entityQuery by date published

I'm attempting to perform a query to retrieve only the three most recent nodes of a certain content type. $query = \Drupal::entityQuery('node') ->condition('type', 'blog_post') ->sort('...
0
votes
2answers
341 views

Children of children not appearing in book navigation menu

UPDATE: I should mention that this is concerning the Book Navigation Block I'm using the book module to display children of a book in a side menu. It displays the title of the book and it's children ...
0
votes
2answers
10k views

Add header and footer for every pages printed

I've used print module version 7.x-2.0. I've used pdf-version and print-friendly-version. Now i want to do two different things. That is, Is it possible to add separate CSS for pdf, html or email ...
-1
votes
2answers
300 views

How add a function in a condition method in db api

I am strugginling to find out how to execute the below query using drupal's db api $startdate = '1491001200'; $enddate = '1498690799'; "SELECT * FROM field_data_field_symposium_event_time WHERE ...
0
votes
1answer
351 views

Book navigation - how to customize outline to show progress and enforce serial navigation

I have a task to customize Book outline to: force the pages of the book to be read from start to finish. Once a page has been read it can be revisited. show the progress through the book. I was ...
0
votes
1answer
617 views

How to Set Hidden Form Field Values Permanently via Form Alter

I have a webform that gets some hidden form fields set based on the referring URL. Within hook_form_alter, I can successfully set the hidden values with $form[elements][NAME]['#value']. function ...
3
votes
1answer
1k views

Displaying Content Flagged by User Name with Flag Module

I'm using Drupal 7.38 with the Flag (v7.x-3.6) module, along with Views. I'm setting up a flag for content. My goal is to display a list of users whom are flagging content (along with aggregated ...
0
votes
1answer
394 views

How can I export a multistep webform from an environment to another one?

How can I export a multistep webform from an environment to another one in Drupal 8?
1
vote
1answer
367 views

How To Upload Image From Media Library Programmatically?

I enabled latest version of media module to upload images in wysiwyg. It is working fine. There is no problem. I want to upload images programmatically from media library. Below is my code. ...
1
vote
1answer
47 views

It is correct to change unit_price of commerce_order_item programmatically under several conditions?

I am developing a module that allows you to select additional options for a product that is not a product or a purchase entity. It's like commerce_option but for D8. My inspirations come from Product ...
0
votes
1answer
598 views

The chosen directory does not exist and attempts to create it failed

When I tried to import the data it's showing as "The chosen directory does not exist and attempts to create it failed". What exactly is this I am not getting.
0
votes
0answers
20 views

Field is required, but server side validation is not catching it

I have a multistep checkout form in my commerce module. Inside Order Types i have added a field called Phone Number and set it to required. And then I have a custom module which has a ...
1
vote
1answer
1k views

how to add checkbox value as json data

I have created a custom module for a form. And I have json data which I want to add as checkbox values. $request = drupal_http_request($url); $jsonarray =drupal_json_decode($request->data); ...
0
votes
1answer
14 views

Fatal error when using some filters or sorting options in admin/content

Using Drupal 8.8.0, multilingual, on localhost (Windows 10, PHP 7.3.12). I have a fatal error on the admin/content page, but only if I use certain options for sorting or filtering the results. ...
0
votes
2answers
404 views

Translate untranslated strings

I downloaded and enabled translations for my Drupal core and modules using these Drush commands: drush dl l10n_update && drush en -y $_ drush language-add lt && drush language-enable $...
0
votes
1answer
35 views

Is it possible to get the node ID of the node that will be created?

Trying to pass some information to third party API, every time a new node is created. So far I have managed to identify the node insert/create when a node is created in hook_node_presave(). Done it ...
0
votes
0answers
19 views

How to set a theme for a 403 access denied?

When a user clicks a link to a Drupal site and are denied access because they need to login, they get a 403 access denied screen inviting them to login. I want to set a responsive theme because some ...
2
votes
1answer
330 views

Entity field value

I have been creating some custom entities to Drupal 8 and they pretty much work as expected but a small thing of getting any value of a field. Lets say I have basefielddefinition like this: $fields['...
1
vote
1answer
23 views

Service to interface with sessions table?

In my module, I need greater session control, beyond simple max_lifetime and other parameters taken from PHP config. What I did was to add a column to the sessions table that gives me the effective ...
0
votes
1answer
13 views

How to add class to the options for type radio present under radios?

function template_preprocess_bef_radios(&$variables) { $variables['children'] = Element::children($variables['element']); _bef_preprocess_nested_elements($variables); foreach($variables['...
1
vote
1answer
36 views

Mock a service while running a BrowserTest?

I am trying to test the output of a controller that returns some information in a given page. This controller has a custom http client injected into it. I want to create a BrowserTest that can ...
-2
votes
0answers
12 views

How do I check the product type? [closed]

I ve got 2 product types. On the cart view, I want to disable the Delete button on a product type and leave it enables on the other product type. How can I achieve this?
1
vote
0answers
12 views

Set SameSite=strict for session cookies

I'm trying to figure out how to set the SameSite cookie attribute for Drupal 8 session cookies, but I can't find a solution. I thought SessionConfiguration might give me enough options, but it seems ...
0
votes
1answer
25 views

Make a password security check for the register form

I have a register form that is output in a controller using the following code. $form = $this->getUserProfileForm(); return [ '#theme' => 'maubl_user_inscription', '#form' =&...
0
votes
2answers
328 views

Display fields node in table like views

I have a content type documents and my fields (created by admin) are: Doc1 File Date Doc2 File Date Doc3 ... The reason why I don't do a content type just with: "Doc, file, date" and add the nodes I ...
1
vote
0answers
16 views

How do I show an availability calendar?

To recap: I previously built a site in Drupal 7 which showed the availability of two apartments for rent, using the Availability Calendars module. The client easily selected dates and marked them ...
0
votes
0answers
11 views

Getting multiple inputs with custom field

I created field for timeline and I selected unlimited for " Allowed number of values " and I "placed" this field to my custom type, After saving content I`m getting multiple instances of this field ...
1
vote
1answer
523 views

Content edit links?

I'm new to Drupal 8 and can't figure out a way to show the edit contextual links for content displayed through the Views module. This was simple in Drupal 7, but in Drupal 8, a view only shows the ...
-4
votes
0answers
14 views

How to set field's image max size style

I'm using simple CSS solution for responsive images. See sample here: https://www.w3schools.com/howto/tryit.asp?filename=tryhow_css_images_side_by_side_resp I have a view based image list which ...
0
votes
0answers
23 views

How to show availability calendar in D8 - BAT and BEE frontend difficulties [closed]

I previously built a site in D7 which showed the availability of two apartments for rent, using the availability_calendar module . The client easily selected dates and marked them available, booked or ...
1
vote
0answers
74 views
+100

How can I re-populate file_usage and file_managed tables?

I have a commerce website. I am also consuming a web service and creating corresponding products, including matching products with another table's rows. I have the below code. It ran several times and ...
0
votes
1answer
327 views

how can I show help to a user one time only?

How can I show help to a user one time only? On my node form, I have some inline help under a few of the fields. I would either like the user to be able to close/hide the help or the help to be ...
-3
votes
0answers
16 views

Is it possible to connect Drupal to SAP using odata?

I would like to know if it is possible to retrieve data from Drupal using odata. The SAP environment will have a gateway which uses the odata protocol. It will use the HTTP protocol. I found this ...
1
vote
1answer
64 views
+50

In views use the value of a field in next row, in current row

I would like to use the value of a field in row 2 of a views table output, in row 1 so that I can do some basic math on it. This is what I would like to do: Title | Field_x | Field_y+Field_y(2) | ...
0
votes
0answers
5 views

Make inline images uploaded via ckeditor clickable and link to original images

I would like to make inline images uploaded via ckeditor to be clickable. These should link to the original image and open in same or new window. Is this possible or does it need a seperate module to ...
1
vote
0answers
22 views

Is it possible to run Acquia Dev Destop without admin rights on Windows?

I would like to know if it is possible to run Acquia Dev Desktop without local Admin rights on Windows machine? I requested admin right and was given for temporary period and installed the software ...
0
votes
1answer
12 views

How to create a view that shows a Managing User all content of their members?

I want to create a View that lists all content of authors who have the same value (text) as the viewing user. Actually they are members and the viewing user is the manager of the members. I have 2 ...
0
votes
1answer
2k views

How to render the 'actions' section of a form in twig template?

given a form that is built like the following: public function buildForm(array $form, FormStateInterface $form_state) { $form['#theme'] = 'mymodule_testForm'; $form['actions']['#type'] = '...
0
votes
1answer
26 views

How to display custom user field in twig template

I've created one custom field with machine name "field_first_name" for user profile form. How to display/access it in Twig template? {{user.field_first_name}} {{ content.field_first_name }} {% for ...
0
votes
2answers
1k views

How to set the views exposed filters default value programmatically?

I have a view which has a term reference exposed filter. I want to set the default values of this exposed filter programmatically based on a certain condition. I have tried the following code but ...
1
vote
0answers
20 views

Custom compound field with 2 entity_reference fields

I'm trying to create a custom compound field in D8 that, among others, includes an entity_reference to a node and an entity_reference to a taxonomy term. I did follow the answer from this question. ...
2
votes
1answer
1k views

Description field has no text format

The Feed module successfully imports a RSS feed. However the Description field does not display. I can only see it if I click on "Edit". The problem is that the feed-items do not have a text format. ...
0
votes
2answers
476 views

How can I disable future dates?

I am developing a custom module, where I need to disable future dates in the date pop-up. How can I do this?
7
votes
1answer
6k views

How do I change a field type?

I have a content type with a field_maps whose type is Text (plain, long). I needed to change it to Text (plain). So I've done this SQL statement: ALTER TABLE node__field_maps MODIFY field_maps_value ...
0
votes
1answer
342 views

Add custom operator for condition() in search_api

I am trying to implement hook_search_api_multi_query_alter but it seems 'IN' operator does not work here. I have to check condition on array. Any pointers for start building custom operator. function ...
5
votes
1answer
494 views

Why does loadMultiple load 1000 nodes 9.2 times faster than loading each node one by one?

I have always known that loading multiple nodes at the same time is faster than loading them one by one. What I wasn't aware of, is the huge performance difference between the two ways of loading ...
0
votes
1answer
375 views

How to filter a view with another view?

Let me explain my situation. I have in D7 4 different taxonomy list. Each taxonomy list is connected to other data in the system A content type cFoo 2 different roles : contentmanager (CM) and user. ...

15 30 50 per page