All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
15 views

Title field does not show for product

Long time user of Commerce here -- but working with a brand-new Drupal 10 install and just realizing how much I was building on prior work with my old setup. Just created a new Product type, ...
Tiffani Chin's user avatar
0 votes
1 answer
55 views

How to get a deep clone of an entity object

Is there a way of getting a second object for an entity that is a different PHP object (with different PHP objects inside as well)? I tried using https://github.com/myclabs/DeepCopy with a node entity ...
joachim's user avatar
  • 846
0 votes
0 answers
51 views

How add a cache context in a form_alter?

I'm on Drupal 10.2.x. I'm writing a form_alter for a node add/edit form, where I am putting some extra markup data depending on terms of a vocabulary licenses. function my_module_form_alter(&$form,...
Giuseppe's user avatar
  • 971
0 votes
0 answers
10 views

Tax, coupon, and zero payment

I am trying to do a very basic task which I guess should be available out of the box. I have read many other comments that do one and not the other, some are even offering programming with hook ...
user3532287's user avatar
1 vote
0 answers
42 views

How to create third party settings for themes?

How to I properly implement third party settings for a theme, without clearing 3rd party settings from other modules? E.g. my site has a gin.settings.yml with third_party_settings: shortcut: ...
Hudri's user avatar
  • 5,539
0 votes
1 answer
49 views

How to render a link to a page fragment in Twig

I have a Twig template that prints a link with the following code: {{ link(item.title, item.url) }} This code is rendered as an a element with a href attribute similar with the following: https://www....
quilx's user avatar
  • 19
0 votes
2 answers
76 views

How can I alter the element markup in a multi-step form?

I have built a multistep webform using webform version 6.2.2 and Drupal 10 and I want to show a summary element on each step that updates with the information of user input from all previous pages. ...
Jamesbeat's user avatar
0 votes
1 answer
98 views

Is there a way to remove cache tags from a render array

When I turn on cache debugging, I see a lot of cache tags for render arrays that don’t make sense. I don’t see an obvious way to remove these cache tags. For example, they don’t seem to appear in the $...
miwayha's user avatar
  • 31
0 votes
0 answers
44 views

What are all the steps needed to migrate from Video Embed WYSIWYG to Core Media (images/video fields too)?

As the title suggests, I'm in the process of upgrading from Drupal 9 to 10 and would like to finally migrate over to Core Media, as opposed to just using inline video/images/files as we have for the ...
ACanadianCoder's user avatar
0 votes
1 answer
56 views

Access field formatter settings in a field type plugin

How can I get the field formatter settings inside a field plugin? The field plugin extends FieldItemBase and the corresponding field formatter plugin extends FormatterBase. If there is no direct way, ...
Mike's user avatar
  • 1
0 votes
0 answers
26 views

Get display mode of product or product variation where an 'add to cart form' is used in hook_form_alter for the add_to_card_form

I'm using Drupal 10 and the commerce module. I'm using a product display mode 'card' that uses the variations 'add to cart form' format. In hook_form_alter I am hiding the quantity field: function ...
Mike's user avatar
  • 1
0 votes
1 answer
28 views

Erroneous .tar.gz created by drush archive:dump. The archive cannot be restored with drush archive:restore

I use Debian 11, PHP 8.1.28, drupal/core-recommended:10.2.6 and drush/drush:12.5.2. When I run drush archive:dump no error is reported. But when I want to restore the archive with drush archive:...
quilx's user avatar
  • 19
2 votes
2 answers
175 views

How do I enable a PHP extension on GitLab CI?

I'm trying to use Drupal.org's GitLab CI to test a module that has a dependency on a package that requires PHP's ext-sodium to be installed: No composer.lock file present. Updating dependencies to ...
Patrick Kenny's user avatar
0 votes
2 answers
64 views

Can you set default configuration settings for a contrib on install?

I am looking to set default configuration settings for a contributed module, Nodeaccess, on install. I know that you can do that on site spin-up but this module will not be enabled by default. I tried ...
Chad's user avatar
  • 1
-3 votes
2 answers
42 views

Can't seem to find a way to have & in a term description show up as &

In a site on D9. I have a vocabulary that has titles as the term descriptions. One of the term descriptions is This & That No matter what I try, the & is converted to & in CKeditor4. This ...
JAyenGreen's user avatar
0 votes
0 answers
14 views

Drupal multistage webform ECK entity reference token

I have a multi-stage webform where a user will select courses they wish to enrol a user too and on the last page it will confirm the products. This is being done as a checkbox populated by an entity ...
Alex Noble's user avatar
0 votes
1 answer
25 views

Getting menu linkset items

I am using Drupal 10.2.6 and I am trying to get menu items via /jsonapi/system/menu/main/linkset, /jsonapi/system/menu/menu/main/linkset, and /jsonapi/menu/main/linkset, but I always get a 404 error. ...
D3rick's user avatar
  • 3
0 votes
0 answers
48 views

Free/loose mode content translation with paragraphs

The content_translation module available since Drupal 8 allows me to translate content pages (entities/nodes) in a very strict mode: Each paragraph on the source language page has a translated ...
cweiske's user avatar
  • 154
-2 votes
0 answers
28 views

Appointment scheduler with webform with setting to select/enter email

Following the scenario for appointment tool In first step there is a calendar where user select the date. In second step user selects the time for the date selected. Remaining steps are contact form ...
Sharique's user avatar
  • 207
0 votes
0 answers
24 views

How to get cloudflare streaming video URL?

I have install and configured https://www.drupal.org/project/cloudflare_stream module in Drupal 10. I have used "Field type" as "Cloudflare Video" for upload file field. I haven't ...
Ramalingam Perumal's user avatar
-2 votes
0 answers
27 views

Undefined array key 1 in Drupal\quiz\Controller\QuizQuestionController

Hello and thank you for helping me! I'm new to Drupal, working on someone else's site. Background: The site was successfully migrated from Drupal 7 to 9.5.9. Quiz 6.0.0-alpha7 is installed. ...
Angel Leigh McCoy's user avatar
-1 votes
1 answer
36 views

I can't set a page as unpublished

I already have page in drupal have status published and when I change status to draft still page not change status to draft it's seen published How can I solve this problem?
Ahmed Essam's user avatar
0 votes
0 answers
15 views

How to keep preview page active but not displayed in the progress line

In my form settings (/admin/structure/webform/manage/testing/settings/form) I have: Form preview settings > Enable preview page > Optional to be able to display the preview page, which I can ...
Andrés Chandía's user avatar
0 votes
1 answer
37 views

How to automatically create account after an order have been placed

I am looking to set up an e-commerce site on Drupal 10 (Commerce 2). Here is the goal: A user should not be able to create an account without having placed an order. Therefore, on the account settings ...
Alexdezark's user avatar
0 votes
1 answer
25 views

Passing data to a field formatter via views with referenced fields?

In creating a 'traffic light' field formatter, how to access views data stored in an entity 2 levels up? The traffic light is 'green' if speed is 'good'. There is a radar entity which has the location ...
Interlated's user avatar
  • 1,423
1 vote
1 answer
71 views

How do I specify php.ini settings (or a complete file) for Drush?

Before continuing, let me explain that I've tried the methods I've been able to find in documentation. Drush 12.5.2.0 is installed in the project by composer. I've tried adding export DRUSH_INI='/...
WRD's user avatar
  • 319
0 votes
0 answers
34 views

CKEditor5 pages not saving when attempting to use a relative link to file in body

I'm not sure where to look to troubleshoot this - any advice appreciated. Drupal 10 w/CKEditor5 as the text editor for the body field on basic pages. Absolute links linked within the body field save ...
NewtoThis's user avatar
0 votes
0 answers
41 views

File upload becomes empty after form submit for anonymous users

I've build a form in Drupal 9 with Form API. When logged in as admin, all is working fine. Selecting a file as anonymous works, and the validations are checked. But when I submit the form, the ...
user3086053's user avatar
0 votes
0 answers
8 views

Correct price not reflected based on product variation when markeplace page loaded

I am stucked with this issue that correct price is not loaded based on product variation setup in drupal 9.5. Here is my product variation. And here is my marketplace product price and variation ...
Lal Kumar Rai's user avatar
1 vote
0 answers
32 views

JavaScript ES6 modules import from CDN library

I have a custom JavaScript file in my theme which handles some logic for external iframe (not exactly iframe tag but a custom element) loading. Normally, I would declare the CDN or JS file in theme....
Imran Aslam's user avatar
1 vote
2 answers
101 views

PHP constructor property promotion: how to call the parent constructor?

So I have a Controller that I am trying to rewrite to use PHP constructor property promotion: class MyUserController extends UserController { /** * Constructs MyUserController. * * @param \...
Patrick Kenny's user avatar
0 votes
0 answers
17 views

How to automatically add a class to paragraph elements in ckeditor5?

When a paragraph is added to the wysiwyg, I want ckeditor to automatically add a class to it (dynamically in the wysiwyg), such that if I click "source" after the wysiwyg adds a new ...
John's user avatar
  • 293
0 votes
0 answers
19 views

How to add taxonomy and menu to content Mirgation using migrate, migrate_tools, migrate_plus and migrate_source_html?

I am new to Drupal and Would really appreciate the help I am importing html pages using migrate, migrate_tools, migrate_plus and migrate_source_html it is working but I would like to also populate the ...
user avatar
3 votes
1 answer
75 views

How can I add a template suggestion for a field formatter based on the current view mode?

In my Drupal 10 theme how I can get Entity View Mode? I use this to rewrite suggestions /** * Implements hook_theme_suggestions_HOOK_alter(). */ function ...
Aleksandr's user avatar
0 votes
0 answers
26 views

How do I add a class to HTML tags in CKEditor 5?

In Drupal 7, I could add classes for <img> and <div> tags in CKEditor 4. I can’t find a comparable feature in CKEditor 5. How can I add classes to these tags using CKEditor 5?
Mehrdad201's user avatar
  • 1,312
0 votes
0 answers
31 views

How can I theme the blocks different with the same classes?

I have several blocks here that I would like to design differently, one contains text and the other a picture. Unfortunately, the css classes are the same and I can't use the ID because it is always ...
Bavramor's user avatar
0 votes
2 answers
61 views

Programatically check user access to content type edit/create

Is there a way in Drupal 10 to programmatically check to see if the current logged in user can access the edit/create/view for each content type.
Richard's user avatar
  • 113
1 vote
0 answers
24 views

Displaying Next Element as View Block based on Order ID Field

I have content type in Drupal 10 called "Tutorials". This content type has an integer field named "Order ID" to sort the entries ascending in a normal view. In the node template ...
meder's user avatar
  • 11
0 votes
0 answers
28 views

Override image.html.twig

How to override image.html.twig? I'm trying this: /** * Implements hook_theme_suggestions_HOOK_alter(). */ function MYTHEME_theme_suggestions_image_alter(array &$suggestions, array $...
Aleksandr's user avatar
-1 votes
0 answers
19 views

"Select all/Apply all" option in Facet item for checkbox widget

I am using "Facet-Version: 2.0.7" and "Search API : 8.x-1.34" modules to display the site data using Ajax Filtering in my site. Now I need the functionality "select all/Apply ...
tc karthick's user avatar
0 votes
0 answers
22 views

A little question about Webform Views Integration

Have set up the Webform module with Webform Views Integration. Created an additional view for webform submissions via cloning and alteration of 'Embed:Default', applied there a function from Views ...
Dre's user avatar
  • 1
0 votes
2 answers
44 views

Webform mail formatting broken after moving to symfony-mailer-lite from swiftmailer

In march 2024 we left swiftmailer and switched to symfony-mailer-lite. Everything looked well until we found that the font for mails which had no template specified in our theme had a default font ...
macbert's user avatar
  • 363
0 votes
1 answer
20 views

Uninstalling Commerce Authorize.net: How to Remove Content?

I'm trying to uninstall the Commerce Authorize.net module. I've deleted the payment gateways I was using. When I try to uninstall the module using the web interface I get this error: The following ...
Scott Hollenbeck's user avatar
1 vote
0 answers
29 views

Add machine-name as css class to my blocks

So I would like to give my blocks the internal machine name of the block as a CSS class? I can add the block ID and the block type as presprocess via theme.theme: function xxx_theme_preprocess_block(&...
Bavramor's user avatar
0 votes
0 answers
57 views

Styling a "programmatically created block" in drupal 10

I'm new to Drupal dev, I'm messing around creating some custom modules and explore how the env of drupal 10 works... I've created a custom block that i called "Copyright": <?php declare(...
tsukingo's user avatar
0 votes
0 answers
18 views

D10 Webform not sending emails - Email sending skipped: Send aborted by hook_mail()

I would like to send webform notification upon saving a webform, but getting "Email sending skipped: Send aborted by hook_mail().." I tried search, but no luck anywhere.. Drupal 10.2, ...
Zdeněk Nováček's user avatar
1 vote
0 answers
74 views

No-charge Drupal alternatives to Acquia's Site Studio [closed]

This is a general one. I would like to know better the spectrum of choices for Acquia Site Studio alternative in 2024. The most important features from my perspective are: ability to create many ...
Adamssef's user avatar
0 votes
0 answers
47 views

Crontab job for specific cron activity

I'm trying to setup the Job Scheduler so that specific actions can be checked against cron every minute to allow for publishing content on a scheduled basis. I'm working on part of an Acquia Cloud ...
Andrew Morris's user avatar
1 vote
1 answer
41 views

How to modify a paragraph behavior setting programmatically?

I would like to alter/change a certain paragraph behavior plugin setting. If I debug the paragraph entity, I can find the behavior_settings value, but it's json encoded and I don't think the best ...
Alejandro's user avatar
0 votes
0 answers
43 views

Edit existing custom blocks in layout builder

I have an issue with layout builder and existing custom blocks. When I insert existing custom block from custom block library (either create block inline in layout builder, clone it and then try to ...
Ivan Ilic's user avatar

15 30 50 per page