All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
8 views

view field value does not change as expected ... stuck in cache?

My site is in Drupal 10 I have created a view by duplicating 'content' view in the core. I have reduced the duplicated view only to show node title node type author last update date-time of the node ...
user1940163's user avatar
0 votes
2 answers
15 views

Getting existing fields in hook_entity_bundle_field_info()

I have custom fields that I need to add to specific entity types and bundles with hook_entity_bundle_field_info(). However, I have to decide on which one to add depending on already existing fields, ...
Gábor's user avatar
  • 833
1 vote
0 answers
32 views

Avoid serving unused core files

I analyzed my Drupal website using Chrome's Code Coverage feature. I noticed that there are a lot of core files loaded (CSS and JS) which aren't used at all, for example: Resource Unused /core/...
summerturnips's user avatar
0 votes
0 answers
5 views

Set webform composite rows to another field's value

I have a field to enter a number and then a composite set of fields. Is there a way to set the number of rows in the composite to be the number entered in that separate field? Preferably, it would ...
Prizem's user avatar
  • 23
1 vote
0 answers
36 views

Using drush PolicyCommands.php

Currently on drush v12.5.2.0 and I am using drush sql:sync to sync my local with the remote db. I want to ensure I do not enter @prod for the target. I realized I could use drush policy to validate [...
juliusfischer's user avatar
0 votes
0 answers
19 views

"Route does not exist" in JSON:API for custom entity type

I created a custom entity type using drush generate entity:content. I chose to have bundles, and I added a bundle test_bundle. I can add my custom entities at admin/content as expected. However, when ...
Patrick Kenny's user avatar
-1 votes
0 answers
16 views

i'm trying to add a left join within a hook_views_query_alter , but $query->leftJoin gives an error [duplicate]

i'm trying to add a left join within a hook_views_query_alter function like this i'm trying to add a left join within a hook_views_query_alter like this $query->leftJoin('{user__roles}', '...
Diana's user avatar
  • 3,292
1 vote
1 answer
47 views

Parts of the Edit Page

I don't know Drupal, but I need to be able to talk about Drupal with someone and I don't know what to call things, and I can't figure this one out from the rest of the Internet. I have a Drupal 10 ...
Borea Deitz's user avatar
0 votes
1 answer
45 views

Aliases to files under /sites/default/files

I have a file currently accessible to web users with the following url: https://mysite/sites/default/files/brochure_WEB.pdf With the help of the Path module I want to create a URL alias to it. So, in /...
quilx's user avatar
  • 21
0 votes
1 answer
49 views

Passing parametes to a twig template

I am creating a custom module to create a controller that runs every time we access a certain route. I have university entities created and a view to represent them in a list. When I click on one I ...
Óscar 's user avatar
0 votes
0 answers
10 views

Limit Per User Tokens in Drupal Simple OAuth

I'm looking for a way to limit the maximum number of tokens granted to each user in Drupal 10, similar to how we can limit the number of sessions per user using the Drupal Session Limit module. Is ...
Tejas's user avatar
  • 1
-1 votes
0 answers
28 views

Sort search result based on group of content type

Is there any way to sort search results based on content type using Drupal views and the Search API module? To get result of a particular content type first, followed by another, and so on.
Tejas Damre's user avatar
-2 votes
0 answers
21 views

I need to check in delegates at a conference using a QR scanner [closed]

I need advice on how to check-in Delegates at a Conference using a scanner or mobile QR Code Reader to fully integrate with Drupal 10 Webform. Suggestions of Modules to use in workflow below. Success ...
Bobby Bezuidenhout's user avatar
-1 votes
2 answers
61 views

Is there a way to know which Drush command is executed from within a hook implementation?

Here is my use case. I'm importing nodes with the classic migration API and goes through some hooks (like hook_node_presave, hook_node_delete...). I also have another drush command that synchronise ...
pbonnefoi's user avatar
  • 1,844
0 votes
0 answers
38 views

reCAPTCHA missing in webform

We have built a Drupal webform with ten pages, each containing one question. The last page includes both a question and a captcha. Users can check the captcha and submit the form. We are using Ajax ...
Abhi Das's user avatar
  • 121
0 votes
0 answers
47 views

I need to redirect Anonymous user to login page

I have a webform that is restricted to Authenticated user. The form is working as intended. When Anonymous user try I access the form they get The website encountered an unexpected error. Try again ...
Moussa's user avatar
  • 1
0 votes
0 answers
16 views

Contextual filters with taxonomy

I have built a normal view with a contextual filter on a taxonomy term: This taxonomy term consists of 6 terms, with four terms the call of the view works without problems and with two terms I get ...
Bavramor's user avatar
0 votes
1 answer
37 views

Migrating webforms from Drupal 8 to 9

I am trying to migrate webforms from a site running drupal 8.4 to 9 with the former's database as source. The source site has more than 1000+ forms, so I prefer to opt for the migration framework ...
optimusprime619's user avatar
-4 votes
0 answers
67 views

How can re-use a field constraint? [closed]

I created a field Constraint named field1Constraint with field1ConstraintValidator based on UniqueFieldConstraint. It works. Then I created a field2Constraint which should use ...
PROMES's user avatar
  • 13
0 votes
2 answers
48 views

how to get link field's value with hook_views_pre_render?

I have a content type names Link in which contains only a link field. I want to rewrite the title link to the external link(link field's value),but I couldn't get link field's value under ...
user167043's user avatar
0 votes
1 answer
24 views

Configurable products with reference to simple products

I'm in the process of creating an e-commerce site for myself. I'm a Magento developer but decided to learn Drupal. I'm struggling with a setup for configurable products. I'm able to create them in a ...
Pawel's user avatar
  • 1
0 votes
0 answers
37 views

hook_field_widget_form_alter() not retaining form field value when "Add another item" button is clicked

My hook_field_widget_form_alter() implementation looks as follows, function mymodule_field_widget_form_alter() { $field_definition = $context['items']->getFieldDefinition(); if ($...
Sivaji's user avatar
  • 2,478
-3 votes
0 answers
38 views

cloning site killed by unreadable config file?

I've got a Drupal 9.5.11 site that I'm using Softaculous to attempt to clone it to another location. But any time I try, at around the 95% done mark, I get an error "Could not read config file.&...
turpentyne's user avatar
0 votes
0 answers
17 views

Replacement for content_entity migrate source plugin

I've been using the content_entity migrate source plugin for updating content structure within a site — for example, if I want to change a field's type, or move a subset of nodes of one content type ...
jlstrecker's user avatar
1 vote
1 answer
61 views

Checkout with non-interfering returning customer login

In a drupal commerce shop, I want to provide a possibility for returning customers to log in without introducing an obstacle for customers who want to check out without having to click on button "...
Madam Adam's user avatar
0 votes
0 answers
16 views

Matching question types and answer types in quiz module

There are question types and answer types in the Quiz module. I am particularly interested in the question type Long answer question and the answer type Long answer response. In the answer type, I ...
deelite's user avatar
  • 479
0 votes
1 answer
33 views

menu tree behaves differently on two differents sections

i'm maintaining a drupal i didn't developed. I fixed some issues in the menu template (e.g. /themes/custom/{mytheme}/templates/menu--menu-{my-menu-name} ) this template is called at two places in the ...
SupFrig's user avatar
  • 109
-2 votes
3 answers
56 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
2 votes
0 answers
11 views

Display 'Per user submission limit message' as plain text rather than a warning message modal?

I am using a 'per user submission limit' message on my webform, to restrict users to one submission every 15 minutes (to reduce spam). I would like it to maintain the confirmation wording for the ...
Hysteria's user avatar
0 votes
0 answers
46 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
0 votes
0 answers
15 views

Multiple Submit button conditions not behaving as expected on Webform

I have set up the following conditions on the submit button on my Drupal 10 Webform: State: Disabled if [ALL] Number Field 1: empty Number Field 2: empty Text field: value is not "TEST" ...
hockey2112's user avatar
  • 1,244
-2 votes
0 answers
23 views

Error deleting content in the main translation "ES"

I have a Drupal 10 site hosted on CentOS. I have a problem and it is that the content created with the main translation which is "es", is not deleted. The log does not return anything nor ...
Diego Ricaurte's user avatar
-1 votes
0 answers
31 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
20 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
43 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
34 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
-4 votes
1 answer
60 views

Add Javascript to a specific 'Basic page' or node based on its title

In a Drupal 10 site I have a page (content type: Basic page) that needs a small Javascript fragment defined in a Javascript file that was added as an asset to the theme.libraries.yml file. I don't ...
quilx's user avatar
  • 21
0 votes
1 answer
20 views

How to represent fields of an entity in a view with a custom template

I have the entity degree. I created a view to represent the data of the degree. The system name of my view is data-degree. I created a twig template with name 'views-view-data--degree.html.twig'. I'm ...
Óscar 's user avatar
0 votes
0 answers
32 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
-4 votes
0 answers
38 views

how to make a view contain only certain roles in the role column [closed]

I am making a view of users which includes the role column, however , I dont want some roles which are common to all , for instance "Verified" to show up in the list of roles. I tried using ...
Diana's user avatar
  • 3,292
0 votes
1 answer
41 views

How to get translation for translate view programmatically? [closed]

Assume I have two languages (English and Vietnamese) and already defined translations (label, description) in the translate view tab. Is there a way to programmatically get the translation content ...
huyleuit's user avatar
0 votes
0 answers
96 views

Pass dynamic arguments to a related form (no code) - possible?

after searches and tests, I am asking here on what seems to me quite a common scenario but for which I haven't found a way with just core and modules, i.e. without writing code. I am using Drupal 10.2....
Nene's user avatar
  • 1
-2 votes
0 answers
13 views

Depot System for Commerce 2.0

I need a depotsystem for a drupal commerce onlineshop. Customers can order products with packaging that has depot on it. Let's say they order 10 crates of beer and the i need to charge 10 x 5$ and on ...
Ivo's user avatar
  • 1
0 votes
0 answers
17 views

Block access to webform using a handler?

I have a webform that that uses some query parameters to set required fields. If the parameters are not provided, I want to block access to the webform. I can currently get the handler to close the ...
Nick Perkins's user avatar
0 votes
1 answer
41 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
0 answers
10 views

Set Custom Metatag Title for Products? Taxonomy Term or Vocabulary + Product title - Drupal Commerce

I am using Drupal 10.3 and Drupal Commerce 2.39. I want to customize the title of a product. What I need: The page title should be "Taxonomy Vocabulary + Product Title." I think there is no ...
C. Riemer's user avatar
1 vote
1 answer
37 views

How to add Schema.org BreadcrumbList when using template_preprocess_breadcrumb()

We had some specific breadcrumb requirement and decided to rewrite it completely using template_preprocess_breadcrumb() which is not very dedicated for this but was very easy to work with. However we ...
tostinni's user avatar
  • 9,123
-4 votes
0 answers
36 views

how can i get the geocode from my content without adding an address field if i have the zip code? [closed]

If i add an address field to my content, then the geocode is working correctly when i save the content. however , I dont want to have to add this field, I just want to be able to geocode from the ...
Diana's user avatar
  • 3,292
0 votes
0 answers
41 views

How to print variables in Views Field Template

I have a View of Article nodes here which uses this Views field template, copied from core, to target the Article's image field: views-view-field--myarticles--page_1--field-image.html.twig I can see ...
Juc1's user avatar
  • 369

15 30 50 per page
1
2 3 4 5
1757