All Questions

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

Access custom fields on account of current logged in user

I am trying to do something which seems like it would be pretty damn simple, yet I can't get to work; access a custom field (added via the UI at /admin/config/people/accounts/fields), for the current ...
0
votes
0answers
14 views

Ajax callback issue

I am using ajax callback on field_status. This is a drop down menu. A selection in field_status should trigger comment fill-up. I am getting blank comment box. function helper_form_alter(&$form, \...
1
vote
1answer
20 views

How can I avoid to return an access denied page?

I've developed a custom controller that serves as a simple endpoint, POST method. This controller has custom access control. Custom access is done by looking for a header in the HTTP request, by ...
0
votes
0answers
13 views

Why does core Search fail to index the word “HEERF”?

The word HEERF is contained within the body/content of the node, but when I search for the word is is not found. Searching on "Federal" or "Cares" returns the page in the result ...
-1
votes
0answers
16 views

Warning: call_user_func_array() expects parameter 1 to be a valid callback,

I'm modifying a custom module and when I tried to add a custom inc file, I'm getting the following message: Warning: call_user_func_array() expects parameter 1 to be a valid callback, function '...
0
votes
1answer
9 views

Webform email with list of senders

I am build a webform to send emails. I have some user local accounts. I would like to login with personal user account and send an email, choosing from a list of possible senders. It is possible in ...
0
votes
1answer
19 views

How do I detect whether any contact forms have been created?

Context: On my Drupal 8 site I'm trying to add in a new section containing a view that lists out all forms. The user can then click on one of the form and it launches a download of all the messages ...
0
votes
1answer
21 views

update drupal core from a version to a new version with composer

i want to update the core from 8.7.6 to 8.9.2 and when I try this command "composer require drupal/core:^8.9.2 --update-with-dependencies" i have got an error like below , can anyone help me ...
0
votes
1answer
22 views

User edit form on custom page is resetting roles when user belongs to the “Administrator role”

I'm trying to display the user edit form on a custom page with limited fields. Submitting my form works well, but if I have the Administrator role, roles are reset. I don't understand why this is ...
0
votes
1answer
38 views

How can I get a list of all connected/logged in users?

I would like to make a list of all logged in users accessible through the backend. The routes are created. It is only the request to retrieve the users that I would need. Is this data in the 'sessions'...
0
votes
0answers
23 views

Default_value not working for radio buttons after ajax calback

I am having problem to set the default_value of radio button populated after ajax callback. After ajax callback radio button is populating but default_value is not selected. Here is my code. $...
-1
votes
1answer
15 views

Email verification field for content types

I have a content type with email field. I will like users to verify the email field when they create content. I don't see a Drupal 8 module to do this. Is there an easy programmatic way to achieve ...
0
votes
0answers
10 views

doctrine/reflection conflicts with doctrine/common

My current Drupal version is 8.9.3, running on PHP 7.3.20, and updated from Drupal 8.9.2 (fresh install) using compose update. I tried to upgrade to Drupal 9 used this https://www.drupal.org/docs/...
-3
votes
0answers
49 views

Hi, I am created the custom form module and twig template.. but form doesnt render on page.. I am paste my code here.. please help me [closed]

Form <?php namespace Drupal\proposerdetails\Form; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; /** * * {@inheritdoc} * */ class ProposerDetailsForm extends ...
0
votes
0answers
27 views

Learning sites for using Composer for Drupal 8 [closed]

I built a Drupal 7 site years ago. I always work on the site in the browser. I’ve been able to keep up with the changes so far (site is now using current Drupal 8 version), but it seems like learning ...
0
votes
0answers
22 views

D7 to D8 migration running incredibly slow

We are upgrading our D7 instance to D8 and when I migrated my local instance over it took a couple of hours, but that was no surprise. User migrations were processing about 50 users at a time via the ...
0
votes
1answer
21 views

Why will drupal not recognize my configuration?

I am trying to import configuration from one site to another. I have copied the directory full of config files from an older site to my new site. When I try to run Drush cim, the files all show up ...
-4
votes
0answers
19 views

Trying to add a custom .js file for the User module [closed]

I register my js file in user.libraries.yml file my custom js file is user.custom.js. drupal.user: version: VERSION js: user.js: {} user.theme.js: {} user.custom.js: {} I ...
1
vote
0answers
17 views

Defining some custom permissions with hook_node_access_records and hook_node_grants

I'm trying to figure out the best way to handle some custom permissions with Drupal 8, using hook_node_access_records and hook_node_grants. Here is my setup: I have some nodes of type "group&...
0
votes
0answers
18 views

Copying prod multi-site installation to dev multi-site installation

I am attempting to upgrade my Drupal 8.9.2 multi-site installation to D9. I was hoping to work this all out on a development installation, that is located in a subdirectory of my home directory on my ...
0
votes
0answers
11 views

Google Tag Error when clearing cache?

I have been trying the below issue when clearing the cache on DEV. Drupal\Core\File\Exception\FileWriteException : The specified file 'temporary://file9PWd0P' could not be moved to 'public://...
0
votes
0answers
11 views

How to send system mails in html format (with Swift Mailer)?

At Account settings page (/admin/config/people/accounts) I can edit system mails Drupal is sending (Welcome, Account activated, Account blocked and so on). I also installed and configured Swift Mailer ...
0
votes
2answers
20 views

How to change the url the core search form submits to?

The action value for the core search form is /search/node. How could I get it to go instead to a different url for a custom View?
0
votes
0answers
7 views

How to add another form mode(commerce_order_item) in add to cart formatter?

I need to configure multiple form mode(commerce_order_item) for add to cart formatter. By default add to cart points to add to cart form mode. I have created couple of form modes like quick add to ...
0
votes
0answers
15 views

How do I use the computed twig element to get the value from a custom composite element?

I have created a custom composite element by cloning the example module of Drupal 8 Webforms. It has a radio button and 4 select boxes. So when clicking 'Add" button, another row is being created,...
-1
votes
0answers
23 views

db_select fails when query condition argument contains & symbol

$query = db_select('node','n') ->fields('n', array('nid')) ->condition('n.title', $node_title, '='); When $node_title string contains the & symbol, it isn't working. How can I encode ...
0
votes
0answers
10 views

how to get the value of view reference field in form

I am altering the form of a custom block shown in layout builder and I need to get the value of views reference field to implement an ajax callback. these two way return null $form_state->getValue('...
0
votes
0answers
9 views

How do I restore/recreate accounts created using OpenID after restoring from a backup?

After performing a rollback of our Drupal 7 site, we realized we had 20 - 30 users that were "lost". Looking for the most efficient / possible (?) way to recreate those users with the least ...
0
votes
1answer
54 views

Ajax error when trying to add another paragraph

Drupal 8.9 and paragraph 8.x-1.11 My issue is that Ajax breaks when altering the #validate form. This is an issue for any form! It may have to do with my ajax, but here is my setup. I have a paragraph ...
0
votes
0answers
10 views

Workflow Rules breaking site deployment

I'm trying to deploy a development Drupal instance to a test environment, but something is going wrong with Rules. I copied the entire site's filesystem, dumped the database with mysqldump, imported ...
2
votes
1answer
36 views

Getting latest entity data from the database

The problem: I open a drush php:cli shell and run the following: >>> \Drupal::entityTypeManager()->getStorage('paragraph')->load(477)->get('field_end_time')->getValue()[0]['value']...
0
votes
1answer
14 views

Migrate Multiple URLs from a Spreadsheet into ONE Link Field

I'm trying to migrate from Google Sheets into Drupal 8.9+. I have successfully configured most of the migration, but am having trouble migrating two source link fields (Event URL & Ticketing URL) ...
0
votes
0answers
14 views

Optimizing images before saving

I have a Drupal 8 website with customer contributed content. The images uploaded by customers are not optimized, so I am using image optimization pipeline of the imageapi_optimize contrib module to ...
0
votes
1answer
33 views

Generic field.html.twig template for a custom Entity

I have a custom Entity called custom_entity, along with a custom module which provides twig templates for my bundles and their fields. How can I define a generic/base field template for all fields ...
-1
votes
0answers
20 views

Why my custom migration doesn't work when i try to upload the image of the article to the field_image?

I wanted to migrate the article of an old blog to drupal9 (the 2 project are on local) so i use the migrate Api and i was able to retreive the title and the content of the article (except that the ...
0
votes
0answers
12 views

Master view with master node and micro node

I use micro modules to manage a multisite for a french university. I want to create a view for the master site, which contains all master nodes and nodes from micro-sites tagged with "promote in ...
0
votes
0answers
17 views

When I buy a product and continue as guest, I get a random email. How can I remove it and keep it empty?

When I buy a product and continue as guest, I get a random email. I suspected it is coming from the anonymous user email (which might have been added), but when I checked the database, the anonymous ...
-3
votes
0answers
22 views

How does the FormAssembly module work? [closed]

What type of embed does the FormAssembly module create on a page? Is this an iframe embed, or is it a more "native" embed? FormAssembly is a form builder and this module was built by Drupal ...
-1
votes
1answer
12 views

Alter Webform email body

I'm unable to find an example of altering the body of the Webform email confirmation according to the value submitted. I've got in my form a select field, I would like to change the body of the email ...
1
vote
0answers
20 views

How do I translate a programmatically-created custom block?

I am searching from long hours about this problem. I created a block programmatically, in my custom module, with hook_block_info(). I create its fields in hook_block_configure() and save values of ...
-1
votes
1answer
26 views

What is correct api key name in headers

I'm using this module https://www.drupal.org/project/services_api_key_auth, it states that you can either put the api_key in query string or inside header. In query it works like this domain.com/api/...
0
votes
1answer
15 views

Path alias and taxonomy term view

I have PathAuto providing /term/[term:name] for terms of a specific vocabulary. If I hover over the link for any of the terms, the path given is the alias. When a term page is requested, e.g. /...
0
votes
0answers
16 views

Content moderation “current revision” not set on nodes migrated from Drupal 7 where there are both a published and draft revisions

I am working on upgrading a Drupal 7 site to Drupal 8. The upgrade uses a content-only custom migration. The Drupal 7 source site and the Drupal 8 destination do not contain any custom modules other ...
0
votes
0answers
14 views

Automate notification to Mailchimp

I am trying to automate a notification integration between Drupal8 and Mailchimp. I currently the Mailchimp module installed and a signup form has been configured so that people can signup for ...
-2
votes
0answers
17 views

How to set equal height to drupal blocks [closed]

I am using bootstrap theme with D8. I have 4 blocks. Each row should have 2 blocks. Below shows code for one block. Rest of the blocks have identical code except for the characters. If all the blocks ...
1
vote
2answers
40 views

phpcs rule or sniff for detecting usage of the “ksm()” or “kint()” function?

Would it be possible for my local PHPCS standard to warn me when I use certain PHP functions like kint() or ksm()? It's not part of the Drupal Standard but I'm running a modified version with some ...
-2
votes
0answers
16 views

Can Google Analytics track user interaction with FormAssembly form, if we have integrated our Google Tag Manager into the Drupal site? [closed]

We are looking to build a form and add it to our website using FormAssembly. We would add the form to our page using the Drupal module https://www.drupal.org/node/2569059. If we add the form this way ...
-1
votes
0answers
56 views

Layout Builder and field_collection issue

I migrated all my field_collection content to the paragraph module without any issues, but Layout builder seems to be buggering up when I try to use it. I get: Drupal\Component\Plugin\Exception\...
-2
votes
0answers
20 views

How can I create a report of reusable components in pattern lab? [closed]

I have been working on pattern lab with twig (Atomic Design Methodology) since last year. I have created many atoms, molecules and organisms and reused them within molecules and organisms. Now I want ...
-2
votes
0answers
16 views

Creating a new submission on the “View” tab is loading older submission

I am using Webform 8.x-5.19. I have been using the View tab on the administrative webform page to start new submissions that users later complete. When I save, I create a node for that particular ...

15 30 50 per page
1
2 3 4 5
1662