Skip to main content

Questions tagged [10]

Version tags should be used for questions that apply to a version only, not to merely say what version a site is using.

Filter by
Sorted by
Tagged with
-2 votes
3 answers
49 views

How to prevent user delete for certain condition? [closed]

We have a custom subscription system which is linked to user. Some time, many spam accounts are registered and we delete them. We do not want to delete a subscriber account, since that causes issues ...
Md. Shafiq Hossain's user avatar
0 votes
0 answers
38 views

Images and thumbnails are not displayed; only the preloaded data is shown

I'm having an issue with Drupal 10 where the images and thumbnails are not displaying correctly. When I upload images, only the preload data is visible, as shown in the attached screenshots. When I ...
Felipe de Jesús's user avatar
-1 votes
0 answers
28 views

How to Pass Node field value to Media field?

I am having a same field named as field_channel which is a Taxonomy Term Entity Reference Field in both Node and Media Entity. The Media Entity is also a reference field in Node entity. I would like ...
miststudent2011's user avatar
1 vote
0 answers
13 views

How to expose a custom field type's values in JSON:API & Openapi?

In a custom module, I extended Core's Entity Reference field type in order to allow for a custom link text. /** * Plugin implementation of the 'Labelled Entity Reference' field type. * * @FieldType(...
Paul's user avatar
  • 1,213
-1 votes
1 answer
37 views

Mirroring language/subdirectory [closed]

Our Drupal 10 site has several language/region versions, with translatable content displayed as: www.example.com/en-us/products/example www.example.com/en-au/products/example www.example.com/en-us/...
Sam Ellard's user avatar
0 votes
0 answers
31 views

Webform Composite Element Loses Required Asterisk After Add Item

My webform contains the following elements: A group_nomination radio element. A first_name text_field element A composite element with a first_name text field. All elements are required. The ...
esod's user avatar
  • 319
0 votes
0 answers
29 views

Views relationship from JSON source to User table

I am trying to create a view that joins user information from an external JSON source. At current I am investigating how to setup the entire view source myself, but I'm also investigating the views ...
Andrew Morris's user avatar
0 votes
0 answers
39 views

How to conditionally hide a media field using form states api [closed]

I'm creating some additional functionality for a module and as a part of that I'd like to use the form state API to conditionally show and hide some media field elements. I've been able to toggle the ...
miststudent2011's user avatar
0 votes
1 answer
38 views

Ajax Form with 3 successive selects

I am looking to create a form consisting of 3 "select" elements present from the page load, where only the first one has options at this stage. These selects are populated by a taxonomy of ...
Alexdezark's user avatar
-2 votes
0 answers
31 views

How to print the name of the content type of the node just before the node heading? [duplicate]

I would like to print the name of the content type of the node just before the node H1 heading. I find it good in case the node is part of a very particular series of articles contextwise. <h2>...
user114794's user avatar
0 votes
2 answers
49 views

Duplicate nodes in batch

I'm trying to write a module to duplicate a series of nodes and to make sure there is no timeout I want to use the Batch Api for this. This is what I have at this moment in src/Controller/...
Joost's user avatar
  • 1,348
0 votes
0 answers
16 views

Clear smart_date time input values after validation error

I have a smart_date field. During creation of a content with the smart_date field, when an error occurs on the time/date such as incorrect format, etc.. I want the values to be cleared. Here is what I ...
Gabriel Fernandez's user avatar
0 votes
0 answers
11 views

Calendar view can't find multiple field settings

I have create a D10 (now in 10.2.6) site for booking PC in a internet cafè, I use calendar view module in 2.1 version. when i insert the view of booking calendar there show me one calendar for every ...
Diego's user avatar
  • 1
0 votes
0 answers
14 views

Combine filter with character limit in autocomplete result

Drupal version: 10.2.4 using contrib module "Views Autocomplete Filter" version: 2.0.2 I have a content type: Articles Fields it contain: Title, Body & Image I have created views for ...
JaSiMi's user avatar
  • 63
0 votes
1 answer
38 views

