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, ...