All Questions

1
vote
0answers
39 views

Use generated JWT to authenticate user in Drupal using REST API [closed]

We are working on developing a mobile app and users should be able to log in to the app and in our backend Drupal site authenticated from Keycloak. Our main goal is that the user would be able to ...
-2
votes
1answer
30 views

Drupal 8 and Moment JS - To fix client side date format issue on browser wise

Different Browser and OS shows different date format on client side. In Chrome: dd/mm/yyyy In Safari: yyyy-mm-dd <input data-drupal-selector="edit-field-date-end-value-date" title="Date (e.g. ...
0
votes
1answer
18 views

Commerce Address Book – need to reuse customer profile without address

In addition to the default shipping and billing addresses I have added a customer profile in Drupal Commerce, where the customer can add additional info, like email for invoices, special marking on ...
-5
votes
1answer
44 views

How can I get likert element title and descriptions of the questions in webform submission handler?

How can I get likert element title and descriptions of the questions in custom webform submission handler? getData() gives only questions and answers, is there another method? Webform 8.x-5.2
1
vote
1answer
7 views

'Order of importance' type field

I'm using an Entityform to create a survey for a client, however one of the types of question they have is to rank a number of options in terms of importance to the user. Similar to how the ...
0
votes
1answer
24 views

Form fields still treated as required even after setting #required to false

I'm using hook_form_alter to remove the "required" setting for a couple of fields, specifically the First name and Last Name fields on the Address form. Here's my code, where I provide a callback ...
0
votes
1answer
20 views

Add target blank to an image link

How do I add target='blank' to a href in a Drupal 8 custom module? Below I have the image being wrapped by the uri. I don't know how to add target='blank' $element[$delta] = array( '#theme' ...
0
votes
0answers
34 views

Display another page's content without changing url for drupal 8

I want to display another page's content without changing url for drupal 8 . In drupal 7 I used menu_execute_active_handler() , but drupal 8 this function is not available. I got a solution from ...
0
votes
0answers
5 views

How to import data from multiple urls using feeds importer?

I have two api urls. One returns all the products with product ids and the 2nd url return detail about a single product using the product id. So my requirements are. Request the first url, Get the ...
0
votes
0answers
10 views

Drush not working after updating Acquia dev desktop

So basically I updated my Acquia dev desktop in my MAC and the Drush stopped working throwing some error. I have been trying to fix this issue from past few hours but I couldn't find anything on the ...
0
votes
1answer
18 views

Content Admin Search Tool Drupal 8

As a content admin, are there any feasible ways in Drupal 8 to search the source HTML of certain Text fields across multiple content types. For example, I want to find all nodes that contain <div ...
0
votes
0answers
7 views

How to compute field value of another content type using compute field module?

I have two content types. Let's call them "A" and "B". A has nodes with field_cost B has nodes with field_total_cost Content type A has a field_costumer which is referenced to the entity of Content ...
0
votes
0answers
8 views

How do I alter the existing filter in search api?

In drupal 7, How do I alter the existing filter? For example, I have a node title as an exposed filter and in hook_search_api_query_alter I want if any node title starts with "c" character brings all ...
1
vote
3answers
20 views

How can I tell if I'm on a taxonomy page in preprocess_page?

If I'm on a node, inside preprocess_page(&$variables), I can check if (isset($variables['node']) && $variables['node']->bundle() == 'my-type') to see if I'm on a node, and a node of a ...
0
votes
1answer
19 views

How to get values from a different function? [closed]

I have the following function in Drupal (Controller) that calls an API via AJAX. It is already returning values from the API but I want to take these values and use them on a private function that's ...
0
votes
0answers
15 views

Ajax Issues with Drupal Layout Builder

We're trying to use the new Layout Builder to configure some of our content types. When we click the "add section" button under Manage Layout, we get the following errors: On the page in the console ...
1
vote
4answers
71 views
+50

How can I provide an autocomplete filter for tags in a Search API view?

