All Questions

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

How do I configure Scout APM?

Their docs have setup instructions for Symfony, but I'm not sure how they translate to Drupal: https://scoutapm.com/docs/php/symfony. Could anybody provide some insight on how the xml/bundle ...
0
votes
1answer
37 views

The <b> tag is replaced by '*' character

While sending out html emails that are configured to use the following template. <p>Submitted on [webform_submission:created]</p> <p>Submitted by: [webform_submission:user]</p> ...
-2
votes
0answers
18 views

What's the best way to create summary reports?

I have a running site with extra fields that track attributes of the user. That is, field A might be filled with 1,3,4 or 3,5,7. And field B might have alpha, gamma, omega for one user but beta, ...
0
votes
0answers
14 views

Custom entity access control based on group membership

I am using the group module in Drupal 9 to control access to content by user groups. I have a custom entity defined as a single table unfieldable entity. The entity has a "group ID" base ...
0
votes
0answers
42 views

How can I debug cache tags not invalidated as expected?

Up unto last week my Drupal site and varnish_purge worked together fine with Varnish. After updating the modules to the latest versions, cache tag invalidation seemed to stop. Nothing else really ...
0
votes
1answer
23 views

Programmatically getting variation type fields in order

I am trying to get variation type field values from the order entity but I can't find any documentation on this. I am using an event subscriber to run the following code when an order is paid. The ...
0
votes
0answers
20 views

Restore menu items using database backup

When working on a site I accidentaly removed all my menu items I now want to recover them from a database back-up I have. Is it enough to just copy all data from these tables from the backup to my ...
0
votes
0answers
7 views

Order item - title missing product attributtes

i'm placing a manual order, and when I search for a product, I have only the sku and the title, but with that I don't know the size for example or the color, as they are attributes, how can I do to ...
-2
votes
0answers
26 views

Programmatically assign a theme to a specific content type [duplicate]

Is it possible to assign a specific theme to a content type? For example, suppose you have two themes: "Theme 1" and "Theme 2" and a content type "Page". The default ...
-2
votes
0answers
40 views

How would you go about syncing new users between two sites?

I have a copy of a Drupal 9 website and the original source website has had new users since work began on the copy. Now I need to sync the new users from the original source to the new copy ...
1
vote
0answers
34 views

Custom node routing

I have a product content type with alias: /products/headphone. This product page has two url variations: /products/headphone/wire /products/headphone/wireless Both urls should point to the same ...
0
votes
1answer
20 views

Extending block, a block with a paragraph field, and 3 paragraph fields... how to loop through the paragraphs from the block extension

