Questions tagged [9]

Version tags should be used only for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
-3 votes
0 answers
20 views

Javascript error using the DXPR builder module [closed]

I am using the DXPR module to manage the layouts of my page. When I add a section (as shown in the images) I get this JavaScript error. Uncaught DOMException: Failed to execute 'querySelector' on '...
1 vote
1 answer
51 views

How to redirect to a specific page after submitting password reset?

When a logged in user resets their password at /user/password and clicks the submit button, they are being redirected to the frontpage. How can I redirect to /user instead? I've tried the second ...
0 votes
0 answers
17 views

Shipping configuration for x items or more

Using Drupal9 and Commerce2 I'm trying to configure shipping for a specific variation type : tires. If you order one or 2 tires, you must pick them up on site. if you order 4 or more, they can be ...
0 votes
3 answers
63 views

Adding client side validation to user registration form

I'm working on a Drupal 9 site with a user registration form implemented from core. We have some specific password validation rules and I'd like to improve the overall UX of the user registration ...
  • 1
1 vote
0 answers
22 views

Migrate Medias update : entity_lookup process error

I'm trying to update Medias already existing in my Drupal using Migrate and the process entity_lookup. The field field_uuid was designed specifically as a matcher for my .json original datas and the ...
0 votes
2 answers
33 views

get node id from entityQuery('node')

I want to get the node id from entityQuery('node') the below query give me array vid = nid $nids = \Drupal::entityQuery('node') ->condition('status', 1) ->condition('type', 'account_content') -&...
0 votes
0 answers
17 views

How to render a Taxonomy Term in twig without the term name?

For some reason, I am writing my own controller that needs to include a taxonomy term. I want to render everything of a taxonomy term (except the name / title) in the template I wrote. My controller ...
0 votes
1 answer
25 views

Exposed Views Filter of Usernames in a list instead of autocomplete

I have an exposed filter with a relationship to a reference field in my content type to users. Currently this exposed filter lets me filter by inputting a username, but its only autocomplete. Is there ...
0 votes
0 answers
62 views

Running a different PHP version on different versions of Drupal. Drupal 9.5 on PHP 8.2 and Drupal 7 on PHP 7.4 [closed]

Currently I'm running Drupal 7 and Drupal 9.4 on PHP 7.4. Is there an easy way to use PHP 8.1+ on Drupal 9.5+ so I can upgrade to Drupal 10 eventually. While still keeping Drupal 7 on PHP 7.4? What ...
0 votes
1 answer
22 views

Views Exposed filter can't input username to filter. Only works with User ID

I created a custom View, where it shows all of a specific content type. In this content type I have a field that is a user reference called "Assigned to". In this view, I want it exposed so ...
0 votes
0 answers
48 views

Perform an LDAP search from a module

I am trying to perform an LDAP search from hook_form_validation() in a webform using Drupal 9 and drupal/ldap 4.3. I have configured the LDAP module on my site, but I am not using it for ...
0 votes
0 answers
44 views

Why does this custom CKEditor plugin produce the toolbarview-item-unavailable error?

I have 2 modules in active development with the purpose of learning how to develop custom plugins for the Ckeditor5 wysiwyg. On both modules, I am stuck on the following problem. The error pasted ...
  • 1,720
0 votes
0 answers
18 views

JSONAPI - limit list of included referenced entities via filter

I'm using JSON API and JSON API Include modules, in Drupal 9.5 I've got a node type, "article" with a entity reference revisions field referencing a paragraphs, field name, field_variant. So ...
1 vote
1 answer
48 views

Form builder not getting checkbox values

I cannot determine why the form state seems to fail to get the values of the checkboxes on a form I'm building. In my buildForm(), after submission, I am returning a result set. Each result that is ...
  • 447
0 votes
1 answer
18 views

Fetch select label via GraphQL

My nodes have an "articleType" property, which is a select field with ~10 options ("article|Article", "training|Web based training" etc). Fetching the property via ...
  • 143
1 vote
0 answers
22 views

Can I use Price Resolvers for dynamic product pricing?

All cart items are adding programmatically. I am trying to set a product cost based on various factors that change for each instance of an item added to the cart. I discovered Price Resolvers and it ...
  • 1,007
0 votes
0 answers
22 views

Twig template for field component of specific form [duplicate]

