All Questions
87,691
questions
0
votes
0
answers
3
views
What is a good replacement/extension of syslog module in AWS Fargate?
I usually disable dblog and enable syslog in production. Now I'm trying to do something similar in AWS Fargate in order to redirect Drupal log to CloudWatch.
syslog is easy to setup on a server, but ...
-1
votes
0
answers
7
views
Main navigation translation reverts to default or doesn't display translations
I administer a multilingual site (en - fr - nl)
I have translated the menu items in the main navigation but the translated menu items only come up sometimes from a page and never on the front page ...
0
votes
1
answer
24
views
How can I import staged configuration?
I'm trying to import configuration with drush cim. I'm getting
Rename operation for simple configuration. Existing configuration system.site and staged configuration domain.config.xxx.system.site.
I ...
-2
votes
0
answers
22
views
Why is the db connection to migrate silently failing?
I'm using D10, drush 12, ddev.
In settings.local.php I have:
$databases['migrate']['default'] = array (
'database' => 'd7',
'username' => 'db',
'password' => 'db',
'host' =>...
-2
votes
0
answers
16
views
Need "last updated" date in RSS feed
I need to output the "Content: Changed" field in an RSS feed so the system can tell whether or not the node has been updated. The Block display shows the date perfectly; the feed outputs ...
0
votes
1
answer
38
views
Block Plugin not Showing on Certain Pages
This issue has been bugging me for some time and maybe this is just how Drupal is or I am missing something. Anyway, the setup is like this:
I have my defined regions on the site. One region is Hero. ...
0
votes
1
answer
36
views
Get Field Weights Programmatically
I have a custom module which ultimately creates a node of a given type. It gets the fields of that node type and creates my own form with them, HOWEVER, it does not preserve that node's order of ...
0
votes
1
answer
19
views
RestUI: The used authentication method is not allowed on this route
The following works on three sites but doesn't work on one. I've restored the site from the backup of another site, and this works, until it doesn't work the next day. I've reinstalled modules.
I make ...
0
votes
1
answer
14
views
Cancel adding an order item at any point
I think I have an quite unusual usecase.
In my commerce installation, there are two possible carts for each user. "buy" and "sell". Each product has two variations, also called &...
-2
votes
0
answers
24
views
I have a problem with a workflow plugin [closed]
I caught this error when I used a workflow plugin.
Error: Class 'Drupal\feeds\Plugin\Derivative\ExtraLinks' not found in include() (line 10 of /usr/www/users/annalind/modules/contrib/feeds_tamper/src/...
-1
votes
1
answer
33
views
Remove unnecessary JS files to optimize Total Blocking Time
I need to improve the performance of a site and check it with Carbon Neutral Website. One of the most difficult thing I find is to remove "Total Blocking Time", the problem is that Drupal ...
0
votes
0
answers
20
views
Is there a method to get a view to provide multiple tags in a CSV export within one column rather than mulitple rows?
I have a D7 site that is being recreated. I need to generate a CSV of particular fields used in its numerous content types.
There are 5 taxonomy reference fields. I have created a relationship for ...
0
votes
0
answers
16
views
Views Menu Tabs: primary and secondary tabs?
I'm moving a site from Drupal 7 to Drupal 9/10.
In Drupal 7, there's a view with multiple page displays, set up like this:
Tab name
Menu setting
Path
All
No menu
events/list
Summer
Default menu tab ...
-3
votes
0
answers
44
views
The theme implementations may not be rendered until all modules are loaded on custom module
I'm attempting to load a custom page where I call an external API to retrieve the response and format it into the .html.twig file. However, I've frequently encountered a 50x server error. Upon ...
0
votes
0
answers
27
views
How to address a phpstan "undefined property" error? [closed]
I am seeing this phpstan error:
Access to an undefined property Drupal\Core\Field\FieldItemInterface::$value.
Here is the relevant code, which appears in the build() method of my custom block:
$...
1
vote
0
answers
30
views
Spam protection for headless webforms
I'm investigating headless Drupal for a new (Drupal 10) site and trying to understand how to protect the webforms from spam. I'm planning to use the Webform REST module to help build/submit the forms.
...
-2
votes
0
answers
17
views
Webform permissions
Is there any possibility to give permissions to a role that can only download or manage the results or submissions to do through webforms and that this option appears in the admin bar of drupal?
...
-2
votes
0
answers
22
views
How can I make HTML markup content read by screen readers? [closed]
How would I be able to make markup e.g. "This form is to provide information please fill in the details below" read out by a screen reader?
Is there a way to make it focusable, or target the ...
-3
votes
2
answers
31
views
database query's columnCount() and getColumnMeta() missing from core
In Drupal 9 I could do:
$result = \Drupal::database()->query($query, $args);
then call
$result->columnCount()
also
$recs->getColumnMeta($c)
In Drupal 10 these functions: columnCount() and ...
-1
votes
1
answer
43
views
Import custom data from another DB to nodes
For create/update new nodes I used the Feeds module.
It works well with CSV/OPML.
But now I need to import a new data from another database, forming result by SQL query.
There are old modules for ...
-1
votes
0
answers
35
views
Drush does not work in local environment when setting up a site with Lando
I am trying to set up a Drupal site on my local using Lando and I am facing issues while using drush, on drush cr I am getting this error:
Uncaught ArgumentCountError: Too few arguments to function ...
-2
votes
0
answers
49
views
Security scan indicates "Missing Cache-Control Header". What solution/module may address this?
In a security scan of our Drupal 10 site, we received this notification:
The server did not return or returned an invalid 'Cache-Control'
header which means page containing sensitive information (...
0
votes
1
answer
24
views
How can I modify the nginx configuration in the Docker image?
I tried to use one of the two themes that came with Drupal - Olivero - and it is working in Maintenance mode, but once I switch maintenance mode off, I have a white page with a long list of menu item ...
-3
votes
0
answers
30
views
Upgrade problem [closed]
I've resolved all dependencies' conflicts and the upgrade process is running, but it crashes on behat/mink-browserkit-driver (v2.2.0) package with [TypeError]: Composer\Util\Filesystem::isAbsolutePath(...
0
votes
0
answers
30
views
How do I use the tempstore service?
I'm storing some values in array and sending to the drupal through Ajax and receiving it through the controller. In the controller i am using the following code to retrieve and trying to store using ...
0
votes
1
answer
71
views
How to disable cache in my custom contextual filter code?
I have created a custom module for authentication by using access_token. The authentication is working fine. So, I thought to create a custom contextual filter and use that as a filter by access token....
-1
votes
0
answers
20
views
Remove column from TB Mega Menu
I have a site menu with this structure on TB MegaMenu:
Level 1
**Level 2a heading**|**Level 2b heading**|**Level 2c heading**
item item item
How can I ...
0
votes
0
answers
37
views
How can I programatically add a paragraph type field to custom block?
Currently, I already built a custom block programmatically, now I want to add a paragraph-type field programmatically to this block but don't know how to do it.
The reason is that I want to add/remove ...
-2
votes
0
answers
18
views
Integrating an External Website/Game into Drupal 9 page or block [closed]
I've encountered a more complex issue; there's a certain plan I need to execute. However, since I'm not very familiar with Drupal, I'm interested in whether what I've come up with could work in Drupal ...
1
vote
0
answers
33
views
How to override PHP attributes in a custom drush command?
I have a custom drush command that is providing table output. Per the docs, since the command will be for Drupal 10+, I'm using PHP attributes. Specifically, there is this attribute:
#[CLI\FieldLabels(...
0
votes
0
answers
7
views
How to set different name for an element in form and in preview webform?
I have generated this element:
addlabel_01:
'#type': textfield
'#title': 'Add label'
'#maxlength': 2
'#size': 160
'#autocomplete': 'off'
and I need to show a different ...
0
votes
0
answers
29
views
Functional test of A11y features
Who has any experience with testing A11y features? I need to test focus and tabulation via keyboard.
How it works now in the browser:
Go via the tab key to link "Show more"
Press enter
Some ...
0
votes
0
answers
37
views
Web folder gets deleted when uploading a large image in CKeditor 5
I'm getting the strangest and most annoying behaviour when trying to upload an image bigger than the php upload_max_filesize setting: it fails, but also completely deletes the web directory (the ...
0
votes
0
answers
18
views
How to add dynamic dependency between two entity reference fields in content creation form?
I want to create a dependency between two Entity Reference (ER) fields, one towards content and the other towards vocabulary terms.
My first content type A has an ER field (A1) to a vocabulary (V1) ...
0
votes
0
answers
9
views
Field view in content type or header custom field
I have a need, it is to create a page with a list of contents but also custom fields in introduction, such as a title, text and an image to display on the page. I am exploring several solutions but I ...
0
votes
0
answers
26
views
Drupal View: show ALL users with node count of a content type
I need to display a list of users with a count of nodes they created of a particular type (say Article) like follows. I could almost achieve that using "Views Aggregation" by the following ...
0
votes
0
answers
28
views
Using a symbolic link under files
In our Drupal installation, I need a file repository that survives deploys and gets some special treatments, so I thought I could use a symbolic link to a NAS mount point below web/sites/default/files....
0
votes
0
answers
21
views
How to create a view that displays published version or latest revision
I need to create a REST Export view which can display 1 revision of each item of content of a particular content type. I need to be able to change which revision is displayed between the current ...
0
votes
1
answer
26
views
How can I change datetime field to date field?
I have a Drupal site successfully migrated from Drupal 6 to Drupal 10. Some date content type fields were changed during migration from date format to datetime format by mistake. Drupal's admin > ...
0
votes
1
answer
40
views
How do I override a core constraint on an entity?
I want to replace one of core's constraints, UserMailUnique, with a custom validator. How can I do that?
0
votes
3
answers
30
views
How do I hide the wizard page title?
Webform Version: 6.2.2
I need to hide the wizard page title, but I can not, how it can be done?
I have:
identify_01:
'#type': wizard_page
'#title': 'Recognise 01'
'#open': true
So I need to ...
-3
votes
1
answer
23
views
How to add a "no index" tag on every page
I need help in adding a "no index" tag on several pages. Please help me with this.
0
votes
0
answers
20
views
Webforms and Groups Modules Interactions
I have webforms and groups modules installed - based on webform documentation my understanding is if I:
Create a webform with an entity relationship field to a content type = blog
Group A has 3 ...
2
votes
0
answers
24
views
How do I set the PHP version for a contrib module with GitLab CI?
I'm trying to set up testing using the GitLab template for contrib modules.
In the module's composer.json, PHP 8.2 is required, and since the CI is currently defaulting to 8.1, the install fails.
So, ...
0
votes
0
answers
52
views
After upgrading D9 to D10, class does not exist error
Having followed the instructions here https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/how-to-upgrade-from-drupal-9-to-drupal-10
I'm seeing
Warning: class_implements(): ...
0
votes
0
answers
14
views
Theme Drupal comment reply page exactly like comment submitted page
I have created a custom content type 'article' where a custom comment field has been added along with other fields like images, taxonomy terms, etc. In the theme file (page.html.twig) for this content ...
0
votes
0
answers
17
views
ECA: Cron Event - View - Message per Mail
ECA: Cron Event - View - Message per Mail
I would like to send a notification by e-mail to a user when a certain event occurs. The event is then a view that outputs a content, this content is ...
0
votes
0
answers
20
views
CKEditor not respecting max image dimensions, alternatives?
Even though maximum image dimensions have been set, my users are still uploading massive images using CKEDITOR. this seems to be a known issue with no stable patch.
What are good alternatives to allow ...
0
votes
0
answers
29
views
How can I set eager loading for a Entity Reference field for Media (Image)?
I see this is done for an image field in the Manage Display options, but can't find this option for Entity Reference fields for Media (Image) with Rendered entity as the format. This affects Largest ...
0
votes
1
answer
73
views
Is there an API to read file content?
Most references seem to read files using PHP functions like file_get_contents(), fgets(), fread(), or readfile().
Is there is any Drupal API that allows to read uploaded files independent of ...