I'm working to create a Search API view. I have an exposed filter that's a fulltext search filter. I'd like to expose another filter that works similar to the exposed entity reference, which allows ...
0
votes
0answers
37 views

Should I disable the page cache and keep dynamic page cache? [on hold]

Drupal max-age tag does not work with anon. I also am not looking to use a replacement for page cache as of now .. Can I remove page cache and just use dynamic - wouldknt this fix problem? The kill ...
0
votes
0answers
42 views

How do I extend Drupal\Core\Database\Driver\mysql\Select?

Currently, my website uses MySQL. I want to override some methods on the Select when I use the following code. $query = Database::getConnection()->select('my_table', 'my_table'); $query->...
0
votes
1answer
18 views

comments module with infinite scroll

I've added a comment field to my content type. Now I'd like to add infinite scroll to the comments messages, so it shows by default some number of comments and when I click on the load more button, it ...
1
vote
0answers
12 views

Caption field with default value inside CKEditor

I activated the caption filter under Text format configuration to add description to media inserted via CKEditor Is there a possibility to add a default value to this caption field whenever I add a ...
0
votes
0answers
17 views

trying to insert a view inside a view using twig tweak module

I am trying to insert a view inside a view but struggling a bit I have a view called My Class with all my fields in it, this works fine. I have a view with a contextual filter called Students Block,...
0
votes
0answers
26 views

Speeding-up the editing interface [closed]

We have a 3000-4000 page Drupal 7 install. The editing interface often takes over a minute to load. There’s talk of paying an agency to upgrade to Drupal 8 in the hope that this will fix the issue but ...
0
votes
1answer
19 views

How to use the YML structure of routes to control access to Group Content

I am using the Group module and would like to leverage each Group's permissions in my module's yml files. I have a module.permissions.yml with something like tam_api.group_gid_members_uid: path: ...
1
vote
2answers
35 views

Creating a view with multiple latest content types

I am looking to create a view for my home page that displays the 3 last added items for 2 different content types (articles and news). Like 2 lists next to each other that also has the option to show ...
-1
votes
0answers
34 views

How to access Simple Config API from a KernelEvents::RESPONSE EventSubscriber

I have an event subscriber that listens to KernelEvents::RESPONSE for redirect responses, and sends custom data to an analytics provider. I need to load some variables from the Drupal 8 Simple ...
0
votes
1answer
41 views

How to put a link in my route title?

In my custom module amap, I have amap.routing.yml with (among others) this route: amap.distribution_inscription_many_form: path: '/amap/editPlanningMany' defaults: _form: '\Drupal\amap\Form\...
0
votes
1answer
20 views

Aggregation problem

I have created a view of node content and I need author name, role, and image to show with content. I have also made a relationship with the user in the advance section for the above-mentioned fields. ...
0
votes
0answers
28 views

Commands doen't work because of the Address module and its dependencies

When I try to use a Drupal Console command, even a simple a drupal list, I get an error. Fatal error: Class 'CommerceGuys\Addressing\AddressFormat\AddressFormatRepository' not found in /path/to/...
-3
votes
1answer
31 views

how to Get values from protected array [closed]

