All Questions

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

Drupal 9 EntityQuery to filter values returned based on List(text) field

I have a List(text) field that can have multiple values. I am trying to create an entityQuery that returns nodes with specific items are checked within the field. The variable "availableServices&...
0 votes
0 answers
6 views

D9/D10. Change all generated user/{uid} paths to user/{uuid} and process them without the redirect

D9/D10. Basically the question is in the title. Tricky part is that I need to do both: (1) output canonical URLs to user/{uuid} instead of user/{uid} regardless of their initial module and (2) process ...
0 votes
0 answers
32 views

Not sure how to choose between Schema API and Entity API [closed]

I would like to save and then update data fetched from an external API every X minutes. This data will then be used to display things on the client side. What is the best practice to store this data ? ...
-2 votes
0 answers
29 views

How do I make a computed field editable?

I have to do some calculation in webform. Below is small part of my calculation form where I have fields like Length (Number) Width (Number) Thickness (Number) Volume (Computed Field) Formula '{% if ...
  • 67
0 votes
0 answers
21 views

Trying to filter the results of the entity autocomplete form element

Currently, I am working on a module that offers the function for users that belong to specific user roles to be able to write private messages to each other. In order for the sender to be able to add ...
1 vote
0 answers
12 views

Always charge the most expensive flat rate shipping in an order

I have a Drupal Commerce site with two product types. One has free shipping, and the other costs € 3,-. When both products are in the cart, the customer is allowed to choose either of those rates, ...
-2 votes
1 answer
48 views

Get MenuLinkContent object values

get title and link of a menu link object in. I am trying to get title and link of a MenuLinkContent object and below is my code. I want to get title and link value. How I can get the title and Link ...
-3 votes
0 answers
24 views

Novalnet: Rejected payment by card issuing bank [closed]

I'm unable to pay through Novalnet payment gateway. When I enter all my card details correctly. Novalnet doesn't process my payment and it show an error : payment rejected by card issuing bank. I ...
  • 1
0 votes
0 answers
30 views

How to add an attribute to a paragraph button link?

