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
0 votes
0 answers
65 views

Error in Programmatically Creating Paragraphs with Layout Paragraphs

I am trying to programmatically create paragraphs using the Layout Paragraphs module. However, I'm encountering this error when saving the main entity that contains these paragraphs. I'm looking for ...
yorchperaza's user avatar
0 votes
2 answers
50 views

Adding a default text [closed]

Option 1: Is there any way to write a conditional in Twig that if field1 in Drupal is empty, I can set a default text to say "Bye" Option 2: I was also trying to use the conditional fields ...
kpe's user avatar
  • 1
-3 votes
0 answers
34 views

How to make Drupal 9/10 friends with Sendpulse and other mailing services? [closed]

There was a task to send data from the site to the address book of the Sendpulse mailing service. I have a type of material where there is a name and email field. It is necessary that when creating a ...
Владимир Помелов's user avatar
0 votes
1 answer
32 views

I cannot install Geocoder

I have tried to install Geocoder v4.11 with composer require 'drupal/geocoder:^4.11' --with-all-dependencies, but instead I get incompatibility issues with Guzzle. Problem 1 - php-http/guzzle7-...
velvetInk's user avatar
  • 139
1 vote
0 answers
26 views

How does the RDF module impact user mapping when using the Acquia Migrate Accelerate (AMA) tool?

Before Acquia's AMA tool was open source, I used it on their platform to upgrade from Drupal 7 to Drupal 9. I am in the process of upgrading to Drupal 10 and want to uninstall the RDF module (don't ...
Shay97's user avatar
  • 11
-3 votes
1 answer
94 views

I am trying to install Drupal Commerce, I get error that prevents installation, I don't get what it says about ../private folder [closed]

Can somebody specify where this folder should exist? I created it in the directory containing the vendor directory, in the files directory, outside of the files and in the site root directory, but I ...
mevsme's user avatar
  • 1
0 votes
1 answer
37 views

How do I take the value of a variable from the node template and insert it into the field value?

In the template of the material type node there is a variable that adds and multiplies integers according to the formula, which I take from the filled fields of the node. Everything is working ...
Владимир Помелов's user avatar
-1 votes
0 answers
32 views

How to use the Tableselect element for an order-able list of items?

It's been a minute since I have used tableselect. I want to present a user with a list of sortable options that have checkboxes to indicate they are on or off. See this screenshot: While the table ...
Kevin's user avatar
  • 27.7k
-1 votes
0 answers
24 views

Email no longer received as HTML after switching to PHP 8.1

I am using Drupal 9 and SMTP module to send email. When my Linux server was on php 7.4 this worked fine. After switching the server to php 8.1 the email no longer sends as HTML and the From mail ...
liquidcms's user avatar
  • 1,224
1 vote
0 answers
30 views

How do I always show full search result pages in cases where some results are removed due to access restrictions?

I have a solr search index set up and a view to search content. We have "Region" groups for members so they only see content from their region. The search works great as admin who has access ...
James Prunty's user avatar
0 votes
0 answers
37 views

Trusted host patterns problem, again

I need to set up trusted host patterns for 3 EC2 instances. They all share same base code, so they all use the "same" settings.php. On my two (production) instances everything works fine: ...
lazarcelic's user avatar
0 votes
0 answers
33 views

Is there any way to use EntityQuery on entity_reference fields in reverse?

Let's say I have two custom entity types: entity_one, entity_many. I know how to use an EntityQuery to find entity_one matches if there is a multi-value entity reference field on entity_one. $results =...
JonMcL's user avatar
  • 617
0 votes
3 answers
82 views

How can I have updated content entity data immediately available after update?

I created custom content entities to handle a small NGO membership (Member, Person, both linked to Drupal 'users'). I have a form allowing users to perform online membership application. Submitting ...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
117 views

Why is my message not showing for anonymous user?