Read-only Permissions page

Is there a way to set the permissions page read-only? I want to prevent certain roles from making any changes to the permissions but still able to view the permissions page. Alternatively, if that is ...
Chad's user avatar
  • 3
0 votes
1 answer
30 views

Where to override pager settings for specific displays?

I have a view on Drupal 10 that has several "block" displays, and one "attachment" display. If I change one of the block pager settings, those settings are also applied to other ...
Clemorphy's user avatar
  • 103
1 vote
0 answers
35 views

How can I GET all the webform submissions via REST?

I am able to retrieve individual records but not all. How can I GET all the webform submissions in POSTMAN?
Mihail Novak's user avatar
-1 votes
1 answer
45 views

How to duplicate the Node entity?

I want to create a word comparison dictionary. Maybe an HTML table like the following isn't good because there are too many columns for a screen responsive table. English Chinese Japanese Korean ...
user114794's user avatar
0 votes
1 answer
27 views

What is the token for the title of a node referenced by an entity select field?

I have a webform with an Entity Select field whose machine name is topic, which references nodes. I want to to display the title of the referenced node in a confirmation email, using a token. The ...
arnoldbird's user avatar
  • 1,237
-1 votes
1 answer
34 views

CSV Download not working within Views Bulk Operation's Action extension function

I am not getting any errors in the logs, and the CSV doesn't seem to download. I am trying to get the selected data from Views Bulk Operations into a csv that downloads upon the associated selected ...
Guybrush Threepwood's user avatar
1 vote
0 answers
22 views

How to add menu to a region when viewing a node revision?

We have a layout with the menu in a left 'sidebar' region. The menu opens to the correct parent item when browsing a node as it should. When browsing the latest (or any) revision of the node, the menu ...
Christian's user avatar
  • 792
0 votes
0 answers
20 views

How can I edit the ckeditor WYSIWYG container by adding classes?

I'm trying to add some css classes to the main ckeditor WYSYWIG container to get it to appear like the textarea element that it's hiding but I can't seem to figure out where i can apply the classes. ...
blu's user avatar
  • 448
0 votes
0 answers
14 views

Can I set a default image for an image field in a webforms form?

Is there a way to set a default image file to an webforms image file field type so that the image shows up instead of a link to it for authenticated users? I know there is a way to have the image show ...
Guybrush Threepwood's user avatar
0 votes
2 answers
91 views

Why isn't my eventsubscriber firing when a user logs out?

I working on the advanced_pwa module. My use case is that I want to tell the client side service worker to flush it's cache when a user logs out. I concluded that creating a event subscriber would be ...
gMaximus's user avatar
0 votes
1 answer
27 views

Cannot find file input

Im new here and currently building my first Drupal website. Im having trouble creating a webform because i cant find the file input option to include in the form. When i googled it, i found that the ...
drupalnewbie99's user avatar
0 votes
0 answers
29 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
33 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
27 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
0 votes
0 answers
37 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
1 vote
0 answers
40 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
0 votes
0 answers
21 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
  • 292
0 votes
2 answers
66 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
0 votes
0 answers
31 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
0 votes
0 answers
91 views

How to implement a taxonomy/entity reference Search API Processor?

I have two fields (field_contributing_author, field_attorneys more details on the code block below, they are commented there) that I'm interested, one is a taxonomy and the other an entity reference. ...
Alimba's user avatar
  • 117
1 vote
0 answers
46 views

How can I deny all URLs that end with .php? [closed]

I have the following .htaccess lines that only allows to visit index.php and disallows access to install.php, update.php and all other PHP files. <IfModule mod_rewrite.c> RewriteEngine on ...
Libor Plíšek's user avatar
1 vote
1 answer
82 views

How can I programmatically set a custom homepage without showing the pages alias?

I have a system where a user can add a custom domain, for example *domain.com, in a text field. For example in node 10. This custom domain should, when entered in the browser, end up in showing the ...
Joost's user avatar
  • 1,348
1 vote
1 answer
45 views

Set admin theme by user

