All Questions

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

i have written my own custom filter handler in drupal 10, but expose checkbox only not appearing

i have added a custom views handler filter that extends Filterpluginbase in drupal 10. but i am not getting the checkbox to expose the filter to users in the custom handler. Please can someone help in ...
Anupriya's user avatar
0 votes
0 answers
10 views

How do I access the overridden ALT tag with the Media Library Media Modify module?

The Media Library Media Modify module ( https://www.drupal.org/project/media_library_media_modify ) allows one to override a media item's default ALT tag so you can have contextual ALT tags with every ...
Naidim's user avatar
  • 204
0 votes
0 answers
18 views

Can't save node when fields are altered with entity_bundle_field_info

I have a node called Program, with a large number of fields and a custom node form. Because of the very complex way we're indexing it for search, I have two fields, award_type and award_goal, which ...
tinkerer_and_putterer's user avatar
0 votes
0 answers
31 views

How to programmatically add the exact name of the field in the form?

I have used hook_entity_base_field_info in my custom module to add a field to the user entity: $fields['phone'] = BaseFieldDefinition::create('telephone') ->setName('phone') ->setLabel(t('...
Mahyar SBT's user avatar
1 vote
0 answers
42 views

How to allow users to log in by multiple email addresses?

I'm trying to find a way to allow users to log in by email address when they have multiple email addresses registered on my site. I'm using the Email Registration module to allow users to register ...
Patrick Kenny's user avatar
0 votes
0 answers
23 views

Can you have multiple Webform handlers trigger on sumisstion?

I have a need to run some preprocessing on data using a custom Webform handler before I want the data to be handled by the CiviCRM handler. Is there a reason both handlers won't run one after the ...
Nick Perkins's user avatar
-2 votes
0 answers
15 views

Search API showing results even though it doesnt contain the searched keyword

I have this issues where i searched a "0000" and it will return a content but that contents doesn't containe the search keyword.
chan's user avatar
  • 1
0 votes
0 answers
25 views

Drupal 7.98 still can't run php 8.0 [closed]

I have several drupal sites that have been upgraded to 7.98. But all become unaccessbile when I change the php version of my shared hosting account from 7.4 to 8.0. So I'm thinking there is something ...
polarBEER's user avatar
0 votes
0 answers
9 views

Unable to override unit_price for an order_item

I'm trying to override the unit_price for an order_item based on various selected options when adding to the cart. The product is configured at $0.00. So I do a $order_item->setUnitPrice(new Price(...
konadave's user avatar
-2 votes
0 answers
138 views

I am stuck when trying to add a NID class to the body tag [duplicate]

Core 10.1.6 with Olivero-based sub theme named globalrs. I want to run some CSS code only in a particular node. I tought to use a body CSS class with the Node ID or NID of that node, but my problem is ...
ali's user avatar
  • 11
0 votes
0 answers
33 views

AjaxResponse in build() custom block

I want to add an AjaxResponse in build() custom block public function build() { $build['content'] = $this->getContent('field_header_text'); return $build; } This basic code works and I ...
Joouul's user avatar
  • 1
0 votes
0 answers
20 views

Basic blocks placed in Layout Builder columns put into div elements

Version 10.1.6 with Olivero theme. If I place a block in a region clasically (i.e. without Layout Builder), it isn't put into a div element, but basic blocks placed in Layout Builder columns are put ...
ali's user avatar
  • 11
0 votes
0 answers
38 views

How can I switch from Redis flood control back to Drupal's default flood control?

Related question: Why can't I log in when there is no flood table? I have a Drupal 10 site hosted on PlatformSH that has Redis enabled. I have the Redis module enabled. On a test domain, my test ...
Patrick Kenny's user avatar
0 votes
0 answers
11 views

Custom View Filter for "viewmode" change

I'm implementing View (controller by AJAX) for Commerce project and would like to have the ability to display Commerce Products in two viewmodes in my View. I was thinking about using Contextual ...
Patrick Star's user avatar
0 votes
1 answer
27 views

Unable to resolve "User ID field needs to be updated" error on status page

I'm on Drupal 10.1.6, and the above-mentioned error is appearing on my status page under "Mismatched entity and/or field definitions." I had similar errors for fields on different entities (...
JOakland's user avatar
  • 442
0 votes
0 answers
18 views

How can I set up a webform checkboxes element with ajax callbacks?

I am trying to dynamically put in options an array of keys and values in a Webform Element. I want to be able to change the checkboxes values based on another field's values. I looked at the examples, ...
Guybrush Threepwood's user avatar
0 votes
1 answer
16 views

How to customize webform item formats, for the preview page?

I'm trying to disable all links targeting entities (taxonomy terms for instance) when previewing a webform, just before submitting it. When building webforms, I know it's possible to customize how ...
PAC's user avatar
  • 1
0 votes
0 answers
25 views

Impossible to change admin password, script gives me different hash every time (???)

Context: Drupal 9.14 installed on a small EC2 server for testing After a composer update, my admin password stopped working (first strange event). I decided to use the password-hash.sh to recreate one ...
ZozoIT's user avatar
  • 1
0 votes
1 answer
28 views

Add custom field template for front page only?

Is it possible to use twig template naming conventions to target a field on the front page only? For example, if I want a different version of the header field on my front page I could use field--...
Sam's user avatar
  • 585
0 votes
0 answers
27 views

Computed Twig on Date/ Time with Conditions results in php error

I was referred here from the Webform Issue queue Problem/Motivation Calculating the time difference using the Date/ Time elements with any conditions applied to the Computed Twig element results in ...
spivey76's user avatar
-4 votes
1 answer
101 views

How to make CSS changes without the need to flush all caches after each CSS change?

Core version 10.1.6 with an Olivero based sub-theme with a style.css file. My problem is that CSS changes I make in style.css won't take effect until I flush all caches and this causes me to lose much ...
ali's user avatar
  • 11
0 votes
0 answers
28 views

Dynamic loading of javascript bypassing twig cache

I am trying to figure out the correct way to have a javascript library dynamically loaded with every page load. For example, consider the scenario where I want to let the user toggle whether or not ...
Jablalr's user avatar
1 vote
0 answers
27 views

How to add aria-label attribute to view field link?

I'm hoping to add an aria-label attribute to a link for one of the fields in a view. Is there a way to add an aria-label attribute field or custom attribute field under Rewrite Results --> "...
gerbil_wrangler's user avatar
0 votes
1 answer
35 views

CKEditor returns a value as array

In my Form I have this entry that presents a CKEditor instance $form['notes'] = array( '#input_format' => '1', '#rows' => '5', '#type' => 'text_format', '#base_type' => '...
Cy Jobes's user avatar
0 votes
2 answers
29 views

How can I get the record of the last insert?

Is there a method to be called that will get the ID of the record just inserted? In my module the first thing done is the insert of some data into a table. After that I have other things to do in the ...
Cy Jobes's user avatar
-2 votes
0 answers
20 views

Show progress bar when data is being exported

While trying to get the file export progress $_SESSION['prgy'] is always returned as 100 as the ajax request response in the getProgress() function. Expected result is an increment value while the ...
Shyam3089's user avatar
1 vote
1 answer
25 views

How configure the field permissions of a custom entity?

I'm on D10.x.x and I've created a custom content entity - code below. Those entities are created programmatically after an event, and one is assigned to each one of the site' users. The users with ...
Giuseppe's user avatar
  • 907
2 votes
0 answers
24 views

See which libraries have been loaded, and why?

I'm working on removing the jQuery dependency from my website, and it's proving to be a hassle. Cleaning my own custom modules and themes was easy enough, but now I'm left perusing the contrib modules ...
Menno van den Heuvel's user avatar
0 votes
0 answers
41 views

How to do calculations with aggregated results of a row

I'm using Views Aggregator Plus do aggregate the results of columns. However, I cannot do calculations with the result. This is because the module always does the aggregation last. The aggregation ...
CeeA's user avatar
  • 53
0 votes
0 answers
37 views

Configuration dependes xxx configuration that will not exist after import

I have this scenario that is basically the opposite of "it works on my machine" - mine is the only one where it doesn't work. when running drush cim I get this error: In ...
Jonatas CD's user avatar
0 votes
0 answers
34 views

Alter "Apply coupon"

I am developing an advanced coupon module, two-thirds of it has been completed so far; But to apply coupons for products/variation, considering that commerce does not use the Drupal hooks how can ...
Dr.attar's user avatar
0 votes
0 answers
167 views

How to access Layout Builder blocks in nodes quickly?

Core version 10.1.6. with Olivero theme. My problem is that accessing layout builder blocks, especially in nodes, takes me much time. For example, my homepage has several large "Hero"/"...
ali's user avatar
  • 11
0 votes
1 answer
75 views

How to make #description appear on a field widget?

I have a custom field widget that extends WidgetBase. My formElement method looks like this: public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, ...
JAyenGreen's user avatar
0 votes
0 answers
31 views

Error with Quick Node Clone module - Non-reusable blocks must set an access dependency for access control

I am on Drupal version 10.1.6 and am using the Quick Node Clone module (v1.16). I can clone any nodes/pages and that all works fine. Most of my pages, if not all, are using layout builder where I can ...
Akbar Bakhshi's user avatar
-1 votes
0 answers
32 views

Ckeditor inline images won't be deleted from the file system after the node is deleted

I deleted the node, but I noticed that all the inline images which uploaded from CkEditor are still in the files/inline-images folder. Am I missing something, or won't these images be deleted at all?
lee's user avatar
  • 1
1 vote
0 answers
70 views

How to programatically and totally vanish the sidebar in the homepage?

Core version 10.1.6 with Olivero theme. In the <front> webpage or alternatively in the Homepage content type webpage (the homepage), I wish to just totally vanish the sidebar and let main ...
ali's user avatar
  • 11
1 vote
1 answer
140 views

How can I programmatically trigger a 403 error with a hook implementation?

In a module within a drupal hook I'd like to conditionally trigger a 403 for the user. I could archieve this e. g. by throwing an exception throw new \Symfony\Component\HttpKernel\Exception\...
c1u31355's user avatar
  • 170
1 vote
1 answer
25 views

How to convert context_definitions to PHP attribute syntax?

Drupal 10.2 enables PHP attributes to be used instead of annotations. So I tried to create some PHP attributes for one of my blocks: /** * Provides an 'Ebook Navigation' Block. * * @Block( * id =...
Patrick Kenny's user avatar
0 votes
2 answers
46 views

Twig debugging comments stuck on

I'm working on a Drupal 10 upgrade and have run into a strange problem ... the contextual edit buttons on my site will not hide. They should be hidden until you mouse over a region/block/whatever, but ...
Delford Chaffin's user avatar
0 votes
0 answers
18 views

Drupal wouldn't acknowledge receiving updates, so I tried running the update in GitPod terminal and now Drupal is messed up!

I setup a Drupal 10.0 test site (to do the LinkedIn Learning courses) on a windows machine using some combination of WSL, Composer, XAMPP. I would access it at https://imrodmartin-ddevgitpod-...
MJX's user avatar
  • 1
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
0 answers
10 views

Received Webform email does not show the @ symbol

When we receive webform submissions emails, the email element is not allowing the @ symbol to pull through. The email are displayed with the word at instead of @. Example - steve [at] google.com. ...
K CON's user avatar
  • 1
0 votes
1 answer
26 views

Allow certain user role to add tags

I have added a taxonomy entity reference on a node. I want users of certain roles to only select from the list and not allow them to create a new one. A user role A to select from the list or add a ...
Pradeep Nayak's user avatar
0 votes
0 answers
32 views

no toolbar and layout errors

Hi, I downloaded my first Drupal website using xampp following YouTube videos. I am a complete beginner, with zero coding experience. All my links do not work excluding the "get started" and ...
louis's user avatar
  • 1
0 votes
0 answers
30 views

Why is my custom block name not being generated?

I created a custom block called "Heading, Body, and Link" and the name being suggested for the Twig template in the source code is block--block-content--72dacf39-0242-4eaa-9226-171add6f87d2....
TR0V3R's user avatar
  • 1
0 votes
0 answers
27 views

How can I allow anonymous users to see a webform, but not submit it?

My question title sort of summarizes the issue, I'd like anonymous users to be able to see a webform on a node, but not have access to submit it without logging in. I can't find a straightforward ...
Steve's user avatar
  • 351
-2 votes
1 answer
31 views

Is there a module/way to send an email quarterly to a list of people about all the new content that has been published since the last email?

I need to be able to take all the users who sign up for updates on a webform and on an editable frequency email them the new content (that I choose to send them) that has been published since the last ...
Eluchel's user avatar
  • 325
0 votes
1 answer
81 views

Get the value of a custom entity field

How can I get the value of a custom field added to user profiles? I read and tested everything I found on Google, including the following code. $user = \Drupal\user\Entity\User::load(\Drupal::...
user54375's user avatar
0 votes
0 answers
48 views

How to avoid character encoding exceptions that occur when importing CSV data in to MS SQL server?

When I try to import CSV data into my feed, I get errors like this: Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[IMSSP]: An error occurred translating string for input param 3 to UCS-2: No ...
arnoldbird's user avatar
  • 1,079
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

15 30 50 per page
1
2 3 4 5
1750