In a custom form, I have this Ajax submit: public function ajaxSubmit(array &$form, FormStateInterface $form_state) { $response = new AjaxResponse(); if ($form_state->hasAnyErrors()) ...
gbmapo's user avatar
  • 1,066
1 vote
0 answers
55 views

How can I have both file download and redirection in for submit?

I have this form submit: public function submitForm(array &$form, FormStateInterface $form_state){ // File download $sFileName = 'JdP-Adhesion.pdf'; $sFileNameWithPath = 'sites/default/...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
66 views

How to dispatch a ResponseEvent so that a cookie is added after login?

I want to add a session cookie when a user logs in. The previous implementation I had, was setting the cookie in hook_user_login with this snippet: $response = new Response(); $response->headers-&...
Maria Ioannidou's user avatar
0 votes
1 answer
74 views

Can create directories but can't upload files

When I try to upload a file with a file field, Drupal creates a sites/default/files/2023-10 directory, but can't upload the file. I see this validation error in the UI: "File upload error. Could ...
arnoldbird's user avatar
  • 1,079
0 votes
0 answers
17 views

View File Uploads in Custom Module Admin Screen

I'd like to show a list of the files in a directory in my default/files directory. This will show's all files: /** * Helper function to retrieve and display a list of current uploads. */ protected ...
jasonflaherty's user avatar
-1 votes
2 answers
63 views

How to add a link to table row?

There is a field 'field_upload_artwork' that contains files. I am using them to build links to files and want to insert links after Apparel Printing in the last step of the form. Now the markup in ...
ewik's user avatar
  • 15
0 votes
0 answers
19 views

Email field is not migrated

I am trying to migrate an email field from Drupal 7 profile2 (don't think that matters) and it becomes blank on the Drupal 9 instance. The remaining fields migrate without any issues. My process ...
user111465's user avatar
0 votes
1 answer
55 views

Why doesn't my completion message show?

I have this form to handle a custom content entity: created by this code: public function buildForm(array $form, FormStateInterface $form_state, $contractId = NULL) { Some code to inialize ...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
13 views

Promotion options not visible to Editor role

I have a "Editor" Role with limited access rights. It can basically only create blog type nodes. I'd like to expose to them the possibility to make to publish the node to the frontpage via ...
Andreas's user avatar
  • 372
1 vote
1 answer
70 views

Stylesheets not loading

Has anyone successfully dealt with this kind of error? [Error] Did not parse stylesheet at 'https://*****.***/core/assets/vendor/jquery.ui/themes/base/core.css?s2pf9q' because non CSS MIME types are ...
Cary Gordon's user avatar
1 vote
1 answer
33 views

How to add extra validate hook to the order information form?

I am trying to collect additional information on checkout to add to the order. I have added new fields to the order entity and then used hook_form_commerce_checkout_flow_multistep_default_alter to add ...
liquidcms's user avatar
  • 1,224
0 votes
1 answer
100 views

Why does Ajax prevents managed_file to be displayed?

I have this form created by this code: public function buildForm(array $form, FormStateInterface $form_state, $contractId = NULL) { some initialisation code... $database = \Drupal::database(...
gbmapo's user avatar
  • 1,066
0 votes
1 answer
74 views

Passing variable from parent paragraph to children without using getParentEntity

I have a paragraph called Boxes which is a parent paragraph referencing to many paragraphs of type Box. I have written the preprocess function of paragraph Boxes which contains some logic that can't ...
Mira chalak's user avatar
0 votes
1 answer
36 views

Order is not geting created, but transition is happening in cart

I am doing an Offsite redirection payment with Drupal Commerce. I have a custom payment workflow defined in my_module.workflow.yml as follows: order_linktypeplus_validation: id: ...
KTM's user avatar
  • 2,352
1 vote
0 answers
45 views

Add cancel button to Inline Entity Form/Entity Browser dialog

We're using Inline Entity Form to give users the ability to create new nodes of a different content type and add them to the being edited/created node. When using one of the IEF widgets, there's a ...
fallenturtle's user avatar
0 votes
1 answer
65 views

How to have views exposed filter value show as different value in the url?

I have a search page with a Views exposed filter for the name of a taxonomy term. I have added an #autocomplete_route_name to the form element to make this an autocomplete selector for my term names. ...
liquidcms's user avatar
  • 1,224
0 votes
0 answers
18 views

Prevent view results duplicate caused by workflow transitions

I have a view that lists content fields and it works fine, but, if I want to add a workflow field to the result (I have a field called reject_reason attached to workflow), I added workflow transition ...
Abdulmuhaymin's user avatar
0 votes
1 answer
63 views

Custom Field Type Checkboxes

I'm trying to create a custom FieldType. I've found many example with a textfield. But I want a custom field with checkboxes. I'm having a hard time finding an example like that. If anyone can help me ...
xpersonas's user avatar
  • 522
1 vote
0 answers
22 views

Disable drag/sorting for Entity Browser

I'm using Entity Browser and the Inline Entity Form module with Drupal 9. Right now when you view the form it shows you the currently existing values with options to edit and remove. The thing is that ...
fallenturtle's user avatar
1 vote
1 answer
349 views

why is index.php added to URLs?

Since I updated my site to Drupal 9.5.11, 'index.php/' is added to every URL: http://mysite.org/index.php/ for the home page, for example. On some page, I have a list with links to files and, because ...
gbmapo's user avatar
  • 1,066
-1 votes
1 answer
81 views

JSON.API Failed to fetch

I am trying to set up a React component that will fetch the JSON from my Drupal 9 site using JSON:API and JSON:API Views module. I can see the JSON when I visit the URL, but get 'failed to fetch' from ...
jg999's user avatar
  • 11
0 votes
1 answer
228 views

Query to fetch users with specific roles

I'm using the following code. $query = \Drupal::entityQuery('user'); $query->condition('uid', [302,330], 'IN') ->condition('status', 1, '=') ->condition('field_membership_status....
jg999's user avatar
  • 11
0 votes
2 answers
113 views

How do I render a Media Entity Reference image field in template_preprocess_node()?

I'm altering the way images are rendered in the node preprocess function, and it is working exactly as expected for images in "Image" fields: $field_view = $fields['field_image']->view(['...
safetypin's user avatar
1 vote
1 answer
80 views

Finding all nodes not referenced by a menu

I see this question was asked for Drupal 7, but the menu_link table doesn't exist in Drupal 9. Is there a SQL query for listing all nodes that are not assigned to a menu?
C0c0b33f's user avatar
0 votes
1 answer
53 views

Image field and links not showing in view block template

I have a CT team_members with the following fields. field_team_member_image field_team_member_name field_member_designation field_social_media_links(Multiple values with links to twitter, instagram,...
KTM's user avatar
  • 2,352
0 votes
1 answer
104 views

Show message after redirection

This will be mostly a Drupal question rather may not have any relation to Drupal commerce checkout. I have an Offsite Checkout redirect payment method in which I have a buildRedirectFrom as stated in ...
KTM's user avatar
  • 2,352
0 votes
0 answers
27 views

Configuration synchronization

I am trying to import views from one of my Drupal 9 sites, we will call it Drupal A to another Drupal 9 site, we will call it Drupal B. I keep getting this error: Error message The configuration ...
Madison's user avatar
0 votes
0 answers
31 views

What hides nodes from roles in search results using Solr?

We are hosted in pantheon and using Solr for search. At some point in the build process search stopped working for specific roles. As an admin I see all the nodes I would expect. however for some ...
BrandenB171's user avatar
  • 1,112
0 votes
0 answers
39 views

Webform Composites, Variants and Computed Twig Elements

The webform uses webform composites using the webform_composite module and a variant to show different fields on different reference nodes. Here's the form: uuid: 70a21716-dfec-471a-a6e5-f70046bb8783 ...
esod's user avatar
  • 309
2 votes
0 answers
18 views

Field formatter migration: How do I setup the related yml files?

I've custom formatters in Drupal 7. In Drupal 9 I've a custom module to provide the same formatters. How do I have to setup the migration yml-File, if the names of the formatters in D7 are the same as ...
wla's user avatar
  • 21
0 votes
1 answer
88 views

How can I read a cookie I programmatically set?

I can programmatically set a cookie in a Drupal 9 controller and I can see that cookie in Chrome's developer tools. However, I cannot programmatically get that cookie from a hook. I'm using the SAML ...
BrettSh's user avatar
  • 99
0 votes
1 answer
69 views

How to get $form_state->getUserInput() ( i.e, what the user entered in the input ) in each inline entity form and not only in the first one?

I use the Inline Entity Form module to build nested multiple forms. I have a design form in which there is an inline form - garment. And inside the garment form, there is a product field. In the ...
ewik's user avatar
  • 15
0 votes
0 answers
54 views

Blind SQL Injection vulnerability?

What is the purpose of this unique ID appended to this class in Drupal 9 HTML? js-view-dom-id-7881eb5bafcd4178e6af77ed45179be612e74557a6807989024fac282b24f164 I'm getting what I believe are false ...
Delford Chaffin's user avatar
0 votes
0 answers
46 views

Why am I not able to log to rsyslog?

I am trying to use System Logging on a Drupal 9.5 site running on CentOS7. I have followed the guide from here: https://www.drupal.org/docs/8/core/modules/syslog/overview and have the following set up:...
liquidcms's user avatar
  • 1,224
0 votes
1 answer
166 views

Multiple primary key defined When importing DB to Dev

I'm trying to update my D9 dev site database using my production database, but it keeps erroring out when it reaches to ALTER table section in the database. This is the ERROR 1068 (42000) at line ...
MetalBearSolid's user avatar
1 vote
0 answers
54 views

Getting deprecated error for guzzle http in php 8.1 backup and migrate azure module

I am using php 8.1 for drupal 9.5.9 application. I wanted to take and restore database and code backup for which I am using Backup and Migrate module with backup and migrate azure module. But I am ...
Saili Jaguste's user avatar
0 votes
1 answer
28 views

Webform: Remove automatically generated empty composite item in results edit

When I enable, submit, and edit results in the webform example composite module, an extra item is automatically generated. I'd like to keep "Add 1 more items", but remove the automatically ...
esod's user avatar
  • 309

1
2 3 4 5
36