All Questions

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

How to get menu Attributes from a theme's preprocess function?

I am developing a theme and trying to send custom vars to a twig menu template (since it pulls data from config) and have a loop to add variables in preprocess: foreach($attributes as $attribute => ...
  • 282
-1 votes
0 answers
17 views

image styles not being created

I've got a production site running 9.4.6 in which each user profile includes an image, and the image has to appear as both a thumbnail and as max325 image styles at various points. These image styles ...
-2 votes
0 answers
19 views

jQuery CDN misssing

I have a drupal 9 latest updated website When I render my content I can see bootstrap <script> tag as below src="https://cdn.jsdelivr.net/npm/bootstrap@3.4.1/dist/js/bootstrap.min.js" ...
0 votes
0 answers
26 views

Action of webform displayed in modal opened by OpenModalDialogCommand in AjaxResponse

I'm trying to open a webform in a modal by using OpenModalDialogCommand in an AjaxResponse like this. in buildForm method, I'm specifying AJAX callback like this: $form['actions']['submit'] = [ '#...
1 vote
2 answers
30 views

Change the "add entity" page title on a custom content entity type using alterRoutes()?

I created a custom content entity type dog using drush generate entity:content. When I go to www.example.com/dog/add, the page title (the one in the <title> tag, not the <h1> tag) is "...
0 votes
2 answers
19 views

How to set the text format in BaseFieldDefinition::create()?

I'm creating a base field (text_long) on a content entity and I want to limit it the Plain text text format for all users at all times. I know I can use the Allowed Formats module to limit the options,...
-2 votes
1 answer
38 views

Why is node save extremely slow with two or more tags after migrating tags and restoring from backup?

The problem Saving a node with one tag saves normally. With two or more, the save takes upwards of 40 seconds. The problem only occurs after migrating in a set of tags from csv, then creating a ...
  • 133
2 votes
1 answer
58 views

How to add additional drupalSettings to all pages with an event subscriber

I need to set the user timezone on all pages in the JS drupalSettings object, so that it can be accessed on any page. As drupalSettings.user is provided by core, I want to set drupalSettings.user....
  • 15.3k
0 votes
0 answers
13 views

Combining line items in cart

I am trying to "hide" individual line item values on my shopping cart. Is there a way to combine line items (possibly based on a term applied to each) such that they show as 1 item with the ...
  • 927
-3 votes
1 answer
23 views

Moving an existing site to a new server with a new directory architecture [closed]

I'm moving an existing Drupal 9 site from RHEL 7 to a new RHEL 8 server. On the new server, I did a clean composer install of Drupal which created a 'web' directory I didn't have before. I copied ...
  • 79
0 votes
0 answers
10 views

Cannot set properties of null (setting 'innerHTML') error for anonymous users when loading iframe

I have a custom module that is displaying a twig template with an iframe inside it: There is JS file also being loaded and when I load the page while I'm logged in as an admin, the iframe shows up ...
0 votes
0 answers
24 views

Error: Cannot create references to/from string offsets in Drupal\Component\Utility\NestedArray::setValue() [closed]

I am having trouble creating custom fields in the Drupal form state (conditional-form-fields). If anyone has solved this issue, please let me know as soon as possible. The following error occurs while ...
1 vote
1 answer
23 views

How can I have "minimum-stability": "stable" in my composer.json and install alpha version of a contrib module?

Trying to update Drupal core to 9.4.7 with composer update "drupal/core-*" --with-all-dependencies, I got 9.5.0-beta1 version. Digging a little in Drupal Answers, I found 'Update installs a ...
  • 982
-3 votes
0 answers
15 views

Migrate drupal website from one server to another

I have moved a drupal website to another host. Because i don't have a good understanding of drupal because i haven't worked with it i will walk you guys throughout what i did. I compressed the whole ...
0 votes
0 answers
53 views

Symfony Routing Error

My site has completely gone blank after updating modules with Composer. This is the error I get. I've found some similar errors in a topic from the past, but they are all about earlier version of php ...
0 votes
1 answer
18 views

RuntimeException when updating from command line

I went to my website's directory and ran: composer update [RuntimeException] Could not delete /home/example/public_html/example.com/web/sites/default/default.services.yml: ls -la output: -rw-rw-r-- ...
  • 1
0 votes
0 answers
11 views

Correct way to migrate multiple paragraphs from custom source

Drupal 9.4.5. Looking to migrate Drupal 7 books into Drupal 9 paragraphs. Will need to migrate multiple paragraphs into D9 multi paragraph reference fields. Below is outline of desired paragraph ...
-3 votes
0 answers
15 views

How can I create form with ajax validation and ajax callback?

I have a problem with the form, it was working as expected before, but we want to add css styling, when some required elements aren't filled and it makes the form add this css from ajaxCallback ...
0 votes
1 answer
22 views

What is the difference between Platform CDN and Cloudflare? [closed]

The cloud provider I use(Acquia) has a set of API endpoints, and one of them is to clear caches, including Platform CDN + Varnish. When I read Platform CDN, it gets me wonder where Cloudflare then ...
1 vote
0 answers
18 views

List down only entities which share the same field value as another

I'd like to have a View of entities (e.g. nodes) that only "show duplicates", i.e. show entities that have a specific field having a value that's also used by two or more entities. To put it ...
  • 1,144
0 votes
0 answers
12 views

Only show other members with the same taxonomy term selected

On my site I have a "member" content type which has a field of field_member_pos that's a taxonomy reference field that allows you to select 1 or both options. This taxonomy term only has 2 ...
-3 votes
0 answers
36 views

When people install a new website with Olivero some empty space can be seen [duplicate]

When people install a new website with Olivero some empty space can be seen. I have marked the empty space in Red (this is from a fresh Drush install of Drupal 9 with Olivero as default general theme)....
  • 1
0 votes
0 answers
34 views

How to use striptags twig function in a commerce product template?

For a client I need a wysiwyg field on my nodes and commerce products so they can add <em> and <span>&nbsp;</span> tags in their titles. I display this title_nbsp field value in ...
  • 722
-5 votes
0 answers
14 views

Square integration [closed]

How well does Drupal integrate with Square? For instance does it use Square shipping fulfillment, does it allow prices for products to be different than those on my Square POS system or backend, does ...
0 votes
0 answers
13 views

Remove duplicated email in views data export

My site contains users with duplicated emails which is fine for my use case. I need to export the user's fields into an xlsx but, this time, without duplicated email. For this I have created a Users ...
  • 564
-3 votes
0 answers
10 views

How to import Country, State, city excel data into Drupal Webforms [closed]

We purchased a excel file from ISO website for most up to date version of Global Country State Data to use on all of our forms. We plan on using Drupal 9 Webforms. Does anyone know of a plugin that ...
-2 votes
0 answers
16 views

Sorting on view by sub-term weight

I wanted to start asking this question, clarifying that I'm pretty new on drupal and maybe getting some concepts wrong. I have a vocabulary of products and categories ordered like this. Category 1 ...
0 votes
1 answer
21 views

How to query webform submissions table

I have a webform which contains a field of visit_date, and 3 fields of time selection visit_time_1,visit_time_2 and visit_time_3 which at least one must be filled and they cannot have same time with ...
-2 votes
0 answers
18 views

Ajax error 200 All over the site [closed]

I have a Drupal site I haven't maintained for a while. All in a sudden, it started giving AJAX errors on every actions I make. I know I should probably update the site, but I'm not sure I can do it ...
0 votes
1 answer
46 views

Without site aliases, "drush sql:sync" fails

I run into an issue that the use of an alias returns correct values, but without alias or from remote, I miss the DB connection. Furthermore, the root directory is wrong. The missing DB connection ...
  • 3
-3 votes
0 answers
16 views

In drupal the menu link in different path in in different language [closed]

I using the module to create the custom menu module how can I add the different menu link in the in same menu in different languages. hook_menu_links_discovered_alter(&$links) { $language = \...
0 votes
0 answers
20 views

How do I create a condition to test if the value of a field is unchanged?

In Drupal 7 Rules I could create a condition "Data Value is Empty" and could drill down in the data selector to node-unchanged.field_to_test. However in Drupal 9 Rules when I create a ...
  • 1
0 votes
1 answer
22 views

Unable to install theme: '…' due to unmet module dependencies: '1'

I have a weird error with a custom theme (called uv_basic_theme). It ran well under Drupal 8, and now I've upgraded the site to Drupal 9. (9.4.4) After upgrade, the status report listed this error: 1 (...
-2 votes
1 answer
27 views

How to migrate Group module from 2.0 to 3.0?

I am working on implementing the Group module on Drupal 9. The Release Notes describe moving from Group 2.0.x to 3.0.x as a 'Migration', which I take it is not just an upgrade that can be done using ...
1 vote
1 answer
35 views

Replacement for hook_user_presave() for saving values captured in the user form to the user profile

I am porting a module from Drupal 7 to Drupal 9. The code uses hook_user_presave() to save two fields on the fly into the user profile data. /** * Implements hook_user_presave(). */ function ...
  • 848
-2 votes
0 answers
34 views

Is there an equivalent of Slickgrid module, for excel style editing of multiple node field content? [closed]

slickgrid module/project is for Drupal 7. I've searched its issue list for a "roadmap" "Drupal 8" etc. This module/project provides on-page in-place editing of multiple node ...
0 votes
0 answers
53 views

Lando runtime exception during installation

I keep getting the same error when trying to install Drupal locally on my Windows 10 Pro machine with Lando. Steps to reproduce: Install lando.exe on Windows 10 Pro, including bundled Docker Download ...
0 votes
0 answers
17 views

How do I show sets of questions based on the value of another field?

I am trying to create a registration webform based on the type of program students are registering for. For example if students have options to select ( School A, School B, School C, etc.) I would ...
-2 votes
0 answers
30 views

How to put the result that return function form the .module file to the method of the class that is in the file of the src folder? [closed]

In my module file custom/entity_product_admin/entity_product_admin.module there is a function: function _entity_product_admin_get_product_min_price($custom_product_id) { // code } Which returns an ...
  • 1
0 votes
1 answer
19 views

Getting error "PHP files in the Drupal files directory can be executed." in Security Review v.7.x-1.3

I am on Drupal 7.92. When I run Security Review I get the error "PHP files in the Drupal files directory can be executed." in Security Review v.7.x-1.3. The sites/default/files directory is ...
  • 265
1 vote
0 answers
48 views

Why does placing a menu block on a page stop the page from being cached for anonymous users?

If I show a menu block on a page, that page will never be cached for anonymous users. Is that expected behaviour or is it caused by something else on our site? If it is caused by something else, ...
0 votes
1 answer
32 views

Printing the node title instead of the file name from a field

I have a block view, which is an unformatted list which prints my content type. All content has a field_file which I access using views-view--download--field-file.html.twig. This prints a file link ...
-1 votes
0 answers
28 views

How can I install a npm package? [closed]

I want to use ntp-client on my Drupal site. What is the proper workflow to install and maintain this or other npm packages under Drupal?
  • 406
0 votes
0 answers
6 views

How to apply Views bulk operations on nodes related with layout builder settings?

I have a number of nodes of a particular content type with Layout Builder enabled. Layout Builder has an option to revert to the default for each node of a content type. How can we expose this ...
  • 848
0 votes
0 answers
14 views

How to direct content to individual users rather than posting on homepage in Drupal 7 [closed]

I have created a content type called MEMO in drupal, after creating the MEMO i want to send it to individual users on the Drupal page and not post it on the homepage for every user to see. Any module ...
-1 votes
1 answer
21 views

mime type ('text/html') is not supported stylesheet MIME type, and strict MIME checking is enabled [closed]

Im just trying to add Fontawesome to my new custom theme in libraries.yml but im getting: mime type ('text/html') is not supported stylesheet MIME type, and strict MIME checking is enabled. global-...
0 votes
1 answer
35 views

Why does the site redirect from https to http when I do some modification?

Browsing through my site is working fine, but when I do some modification on my Drupal site, it goes to http instead of https, which gives "Connection timeout". The Drupal site depend on ...
-2 votes
0 answers
23 views

Update translated media object name programatically [closed]

I'm programatically adding translations to media entities and I'm not able to update the name. $photo_es = $photo->getTranslation('es'); $photo_es->name = $title_es; $photo_es->field_body->...
  • 17
0 votes
1 answer
19 views

How do I make the default content View filterable by multiple content types?

Below is a clip from the content list admin page in Drupal 9, showing the Content type field drop-list, allowing admin users to filter the content list by content type. Is there any way to alter this ...
  • 3
2 votes
0 answers
64 views

Field formatter with twig editor in settings form

I've created Drupal 9 module with custom field formatter for many field types (string, entity_reference, image etc). I'm trying to implement twig editor in the formatter to control output. I need to ...

15 30 50 per page
1
2 3 4 5
1730