Newest Questions
88,154 questions
0
votes
0
answers
6
views
Max message length of unique element of webform
The max message length for element marked as unique is 128. How to increase it? Note that the default message length is 155.
0
votes
1
answer
15
views
How do I get a list of deprecations when running phpunit tests?
When running phpunit tests, it will often output a list of deprecation notices; example:
Remaining self deprecation notices (3)
3x: Renderer::renderPlain() is deprecated in drupal:10.3.0 and is ...
0
votes
0
answers
20
views
Drush Ignoring STDIN? [closed]
Drush 13.6.0 seems to ignore STDIN
echo n | drush cim --diff > cim.diff
I've used this combination in the past with the expected results - drush would not perform a config import after redirecting ...
-2
votes
1
answer
33
views
How do I create an exposed sort using values not stored in the database?
I have to create an exposed sort in views related to group where values are not stored in database.I have calculated the custom time duration for each group.This value is not stored in database as it ...
0
votes
1
answer
37
views
Set default values of number fields in custom webform element
My custom webform element, which extends Number, should get some default values for the number fields:
protected function defineDefaultProperties() {
// Here you define your webform element's default ...
0
votes
2
answers
96
views
How can I disallow blocks and views from being cached by render cache?
I have read a couple of similar questions and tried various methods in these tickets to disable any caching for this particular page of the site in Drupal 10 to no avail. These included invalidating ...
-4
votes
0
answers
26
views
Issues with SimpleSAMLphp authentication: account linking and URL cleanup
I'm working on a Drupal 9.5.11 site and using SimpleSAMLphp (version 2.0) along with the simplesamlphp_auth module for SAML-based authentication.
I'm facing the following issues:
Account linking ...
0
votes
2
answers
31
views
How to define Trusted Host pattern in settings.php via Docker environment variable
I'm trying to add the Trusted Host in settings.php via the Docker environement variables and it doesn't work, When I tried to hardcode the value in 'trusted_host_patterns' it works fine.
Drupal ...
0
votes
1
answer
22
views
No .htaccess file for not fully protected private files directory
I have tried relying on Drupal to set the .htaccess, but that is not working, nor are any of the examples that I've come across.
Both the private files directory and the .htaccess file are owned by ...
0
votes
0
answers
13
views
Autcomplete fields breaking on failed form validation in Ajax Dialog Modal
I have a D10 site, which uses an ajax dialog box to open a modal window, which includes a node/add form. I should also add this is a non-standard form display mode.
I have a bit of markup where I add ...
0
votes
0
answers
15
views
hook_entity_type_alter is throwing an error with phpunit
I'm trying to make some unit test in my drupal 10 website.
Here's my base test :
class MyServiceTest extends KernelTestBase {
protected static $modules = [
'base_module',
'secondary_module',...
0
votes
0
answers
20
views
Drupal re-compiling twig files on frequent intervals causing endless number of compiled twigs under php/twig folder
I am facing a problem where Drupal is re-compiling twigs on frequent intervals (~4.5s average).
While debugging I found Drupal state CACHE_PREFIX_METADATA_KEY is getting NULL which is triggering the ...
1
vote
1
answer
26
views
How to debug Drupal when not generating image styles for one specific style
I have this very strange bug on my Drupal 10 website. Images of one specific image style are not generated. It is the default large image style at this moment.
Other image styles are generated with ...
0
votes
0
answers
22
views
"Update existing 'node' entity while changing the ID is not supported" when re-migrating
There's a conflict I don't understand when re-doing a migration with updated data. Here's what I've done:
Migrated D7 to a fresh install of D10, using Migrate Plus.
Added content in D10.
Added and ...
0
votes
2
answers
43
views
How can I show user chosen selected options in Views Header Results?
Using Drupal 10. I have created a page view that shows teaser content (using layout builder) of a given content type, and have an exposed form that gives the anonymous user/ website visitor options to ...
-2
votes
1
answer
90
views
How to install Drupal CMS using Composer?
Can composer be used to fetch the code for Drupal CMS, like for Drupal 10, 11?
For example, Using Composer to Install Drupal and Manage Dependencies provides this for Drupal core:
composer create-...
0
votes
0
answers
14
views
Bulk action on results tab not working
new to drupal webforms, I inherited a form and everything worked as expected. I copied the form, and now some of the auto-responder emails are not working. Specifically, there is an action on the ...
0
votes
1
answer
88
views
Ajax event not added once the form is rebuild
I have a product addition form in Drupal 10 that uses AJAX. When I click "Add to Cart," my function correctly adds the product to the cart via AJAX. After the addition, my AJAX function ...
1
vote
1
answer
71
views
Why can't my kernel test find my module in sites/default/modules/custom?
TL;DR: I'm trying to write a kernel test for a module located on sites/default/modules/custom/example_module, but Drupal fails to find the module to install it in the test.
I have a Drupal 11 multi-...
-1
votes
0
answers
43
views
How to leverage the Migrate module to export to json
I need to migrate D10 content to JSON. An obvious response might be why not use Drupal core JSONAPI? Although that does create a JSON output, I don't see much control over the structure of the ...
0
votes
1
answer
76
views
Error when trying to upgrade from D10 to D11 with Composer
Working on a local Windows environment, with Composer 2.8.8 and PHP 8.4.6.
I'm trying to upgrade a Drupal site from 10.4.6 to 11.1.0 (or higher).
The site was initally running Drupal 10.1.4 and I've ...
0
votes
0
answers
32
views
Access denied on checkout for programmatic anonymous order with shipping
I created a custom Form to populate a commerce order programmatically, with an anonymous checkout flow and shipping enabled. The code in the Form's submitForm() method is as follows (it is a base-...
-1
votes
0
answers
77
views
I cannot upgrade to 10.4.6 with Composer, on a Debian server
I have installed my Drupal website on Localhost; the upgrade got smoothly. On a Debian server, the backend of the website still says that a core update of my website is not finished.
When I run on ...
0
votes
1
answer
32
views
Prevent image cropping on desktop, only apply responsively
We are currently maintaining a website that was built with Drupal 7. On the homepage, there is a slider displaying images with a resolution of 1920 x 1080 pixels.
Our client recently contacted us ...
0
votes
0
answers
20
views
Get displayed fields only and in display order
I can grab my view results in hook_views_post_render, however, the final view is just a single row which is presented as a single page (representation of a printed page) and there's no obvious ...
0
votes
1
answer
33
views
How to group webform elements (only) visually
In my webforms, I would like to (visually) group certain elements for my visitors:
I've successfully managed to build this using container elements (sections) in the Drupal webform backend ui.
...
0
votes
0
answers
36
views
OpenLiteSpeed/CyberPanel Incorrectly Gzipping a single aggregated CSS file
I'm seeking help with a persistent issue regarding Drupal 11 CSS aggregation on my server setup. I hope someone might have encountered this or have some ideas.
My environment is the following.
Drupal ...
1
vote
1
answer
67
views
PHP Parse error when running PHPStan during GitLab CI
I'm working on implementing GitLab CI using Drupal's GitLab Templates with my custom modules. I've got everything else passing except PHPStan which fails with the error:
PHP Parse error: syntax error,...
-1
votes
1
answer
21
views
How can I programmatically create a new workflow state?
I've got a workflow and I am trying to programmatically add a workflow state to it.
No searching has turned up a workable example. I've tried 3 AI bots to exhaust that option as well and they all ...
0
votes
2
answers
69
views
Warning: Array to string conversion in __TwigTemplate
I've set up a 'content card' paragraph type which can be used to create blocks of content in a grid structure. Each card can have multiple taxonomy categories associated with it, eg: Video, quote, ...
-1
votes
1
answer
39
views
File upload always fails
I'm trying to create a module, with a form, that takes a CSV and exports an ICS. I'm running into an issue with file upload. No matter what I try, I am getting the error message that indicates that ...
0
votes
0
answers
14
views
Performance Tests: Gander setup not displaying data
I have followed the drupal.org performance test step-by-step to the "T." However grafana never displays performance data no matter how many times I run the test. Anyone have similar issues? ...
0
votes
0
answers
16
views
Commerce Stripe: Payment fails when adding more than 1 unit of the same product to the cart
I'm using Commerce Stripe 8.x-1.2.
During the checkout process when I'm adding more units of the same product, in other words a quantity of the same product that is higher than one, I get an error ...
1
vote
2
answers
55
views
How to list image styles with drush
How can I use drush to list all the image styles?
I have found the Image Styles Drush! module however that seems like overkill for just listing the style names.
0
votes
1
answer
23
views
How to override Total display on order page to ignore a specific adjustment? [closed]
Commerce.
On the order page /admin/commerce/orders/18018 I see the following block:
Subtotal $60.00
Shipping $0.00
Virtual Funds -$60.00
Total $0.00
I need the Total on this page to be displayed ...
0
votes
0
answers
8
views
Profile reuse and ownership: Comparing billing profiles in Drupal 7 and 10 Commerce
Commerce and Profiles.
If I understand correctly, in Drupal 10 in Orders, profiles with a profile type of “Billing information” belong to an anonymous user, because if they belonged to the user who ...
0
votes
1
answer
29
views
How to display 'most popular' search keywords as a default (prior to user typing) within Drupal's search_api_autocomplete module?
Our Drupal v10 site is using the search_api_autocomplete module to display suggested search keywords as the user types.
But the client would like to display a curated, custom list of the 'most popular'...
0
votes
0
answers
17
views
Change File field content on custom validator error (programaticaly)
On a Drupal 11 we have a content type that is filled step by step by several users (a kind of workflow).
This content has a custom #validate function.
At the content creation a user sets some ...
0
votes
0
answers
25
views
Why adding a new policy in Drupal Symfony Mailer impossible?
I installed Drupal Symfony Mailer (version 1.5.0) and I try to convert one of my custom modules (amap) to use DSM to send emails.
I created 3 EmailBuilder plugins:
ForStupidsEmailBuilder
@...
0
votes
0
answers
11
views
Solr Search API - "Configure the selected backend" & "Please configure the selected Solr connector" despite full configuration
This may sound like a silly question, but I'm serious. I am trying to configure the Solr Search API, but I am stuck with the following warnings:
Warning message
"Configure the selected backend.&...
-1
votes
2
answers
87
views
PHP error when using hook_theme
Running Drupal 11.1.5 with PHP8.3.
I'm trying to add a page in a custom module that utilises a Twig template. I've followed this tutorial https://www.drupal.org/docs/develop/theming-drupal/twig-in-...
0
votes
0
answers
20
views
Use ECA and BPMN.IO for sending email
I'm following a tutorial to learn how to use ECA, I would like to include it in my site (D10) to replace the rules module which apparently does almost nothing compared to d7.
When I have to insert the ...
0
votes
2
answers
22
views
How to prevent creation of new commerce products in a migration intended only to update a specific field?
Many months ago, I wrote a migration for Commerce products from Drupal 7 to Drupal 10 and successfully migrated those products. However, now I need to migrate the GUIDs from the feeds_item table in ...
0
votes
1
answer
88
views
AJAX Callback Rendering Problem in Drupal 10 Form
I'm encountering an issue in my Drupal 10.3.4 web application. I'm implementing a form with multiple tabs where, upon selecting a value in the 'kl doc folder' field (a custom field), I need to ...
1
vote
0
answers
37
views
Media embed filter creates iframe wrapper for Vimeo videos but not YouTube
I need to use CKEditor 5 in developer mode to insert media embeds, and I am running into an issue with YouTube. This is an example of the code I am using.
<figure class="media">
<...
0
votes
2
answers
70
views
Outputting text field in a view to show all HTML tags
Content has been added to my site using various input formats, but none of those has the "display any HTML as plain text" filter selected. So in other words text is formatted with things ...
0
votes
1
answer
35
views
Storybook always shows an error
I have installed the Storybook module, which converts .stories.twig files into .stories.json files.
I have the following lines added to the package.json file.
"@storybook/addon-a11y": "^...
0
votes
0
answers
43
views
Can't get date value in hook_form_alter
I'm trying to write a hook_form_alter for form validation. My form has a datetime field that is holding a date range.
The field is field_session_datetime.
I cannot get the value from the form via $...
0
votes
1
answer
39
views
Why core and contrib modules and installed only in vendor?
I've a Drupal 8 installation, I don't understand why core and contrib files are download, with composer install, in vendor directory.
EDIT: with this file, after clone the repository, core and contrib ...
-3
votes
1
answer
84
views
Language detection duplicated aliases into a new set of language-directory aliases
My problem is that after activating language detection with all options enabled, thousands of new language-directory-aliases (/en/alias or /ar/alias etc.) have been detected in my website by Google ...