Is it possible to set a different admin theme by user ? I found this old module https://www.drupal.org/project/tbr it's probably possible to convert it to fit the new Drupal 8/10 system (https://www....
Etienne's user avatar
  • 335
0 votes
1 answer
74 views

I want to insert processing before the FormAPI Core validation

I would like to interleave the processing before the Core validation of the FormAPI. As for the processing flow of FormAPI, buildForm() -> [submit] -> Core Validation-> validateForm() -> ...
Skyyade's user avatar
  • 23
0 votes
1 answer
29 views

Libraries override jquery_ui_accordion

How can i override jquery_ui_accordion? I can't figure out how. libraries-override: # Does not work? jquery_ui_accordion/accordion: css: component: assets/vendor/...
mgoubert's user avatar
  • 377
0 votes
0 answers
18 views

Bibcite references from migration shows HTML tags in abstracts and notes, how to strip them?

After a migration using the bibcite_migrate module, I retrieved my 2700+ references from a D7 site and the Bibliography module. Unfortunately, HTML tags are visible on all abstracts and notes and they ...
Toki's user avatar
  • 424
0 votes
1 answer
50 views

Can't pass variables from a controller to the template if I use base hook to override the theme template

I've created a custom route that uses a controller to use a custom template. If I don't mess with base hook my template is rendered somewhere inside page.html.twig as a block and all the variables are ...
Andrei's user avatar
  • 15
0 votes
0 answers
44 views

What is the valid value for Webform element type in form-element.html.twig?

I'm currently attempting to rewrite the form-element.html.twig to incorporate custom CSS based on the label display and field type for Webform element output. While I've successfully identified ...
CocoSkin's user avatar
  • 891
0 votes
0 answers
33 views

How do I display the total number of items in a view?

I have a website that works with Drupal 10.2.5 I have 200 articles published. I created a views block with the last 5 articles. I therefore limit the number of elements to 5. I want to display in the ...
marsouin's user avatar
2 votes
1 answer
140 views

How can I modify CKEditor 5's CSS variables?

Although Drupal is designed to be styled using css files and configuration in the *.libraries.yml files, the CKEditor 5 module defines some styles in a Java Script file which: Is included at the end ...
Tom's user avatar
  • 247
0 votes
0 answers
39 views

Can't make my custom dynamic route use custom controller and twig template if I use pathauto aliases

I'm trying to decouple drupal and get data via api calls so that I can use the same data across several drupal installs on different domains. So far I'm testing on the same domain but still can't ...
Andrei's user avatar
  • 15
0 votes
0 answers
53 views

How to update Open Social to 12.3.2 and core to 10.2.x?

I am stuck on how to update Drupal to 10.2.x and Open Social (goalgorilla/open_social) to the latest compatible version (12.3.2 or 12.2.4) using composer. I've looked at the open social docs on how to ...
Jono's user avatar
  • 125
0 votes
1 answer
34 views

Column not found: 1054 Unknown column after creating new field

Background I attempted to add a new field "Audience" which is an entity reference field referencing an "Audience" taxonomy. After creating this, I attempted to edit it to allow the ...
GeorgeCiesinski's user avatar
0 votes
0 answers
46 views

Use the Node Export module to export nodes with images

My team and I want to use the Node Export Module to export and import nodes that include image fields between environments of our Drupal 10 site. However, when I export nodes, the image fields only ...
Amy's user avatar
  • 21
0 votes
0 answers
28 views

Issue with creating nodes from CSV using Migrate Plus module

I am encountering an issue while attempting to create nodes from a CSV file using the Migrate Plus module in Drupal 10.2. The nodes are successfully created with most fields populated from the CSV, ...
Md Eqbal Ahmad's user avatar
0 votes
0 answers
57 views

Replacing pattern in Views stripped some HTML tags

Some of my body fields contain embedded code, like iFrame. I use the Views to rewrite the output for a better layout and style. However, the iFrame tag got stripped when replacement patterns were used ...
CocoSkin's user avatar
  • 891

1
2 3 4 5
8