I'm using template hints to attempt to theme a specific part of a single form. I have a custom template for a views block (block--views-exposed-filter-block--search-custom-page-1.html.twig), but is it ...
  • 545
-2 votes
0 answers
26 views

Webform Ajax: How to alter the behaviour [closed]

We are using a webform with "Use Ajax" enabled, but it has the following issues: If I click on "Submit", the required fields are only validated in the backend, not the frontend ...
  • 298
0 votes
1 answer
42 views

How do I install the database drivers? [closed]

I'm trying to use Drupal 9 framework, and I'm stuck when setting up the database: I get the infamous error Error: Class 'Drupal\pgsql\Driver\Database\pgsql\Connection' not found. When looking at the ...
0 votes
0 answers
18 views

Not able to add Google API key in fontyourface module [closed]

I have install fontyourface module on my Drupal9 site and also enable the google fonts dependency module. I have generated the API key and paste it Google fonts settings but it throwing the error. How ...
0 votes
1 answer
19 views

How can I bulk update node content after adding a hook_form_alter to set default values? [closed]

I'm using a simple hook_form_alter to add default content to a new field on the node form. The default content is dynamically created based on the content in another field on the form. What's a good ...
  • 349
-2 votes
0 answers
28 views

External link redirect with field values [closed]

I'm trying to create an external redirect using a webform handler. The current implemented code either redirect to a confirmation page or shows an error about the missing developer ID. This is the ...
0 votes
0 answers
23 views

How to sort the views by a column from a custom database table?