I'm trying to reach a variable with the html attributes of a link in a twig file, which is used for a paragraph link. If I dump the button content, I can't dump anything past the object array. {{ dump(...
  • 1
-3 votes
0 answers
28 views

Form to Report Generation [closed]

I've only been playing with Drupal for a year. I want to take information from a submission form and have it populate a report. This is an ongoing reporting system that needs to be viewed by our ...
0 votes
0 answers
12 views

How can I ensure that the Webform module always send emails in the same language as the original submission?

I have a webform in English, translated into German. I have webform email handlers in English, also translated into German. Different emails are sent based on submission completion, update, and lock. ...
  • 276
0 votes
1 answer
17 views

How do I display the title of the entities to which the user has no access?

I created a new content type with entity references to standard pages. I am using the Taxonomy Access Control module to control the access to these pages. When users view a node of that content type, ...
  • 101
-1 votes
0 answers
17 views

get a paricular menu url and title in programtically created block

I have a menu and added few menu in under it. Let say sub-menu page-1 Link - https://example.com/pag-1 - meni_id: 1 page-2 Link - https://example.com/pag-2 - meni_id: 2 page-3 Link - https://example....
0 votes
1 answer
18 views

Mink unable to connect to chromedriver

I need help from someone who knows about testing web pages with Javascript in Docker containers. I have browser-based testing working and now I have scenarios which don't work without Javascript, so I'...
0 votes
0 answers
15 views

How do I programmatically provide an exposed filter value to a view?

I am validating the creation of a new node in code thus $form['#entity_builders'][] = '_my_node_builder; In this validation code I would like to check that my_view returns no results when its exposed ...
  • 1,374
0 votes
1 answer
40 views

Should I "composerize" my installation?

So; having been involved with a D7 / CiviCRM build a number of years ago, I started building a D10/CiviCRM build as a project to suggest to my local organisation. I think I might have caused myself an ...
-2 votes
0 answers
27 views

Using form to create a price calculator [closed]

I want to create a module that will calculate to total price of the computer components selected by the user. It consists of some predefined checkboxes of item names and submitting it would show the ...
  • 1
-1 votes
1 answer
44 views

Argument #1 ($config_factory) must be of type Drupal\Core\Config\ConfigFactoryInterface, array given

I'm writing a new module for the community and I have this error and I'm not understand what's going on. The error: Mensaje TypeError: Drupal\view_mode_by_owner_role\Functors\ListOfNodeBundles::...
0 votes
1 answer
29 views

Creating a Custom Content Listing Page based on specific content type or taxonomy terms selected in the node

I am trying to create a content type that generates a list of content/nodes based on other content type or taxonomy terms selected within that node in the content type. I have a general content type ...
0 votes
1 answer
37 views

When a custom form is displayed in a custom template, ajax does not work

What I want to do I want to display a custom form with a custom template and use ajax in it to change values in the form. Problem Custom template notation prevents ajax from working. I didn't change ...
1 vote
2 answers
72 views

Why is the service “@url_helper” not found?

I am trying to add the query string with the each URL access through the browser. To accomplish it, trying to implement that through the service. But getting no solution in Drupal 9. mymodule.services....
0 votes
0 answers
17 views

Trying to sort rows by a column in views twig template

I'm trying to sort the rows of a view in the table template but can't figure out how to sort by a particular column. I can only get it to sort by the first column. I'm trying to sort a views global ...
  • 1
0 votes
0 answers
9 views

Can't Place Custom Block in BrowserTestBase

I'm trying to set up a test for my custom module. But I can't seem to place my custom block. I can place system blocks just fine. So I don't know if there's something special with a block I make in my ...
  • 482
0 votes
0 answers
24 views

Use javascript code in a specific div of the webform page

I have a website that was set up using Webforms with page breaks. So on the same URL, there are multiple "pages" and div blocks on each page, with a progress bar on top so you know what &...
-3 votes
2 answers
45 views

install Drush on shared server

please i need to use drush on shared server i allready use composer foe install drush,, but if i use sudo command sudo mv drush.phar /usr/local/bin/drush , it is give me this massage -bash: sudo: ...
0 votes
1 answer
13 views

Is it possible to have a Search API Facet to expand the results? Basically, querying this facet OR this facet?

We have a Search API View (Solr) using facets and our nodes have two separate fields for the facets. One is an address field and the facet is built on the address US States and the other field is a ...
  • 1,093
0 votes
1 answer
24 views

Browser test reports assertion success as an error

I am running a Functional test in a class derived from BrowserTestBase. Line 105 of the test method has this assertion: $this->assertSession()->linkExists('10000003'); The test output says: ...
0 votes
0 answers
9 views

add user input during webform custom action?

I have a simple webform with a few basic fields. It also has a private Radios - Other field for status with the following values: pending, confirmed, denied and other for administrative purposes. ...
  • 11
-2 votes
0 answers
22 views

Uploading files (of any type) into a SharePoint folder

I hope you are all doing well. I would like to ask if there is any particular way that we can upload our images from a Drupal website (Image field's uploading method) into a SharePoint's folder. I ...
1 vote
1 answer
49 views

How to prepopulate the body field with the body of another node

I have a number of nodes that I use as templates, I clone them to create nodes with the same body text. However, I want to make this process simpler by prepopulating the body field using a token that ...
  • 578
-2 votes
0 answers
14 views

Drupal Composer update - Layout Builder Problem (spacing) [closed]

I recently upgraded to Drupal Version 9.5.5 using composer. When I started working on my site again I noticed that all the spacing in layout builder had been reset to zero. Other attributes are still ...
0 votes
1 answer
24 views

Patch not working

I am trying to apply patch to the core file but none solution work for me. even not able commit core file changes due composer restriction composer.json { "name": "pantheon-upstreams/...
0 votes
0 answers
13 views

Trying to sort a views result by a global views conditional field

I'm attempting to use hook_views_pre_render in a Drupal 8.9.20 site to sort the results of a view by a global views conditional field and I could really use some help. I've spent some hours searching ...
  • 1
-1 votes
1 answer
40 views

Exporting content from a very old site and importing into a new site

I have inherited a very old Drupal 8.3 site that is itself an upgrade from Drupal 7 almost a decade ago, and does a lot of things the old fashioned way using panels or external modules that now have ...
  • 11
0 votes
1 answer
21 views

How to get web server error logging output from phpunit functional tests?

The 500 errors generated during phpunit tests aren't showing up in the Apache error logs. Where are those errors logged?
0 votes
1 answer
33 views

phpunit can't find node permissions

We have a Functional test class derived from BrowserTestBase which is passing, but the output includes a deprecation notice. Adding non-existent permissions to a role is deprecated in drupal:9.3.0 ...
-2 votes
1 answer
35 views

Set the canonical link rel via theme's template.php for a specific views page (not a node)

I do not want to use the D7 Metatag or the MetaTag Quick modules. How can I specify a single canonical link rel for a single URL which is not a node (a view page) via the theme's template.php? I've ...
  • 1
0 votes
1 answer
49 views

Recommended way to use StringTranslationTrait in PHP8 enums

PHP8 has that new cool "enum" feature that should replace all class constants and would make coding easier and safer. One problem I encoutered is that many common Drupal traits (foremost the ...
  • 5,124
0 votes
1 answer
6 views

Migrating URLs without titles into a link field (where the link title is optional) without them becoming NULL

I'm migrating URLs that don't have corresponding titles into a link field, and when I either don't define the title, or use the default_value plugin to set the default value to '', the value actually ...
0 votes
0 answers
20 views

Report comments / Workflow

I am trying to implement a functionality that would allow authenticated users to report comments on a forum post. My first thought was to do it using workflows but comments dont have a workflow ...
-1 votes
0 answers
7 views

End User page to place orders (i.e. Product display)

Team and contributors, I am a long time Ubercart user and am accustomed to building a View to display products for purchase with attributes and options (and adjustments.) It seems that UC is now kind ...
0 votes
0 answers
15 views

Fetch redirect alias using the old alias

I want to get the current alias of the node using an old alias. I do have the Redirect module installed and all the old aliases of the nodes are mapped to the new ones. But I am not able to fetch the ...
-3 votes
0 answers
28 views

Why does opening modal break ajax on parent? [closed]

I am using the Draggable Views module to place a list of items on my page. Draggable Views allows me to drag the items around to change their order. There is then a Save Order button to ajax submit ...
  • 1,008
0 votes
1 answer
52 views

tempstore.private not working in openIDConnect client

I am getting some licence info via retrieveUserInfo in the openIDConnect custom client login process. Ideally i want to write it to the session but opted for the "tempstore.private" since it ...
  • 133
0 votes
0 answers
4 views

Ss it possible to add alter query to add an "OR" operator condition to Search API alter that actually expands the results?

We need to alter a Search API query using hook_search_api_query_alter() to add an additional condition OR condition that is "any of the previous condition OR this new condition" Example: We ...
  • 1,093
-3 votes
0 answers
23 views

How to conditionally load JS based on User Role on Layout Builder?

I'm looking to load a couple of javascript files or functions in layout builder based upon whether someone is an admin or not. I'm not sure if this is something I should be doing in Twig or maybe in ...
0 votes
0 answers
17 views

Access a Computed Field in Views

I am trying to get the new version of Computed Fields to work on our site. It's working great, except I can't get it to be accessed in Views a field. In the README it explains that the new version has ...
  • 93
-4 votes
0 answers
14 views

State field value based on selected country [closed]

How can I get the state value based on the country selected in a webform?
  • 1
-4 votes
0 answers
16 views

control /node/add page content

The role A has the permission to add content A The role B has the permission to add content B, C, D, but not the content A. The normal process is to define these permissions thanks to the "/...
  • 37
0 votes
0 answers
10 views

Auto increment value less than max uid on users table

I'm seeing these errors flooding my log file. They come from commerce order complete pages - and some registration pages too. Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity ...

15 30 50 per page
1
2 3 4 5
1738