i want ids which is in protected selection array . function prevent_deletion_form_alter(&$form, FormStateInterface $form_state, $form_id) { switch ($form_id) { case "...
-3
votes
2answers
32 views

How do I pass three arguments to a validation handler? [closed]

Drupal 8 1)I want to add third parameter $form also in (&$form_state, $node){}.. But it throws error function prevent_deletion_form_alter(&$form, FormStateInterface $form_state, $form_id) ...
0
votes
1answer
19 views

Facet - default value with search api

I am using content type in Facet. The search result will be having an option to choose the content type to filter the result. I want the search should show the result with particular content-type ...
0
votes
0answers
18 views

How do I avoid a link is closed within a custom text field too soon

I am creating a custom View for my Search API results page. I have many fields added and they are all set to hidden. This allows me to have a custom text field at the end that can have a unique layout....
0
votes
0answers
7 views

Ckeditor with programmatic text_format field

I have ckeditor installed on my site, and when I use filter formatted textareas on my website where admin pages or fields were created using the UI, the ckeditor replaces correctly. When I use the ...
0
votes
1answer
10 views

How do I update the sitemap in D7?

I want to exclude some pages from the sitemap. I go to these pages/nodes, edit them, then go to the XML sitemap tab and set it to 'Exclude'. I then save and clear cache. But when I look at my ...
0
votes
0answers
14 views

Webform 8 - How can I make a text field value be A if a select value is 1?

In Webform 8 I am trying to figure out how to populate a text field with a value based on what is chosen on a drop down. For example: Select Value are states If user selects Deleware then the value ...
0
votes
1answer
15 views

D7 block view to only show child nodes based on taxonomy

Using Drupal 7 I have a hierarchical taxonomy each node in the site is assigned a taxonomy to identify where it sits in the site structure. On certain pages (landing pages) I would like to show the ...
2
votes
1answer
63 views

Is there a “best practice” for overriding a contributed module's controller in Drupal 8?

I'm still relatively new to Drupal 8 and recently I came across an occasion to override the WebFormSubmissionListBuilder Controller. I eventually found another project which had exactly the same need ...
0
votes
1answer
62 views

Why can't I update core from 8.6.16 to 8.7.1?

I need to update my Drupal 8 site from 8.6.16 to 8.7.1, but when I run composer update drupal/core --with-dependencies it says "Nothing to install or update". I have been banging my head on the wall ...
-1
votes
0answers
17 views

Want to upload my Webform submission files to S3 bucket

I have created a custom form in Drupal 8, the form contains upload file field with some sensitive information, we want to upload the submitted file to S3 bucket. I checked some modules for S3, since ...
0
votes
0answers
9 views

Solr Indexing media fields

I have a bespoke media type that I'd like to index with solr. If I add a new field to an existing Media Type, I can add that field to the solr search using the interface found at admin/config/search/...
0
votes
0answers
21 views

Check for cookie value(s) for a visitor and attempt to authenticate them?

I have a case where when a visitor comes to the site from a subsite (different application), if they are authenticated (there will be a cookie value), I need to get this cookie value and initiate a ...
0
votes
0answers
16 views

Can I configure event for anonymous registrants?

I am replacing a site using D7 registration module, which I was able to configure to allow anon registrants to submit a registration. This was based on capturing names, addrs etc in simple fields on ...
0
votes
0answers
11 views

Is there a way to add custom fields before the “Add to cart” option with the “Basic Cart” plugin?

I'm using the Basic Cart plugin to create orders in Drupal 8, but I have a problem. Before I add some products to the cart, I have only the Quantity option which the default plugin option. Is there a ...
0
votes
1answer
27 views

Can't set arguments to a view for displaying all data

I use $view = views_embed_view('export_emargement','page_1',$journee,$region,$produit); it works well, but If I don't want to specify $region the view does'nt works. Im my view admin if I set ...
0
votes
1answer
30 views

REST login problem

I'm trying to log in to drupal8 via api rest using postman. POST: https://example.com/user/login?_format=json Content-type: application/json { "name": "admin", "pass": "password" } The problem is ...
0
votes
0answers
22 views

Get input label on input.html.twig file

I'm working on an input.html.twig file. I need the label name of the input for class and other reasons, but for some reason, I can't figure out how to grab it. I thought it would be part of the twig ...
0
votes
0answers
15 views

Services Error: The website encountered an unexpected error. Please try again later [closed]

I am a newbie with Drupal so please don't be upset If I ask this (probabily) easy question. I am dealing with Services and when I try to empty the cache or going to the page I route it appear this ...
0
votes
1answer
41 views

Drupal 8.7.0 chmod() and touch() operations not permitted

After updating drupal8 for 8.7.0 and then to 8.7.1 versions i have next errors: Warning: chmod(): Operation not permitted in Drupal\Component\PhpStorage\MTimeProtectedFastFileStorage->save() (line ...
-5
votes
0answers
18 views

15 30 50 per page