I have a custom database table my_apps. This table has nid and uid columns. I have created a view, which is displaying some nodes. I want to sort this view from that custom table. Like ORDER BY COUNT(...
  • 2,755
2 votes
1 answer
77 views

How to programmatically invalidate the cache of every node

I have a form submit function that is meant to invalidate the cache of every node if a specific field is altered. Here's how I'm attempting it. $config = $this->configFactory ->getEditable('...
  • 5,394
2 votes
1 answer
55 views

Setting SameSite=None on a session cookie

I have a custom endpoint which stores a value in a session cookie, using this code: $session = $this->request->getCurrentRequest()->getSession(); $session->set('test.email', $data['email'])...
  • 732
0 votes
1 answer
77 views

Convert Drupal 8.6 site to Composer (after D8 end of life)? [closed]

Client has a sqldump and a tarball of a broken Drupal site. Instead of using Composer to set up the recommended project, it looks like the previous developer performed a git checkout of http://git....
  • 2,040
0 votes
0 answers
20 views

Proper usage of Webform 6.x + webform_validation 2.x with conditional statements

I'm on Drupal 9.4 with webform 6.x. The webform validation module is a bit confusing and I couldn't get the conditional statements to work properly. Below is my configuration. I have a hidden field ...
0 votes
1 answer
66 views

How can I alter the response headers for error pages?

Same question as a few years back for Drupal7 - but the offline maintenance page seems a little different in Drupal 8/9/10 - and still a work in progress: https://www.drupal.org/project/drupal/issues/...
0 votes
0 answers
19 views

Translation destination email handler

I have a multi-language site with a webform contact form. Everything works, I can setup different translations, shows perfectly. I want to however change the "to" address per language. When ...
  • 173
0 votes
1 answer
47 views

AJAX on Form Details

I have a lot of API calls in a form, so in order to not call everything on load, I only want to load it when the user opens the details element. But I am having trouble adding #ajax to the element. I ...
  • 251
1 vote
1 answer
42 views

path alias OK for default language, but no alias for others

My site is in D9, mainly in French, with some pages in English. I have an old page (note 553 written in D6 in 2017), which can be correctly accessed in French with https://mysite/myoldpage and in ...
  • 13
2 votes
2 answers
180 views

Moved an old installation profile now site is broken

I have a d9 site with an old installation profile originally written for d8. I was having some issues with the profile preventing the uninstallation of some modules so I tried moving the entire folder ...
  • 1,191
2 votes
1 answer
59 views

Feeds Documentation for importing data programatically [closed]

Team, I need a help. I was surfing internet, but couldn't get a luck to get a working example/documentation to import data programmatically and store into our custom tables. I'm using Drupal 9 version ...
  • 93
1 vote
0 answers
52 views

Is it possible to use OR condition in search_api_index view for exposed filters like "Fulltext search" or "Combine fields filter"

I have created search_api_index view. And I want to add filter criteria like on screenshot. or I choose OR condition, but the AND condition still works. It seems that OR condition is not applied. Is ...
  • 338
1 vote
1 answer
52 views

loadByProperties with multiple fields

I want to find a node with some values in two fields. To do that, I use loadByProperties in this way: $nodes = \Drupal::entityTypeManager() ->getStorage('node') ->loadByProperties([ '...
1 vote
1 answer
25 views

Sort nodes by weight of taxonomy term attached to field

In a query for nodes I'm trying to sort the nodes by the weight of a taxonomy term attached to one of the node fields. Here is how my query is built $node_storage = \Drupal::entityTypeManager() ...
  • 5,394
1 vote
0 answers
30 views

How to pass a simple variable into form for twig? Not a form element [duplicate]

I have a form that is working just fine. Now I need to make some logic in its twig file based on some field value. How do I pass that variable into twig? I tried a simple solution and it works, but I ...
0 votes
1 answer
50 views

Facet blocks in a dialog don't retain applied facets

Cross posting an issue I posted from Drupal.org in the hope that it gets a bit more visibility here. I'm currently loading facet blocks via AJAX into an off canvas dialog provided by the core Dialog ...
  • 13.8k
-1 votes
1 answer
89 views

Where is the look of the Search button in Bootsrap5 defined?

I have a Drupal 9.5.1 website with Bootstrap5 2.0.6 as its base theme. The theme by default places a search form by means of a block named "Search" in the "Additional navigation region&...
0 votes
0 answers
19 views

Commerce Event Subcriber

I have created a custom event subscriber for Commerce, but when the event is triggered, somehow the Order number is increased by +1 and I get suddenly confirmation emails for 2 orders. I'm not doing ...
  • 733
0 votes
0 answers
36 views

Manually create an HtmlResponse for an entity view

How do I manually create an HtmlResponse object that returns the full html for an entity view; identical to the html returned for the entity.{{whatever entity id}}.canonical route? Context: I'm ...
0 votes
1 answer
32 views

Shared sites/all/libraries/ directory is not recognized by contrib modules

I'm trying to put the colorbox javascript library to the shared sites/all/libraries directory but it is not recognized by the colorbox module. The same seems to go for the jquery.cycle library. I just ...
4 votes
0 answers
52 views

How can I dynamically switch between two databases for ALL queries?

I need to copy some entities from one Drupal 9 database to different Drupal 9 database. I have searched and looked high and low, but none of the examples I have found work anywhere. I found no help on ...
0 votes
3 answers
37 views

Where can i find the path/URL of a module after installing it?

I just installed two modules on a Drupal 9 site: https://www.drupal.org/project/simple_forum and https://www.drupal.org/project/answers. I want to get the URL where all posts/questions are listed and ...
0 votes
1 answer
23 views

Hide/remove "Last" label/icon in views pager

I don't want my user to click the "Last" label on the views pager, but I can't find a way to remove this "Last" label even I leave the "Last page link text" field empty, ...
  • 1
1 vote
1 answer
34 views

Problem with Adding new fields with Ajax call to a custom form

I have a simple form where I am trying to add a couple of fields to it when the user clicks a button using an ajax callback. Here is what I have: public function buildForm($form, FormStateInterface $...
2 votes
1 answer
96 views

How to get webform url object, if I have webform machine name and webform path

I have webform path and webform machine name, how can I get url object of this webform?
0 votes
0 answers
78 views

How to display a shipment method as an order item row in csv or table view

I am creating a csv order view with a relationship to pull in referenced order items, and it gives a row for each order item as expected : Order 1, item 1 title, item price, Order 1, item 2 title, ...
1 vote
1 answer
34 views

How do I change the "secure" and "httpOnly" attributes of the cookies provided by the EU Cookie Compliance module?

I am using the eu cookie compliance module in Drupal 9 and I need to change the "secure" and "httpOnly" values of the cookies, as I am getting a vulnerability error "CWE-614: ...
0 votes
1 answer
75 views

How to change media image private to media image public, just for a specific filemime, and update the url?

Using Drupal 9.4. The Media File system is set to Private The Drupal default media type Image is set to private. It now contains hundreds of images. We want to switch only this media type from private ...

1
2 3 4 5
32