This is what I have: I have three twig files: block--paragraph-images.html.twig (which extends block.html.twig) field--field-paragraph-image-block.html.twig (the paragraph field which is located in ...
-1
votes
0answers
18 views

Error: Call to undefined method Drupal\webform\Routing\WebformUncacheableResponse::addCacheableDependency() [duplicate]

Error: Call to undefined method Drupal\webform\Routing\WebformUncacheableResponse::addCacheableDependency() in Drupal\webform\Controller\WebformEntityController->javascript() (line 123 of /var/www/...
0
votes
0answers
19 views

Message Subscribe is ignoring flag and sending notifications to everyone

I'm developing a Drupal based forum and I'm using the Message stack modules combined with a tweaked version of this custom module. https://github.com/Lullabot/message_integration The idea is that all ...
0
votes
0answers
18 views

Webform sometimes not sent on pages using different theme (via theme negotiator)

I have a website with a main theme and another "mini" theme that is used via a custom module with a theme negotiator, determined by node type. The pages using the mini theme include a ...
0
votes
0answers
13 views

Deleting a Paragraph Item results in AJAX POST error "Missing bundle property on entity of type node."

Working with an older D7 site. On it, we have added the latest version of Paragraphs to add some content items to a page. This all works fine. However, when trying to remove a Paragraph Item from the ...
-2
votes
0answers
25 views

What risks are there in running the Devel module in production?

My organization is investigating a bug that we can't reproduce in testing or staging. It only occurs on Production, most likely due to the fact that production is in heavy use and the traffic is ...
0
votes
1answer
19 views

Toggle view displays on the same page

There are 2 view displays (2 blocks) which are showing products, one with tile display, one with list display, as shown in the image below. Is there a way to have both blocks on the same page, but ...
0
votes
0answers
15 views

Drupal 9 Commerce change the Pay button text

I have created Drupal 9 website. On the website we accept donations using Commerce with Commerce Stripe as the payment processor. By default, the payment button says "Pay and complete purchase&...
0
votes
1answer
29 views

Validation for radio inputs don't work for me

I'm building a form with the drupal forms api. Validation works well for all my other fields. But I've started to try and work with radio buttons too now. It doesn't matter if I click on a radio ...
-1
votes
0answers
34 views

drupal 8 Twitter gives Unable to render Card preview [closed]

iam using drupal 8 and a module redirect when the url aliasing be as example http://www.example.com/node/111/%D9%84%D8%A8%D9%86%D8%A7%D9%86 ;the short url www.example.com/node/111 in twitter give ...
-1
votes
1answer
33 views

Formatting date field with the Form API

Hi there I'm using drupal 9.x and the forms api to generate a dynamic form. Altough I'm living in the Netherlands where the date format standard is 'dd/mm/yyyy'. I've looked around on the internet for ...
2
votes
0answers
33 views

drush cr on replicated servers

I am the administrator of a Drupal site replicated on 4 servers, behind a load balancer. There is only one database that is shared by the 4 instances. When I run drush cr, is it necessary to run it on ...
0
votes
0answers
11 views

Drupal Console - config:import:single - Class 'Drupal\config\StorageReplaceDataWrapper' not found

When I am trying to import a single configuration file within my multisite environment, I am facing the following error: root@d655a4e6dc36:/opt/drupal/docroot# drupal --uri="3030-bronze-minnow-...
0
votes
1answer
16 views

getCommentedEntity returns null

I have a comments page set up and when I devel the page for a specific comment I see the getcommentedentity method. I am trying to get the commented entity details using the below code in my VBO ...
0
votes
0answers
24 views

Update body field from ajax callback

I need to update the common "body" field when I change some paragraph fields value. Here is my hook_form_alter : $form["body"]["#prefix"] = "<div id='...
1
vote
0answers
17 views

Adding Current Product page Variant ID/SKU to webform submission Drupal 8

I have product type event, this event have registration fees if price value not zero. Product page built with views and I embed related webform inside it. am using module called commerce webform order:...
2
votes
1answer
50 views

hook_node_presave get original of translated node

I'm using a hook_node_presave and I want to detect which field is updated when the translated node is updated. Here is my code : function hook_import_node_presave(\Drupal\node\NodeInterface $node) { ...
1
vote
1answer
55 views

Difference between a front-end theme and an administrative theme?

I am teaching myself Drupal 9 and I see that the Claro theme is defined as a "Drupal administration theme" while Olivero is defined as a "Drupal front-end theme." Are these ...
0
votes
1answer
23 views

logging working on local site but not remote site

I recently migrated from Drupal 8 to 9. Works ok on my local (MAMP on Mac), but not on the remote (AWS Lightsail). Local has PHP 7.4.12, Remote has PHP 7.4.2. I put the entire codebase in git, and ...
1
vote
0answers
51 views

How does the config sync directory work exactly?

I just had a question quick about how Drupal's config sync works. I work on a large Drupal site where I am having some coworkers joining in on working on the project. It's a version controlled site ...
2
votes
1answer
83 views

Block Settings inside Form

Please I need help with my code. I have a form and a block created programmatically. The block embeds the form to show it on the frontend. The block also has some settings (form preffix text). I want ...
0
votes
1answer
30 views

How to debug permission problems

I already found answers for older versions here and here but as far as I can tell none of it directly translates into drupal 9. The matter in practice: I don't have a huge experience but I was very ...
0
votes
1answer
46 views

How to add internal path in *.links.menu.yml

I am trying to add an internal link to admin toolbar but I am not able to achieve it. According to documentation we add an internal link in *.links.menu.yml in the below manner but the link is not ...
0
votes
1answer
101 views

Creating a custom module caused "The website encountered an unexpected error. Please try again later."

Drupal 9.2.7 on XAMPP 7.3.29 , 7.4.21 on Windows 10 Home. I tried to create a custom module which allows global JavaScript and CSS (effective in all webpages in my website), by creating the directory ...
2
votes
0answers
60 views

How to automatically generate two aliases for the same node? [closed]

I am working on a Drupal website. I need to automatically generate 2 url aliases for the same node on the website. I have tried installing Pathauto but it lets me generate only 1 alias when a new page ...
-1
votes
0answers
18 views

Why is the email handler's default body in webform unable to edit?

Using Drupal 9 and webform 6.0, I cannot add/remove anything in default body message and custom body when I tried to customise the message on my site. Does anyone know what's causing this problem?
1
vote
1answer
32 views

Uploading local files via composer

I'm using composer to manage a Drupal 9 instance. I'm brand new to composer and have no idea what i'm doing. That being said, I've successfully set it up and have used it to install modules and an ...
0
votes
1answer
34 views

Upgrading to Composer 2 blocked by Symfony dependecies

I have an existing Drupal 8.9.16 site which uses Composer 1 (and Commerce 2.24). I am trying to upgrade to using Composer 2 using this guide: https://www.drupal.org/docs/develop/using-composer/...
1
vote
0answers
7 views

How to generate order pdf in drupal commerce and attach in hook_mail_alter [duplicate]

How to generate order pdf in drupal commerce and attach in hook_mail_alter using custom code. I trying another of method but seems not worked for me
1
vote
1answer
23 views

Place field in "Url Alias" advanced group section (path-0)

I'm trying to place my node field to the Advanced group - URL alias section. I'm doing it in custom hook_form_BASE_FORM_ID_alter(), where I'm trying to set custom #group like this: $form['my_filed']['#...
-2
votes
0answers
13 views

how to get commerce invoice pdf path in the mail_alter hook [duplicate]

I was trying to get the pdf file path the generated using commerce invoice in mail_alter hook. But Below I tried $invoice_storage =\Drupal::entityTypeManager()->getStorage('commerce_invoice'); $...
-1
votes
0answers
19 views

Custom JS Code to Webform's element [duplicate]

I have written a piece of custom JS code that filters the certain field from the external DB server. I have tested it and it works perfectly. Next, I would like to use this code to one of the fields ...
0
votes
1answer
21 views

Unable to upload files through RESTful services

I am trying to upload pdf files to webform submission using REST API. Since the Core File Upload functionality did not seem applicable for webform submission, I applied the patch from webform_rest ...
0
votes
1answer
34 views

Views: Put the extra condition in the ON clause for the query

I want to put extra ON condition SELECT * FROM users_field_data t1 LEFT JOIN node_field_data t2 ON t1.uid = t2.uid AND t2.type = 'article' and t2.created > 1630491519 WHERE t2.uid is null; using ...
0
votes
0answers
22 views

Attach PDF file to Drupal Commerce Order Notification generated with invoice commerce

How do I attach a pdf file to the commerce email? I have invoice commerce. Invoice commerce show view pdf option on every order and I want to send that pdf in email I am stumped on how to get the pdf ...
-3
votes
0answers
74 views

My website crashed after a mistake when creating a custom module; the mistake was fixed, but I can't flush all caches in a "normal" way

I can't use the GUI I prefer not to install Drush in my current localhost Windows 10 environment I tried the following which failed: Adding $settings['rebuild_access'] = TRUE; to the end of /sites/...
0
votes
1answer
73 views

How can I bootstrap my site from an external script?

Community asked.. Please clarify your specific problem... Fair comment. What I'd like help with is how do I correct the script below so it works with D9. <?php use Drupal\Core\DrupalKernel; $...
0
votes
1answer
26 views

Drupal 9 core multilingual: cannot translate main navigation menu - button translate missing on menu items

I'm trying to catch multilingual features of Drupal 9 and have wamp64 local development server and clean Drupal 9.2.8 install. I've enabled 4 multilingual core modules: Configuration Translation, ...
0
votes
1answer
19 views

How to keep Contextual Filters (query) on Exposed Filter change

I have a view page that leverages Contextual Filters with query parameters. So when a user visits the view page, the URL is as such… /search?location=san+francisco. This works as expected. Now there ...

15 30 50 per page