All Questions

Filter by
Sorted by
Tagged with
0 votes
1 answer
32 views

Why isn't possible to save revisions of the form design as draft?

Apologies if this is repeating a previous post. I have been using the webform module for a few years, mainly creating and managing web forms for clients. The situation I have encountered with webforms,...
  • 3
0 votes
1 answer
69 views

How can I to override a specific variable from a contributed module?

My goal: If a person select a start date the end date is 1 hour later, without the need of selecting the end date (2) Normally the Form provides 2 selections of dates, start date (1) and end date (2)...
  • 306
1 vote
0 answers
52 views

Authentication provider for specific REST resource only

I would like to use my own auth provider for my REST services. While there's no fundamental problem with creating it, adding to my services.yml and referencing it in the .yml of the resource, it is ...
  • 672
0 votes
0 answers
50 views

How to get the entity bundle class from $form_state->getFormObject->getEntity()?

In hook_form_alter(), I want to perform some operations using an entity bundle class. function mymodule_form_alter(array &$form, FormStateInterface $form_state, array $context): void { $...
1 vote
0 answers
43 views

How can I connect to Office365 mail server using OAuth to send email?

I am using SwiftMailer to connect to an Office365 email account. So all emails issued from the Drupal site are sent via the SMTP server on Office365. However, from October 2022, Office365 will no ...
0 votes
1 answer
30 views

How to re-save a referenced entity that is removed when saving the referencing entity?

I have added a field to the Tags vocabulary, Count. In my Tags taxonomy term entity bundle, I run a database query in preSave() to set the value of this field (how many nodes have an entity reference ...
0 votes
1 answer
14 views

How do I manage select options on a multi page webform?

With a multi-page webform. Page 1: choose country Page 2: choose industry Page 3: choose from a list of people that support the country and industry. #validate handler added $form['#validate'][] = '...
  • 1,383
0 votes
0 answers
36 views

How to log stock?

How could I create a log where the records of the stock level in D9 are kept, just as I have done on my D7 page? This is that I,ve got on D7 In D7 use a View like that Using the Rules module with ...
  • 1
0 votes
0 answers
11 views

separate permissions for annotating or editing webform submissions?

Is there a way to configure webform admin access that allows annotating/flagging but does not allow altering data submitted by (possibly anonymous) users? I set up a simple webform. I gave a role ...
  • 149
1 vote
0 answers
20 views

How do I use specific css to taxonomy-term in teaser?

On the front page a list of teasers is shown for different content types. For one of these content types I want to use different css depending on the value of the taxonomy term. Content type name : &...
  • 69
0 votes
0 answers
45 views

How to delete a node without deleting it's relation

I have the following script that I run in /devel/php panel to delete the list of nodes in the array. I want to delete the nodes but I do not want to delete it's relation. When I run this script from /...
  • 107
0 votes
3 answers
29 views

Remove "Payment method" tab in user profile

Commerce don't give me any customize options for the user profile of the user, I don't want the "Payment method" tab to appear in the user profile, how can I cleanly remove/disable this? Can ...
0 votes
0 answers
8 views

Ajax issue in tab when embedding a view

trying to add two views in panel in drupal 7 in one views it is working fine ajax like comment on ajax and all works good , but while switching on different tab ajax is not working fine. in recently-...
1 vote
0 answers
50 views

Need help with Cache::invalidateTags() and cacheable metadata in REST route

I have a REST route that returns some JSON. I am trying to get cache tags working correct, but it doesn't seem to be working. Only updates if I flush all cache. I have a queue that runs on cron every ...
  • 417
0 votes
0 answers
15 views

How to Get Imported Files to Appear in Media Library

I'm looking for a way to get images added via a feed to appear in the media library. I see them from the 'Files' tab under 'Content', and I also see them in the 'file_managed' table. Surely there's a ...
0 votes
0 answers
17 views

Migration multilingual from XML

Good, I am developing a migration of a fairly simple xml file to drupal 9, the structure of the xml is as follows: <?xml version="1.0"?> <Articles> <Article> <id&...
1 vote
1 answer
37 views

How do I configure the route to the add form for a content type created as a bundle class?

I've got a custom content entity type, created for me by drush generate and I'm extending that using bundle classes. I've got a MyContentType class and a MyBundle class that extends it and provides ...
0 votes
1 answer
30 views

How to catch the payload for bad POST requests with JSON:API?

When POSTing to JSON:API with invalid parameters, UnprocessableHttpEntityException is thrown. However, in the logs, this exception does not contain the invalid payload that caused the exception. How ...
0 votes
0 answers
31 views

In drupal9 how to pass field values from page 1 to page2 in webform module? [duplicate]

I want previous page values in next page in webform multistep form. E.g. If I've entered a value say First name: "Tara". And then clicked on next button. Then in next page the first name ...
1 vote
2 answers
42 views

Admin toolbar loads index.php/*

I am using Drupal 9 all the admin tool bar menu options loads the URL with /index.php/admin/config/* as URL I have the clean URL programmed in .htaccess, but still the menu load only index.php/ URLs ...
0 votes
0 answers
40 views

Allow webform 2 when webform 1 submitted

i'm trying to understand how allow a webform based on sumbission of another. My Drupal site users have to compile two different forms. The first contains the user's account information and the second ...
0 votes
1 answer
57 views

How to have some element of a custom form rendered outside <form>

I have a form based on FormBase. All the form is wrapped by form.html.twig. I want to render $form['charts'] outside the <form>. I was able to do this, but {{ children }} still render all the ...
  • 642
0 votes
0 answers
14 views

How would I show the total members for an Organic Group in a view?

This question has been asked, but the answers are all for Drupal 7. Organic Groups for Drupal 8/9 has changed the relationship options. Previous answers do not apply. I would like a view to display ...
3 votes
0 answers
42 views

Array type hints conflict between Drupal and Symfony

In an event subscriber, I have: /** * Registers the methods in this class that should be listeners. * * @return array * An array of event listener definitions. */ public static ...
1 vote
1 answer
77 views

AjaxCommand to scroll to top of page?

I have created an AJAX form. After the form is submitted, I call $this->createOkResponse() which updates a section of the page with a message (it replaces the form with the message). It all works ...
4 votes
2 answers
121 views

How can I run the inbuilt Drush 10.x commands as user #1?

I have a Drupal Queue worker class that fetches the Entity objects from Drupal to index to Elasticsearch. The following command is causing the lesser documents to show up in Elasticsearch since by ...
  • 2,466
2 votes
1 answer
67 views

$current_user->id() returns 0 when logged in for HTTP Middleware

I have injected currentUser as a dependency into my HTTP middleware, but when I check the UID while logged in, the result is always 0. I am logged in as an admin and refreshing the watchdog page; the ...
3 votes
1 answer
83 views

How do I AjaxResponse on a custom AJAX call?

I have some custom Javascripts. at the part of code I want to leverage Drupal AjaxResponse but looks like it's only working when there Triggered by Drupal Form's ajax element. ( my ajax call verb is ...
  • 21k
0 votes
0 answers
18 views

Fields only from the first paragraph

I have a node type with paragraphs. In a view I need to get fields from these paragraphs. But only from the first paragraph of every node. In the view I have a relationship to the field which ...
  • 469
0 votes
0 answers
18 views

How do I add custom settings to a field? [duplicate]

Strangely, I'm having trouble finding any info on this, though seems simple at first. I need to alter the field type in my instance (decimal, to be precise), adding a new setting. The current settings ...
0 votes
1 answer
22 views

Can't add Google Webmaster metatag because "Site Verification" category is missing

I'm using Drupal 7 (I can't update) and I'm trying to add Google Webmaster verification meta tag using the following instruction: https://www.drupal.org/docs/7/modules/metatag/howto-verify-a-site-on-...
  • 101
2 votes
0 answers
42 views

Altering the render array

We are planning to migrate to Layout Builder and is largely done except for Paragraph entities, namely one type for job titles. In D7 we used field_collection and then migrated to Paragraphs in D8 and ...
  • 439
0 votes
0 answers
27 views

Comment not displaying on node where nid integer is greater that 6 digits

I have a D7 website, and have found that comments won't display on nodes where the nid is > 6 digits (affects only 2 of 6 content types). The site is updated to the latest version, hosted on an ...
  • 1
0 votes
0 answers
22 views

Submission getData() result not include entity reference element

Webform submission getData() result not contain entity reference element. $values = $webform_submission->getData(); $values does not include all element values. Not include the entity reference ...
-2 votes
1 answer
49 views

How iterate through output from "views-view-field.html.twig" file? [closed]

I have views with 6 results. However they are displayed in 2 different ways. 2 first in one way, 2 next in second way, next in first way and last in second way. I know it is quite confusing. I have ...
  • 9
0 votes
0 answers
13 views

How can I add a hyperlink to some text in the Welcome Email [duplicate]

I am trying to add a basic link in the new registration welcome email. The link is rather long and I would like to make this a simple hyperlink in the email. If that form was HTML I could simply wrap ...
  • 323
-1 votes
1 answer
25 views

'setAttribute' causing UncaughtDOMException with jQuery Dialog?

I'm using jQuery and the jQuery UI Dialog module (here) to check for new nodes of type "call" every few seconds. Forgive me if I don't know too much about it as I just started using it. Here'...
0 votes
1 answer
32 views

There is a new meta tag setting to trim content from a token. How do I use it?

This and this site says there is a new Meta tag trim feature, but I have looked everywhere where I can think of and can't see an example of how to use it. Does anyone know how to use that?
0 votes
0 answers
21 views

Computed FieldItemList with issues

For a headless Drupal backend, that is used mainly as a jsonApi endpoint, I added to nodes in general a field, that contains node translation paths (if created). With that I am able to show a menu ...
  • 645
0 votes
0 answers
15 views

Uninstalling Commerce Recurring and Commerce License

For some time now, I have been experiencing trouble related to the commerce_recurring and the commerce_licence module. The problems seem to have started to occur once I tried to uninstall the prior. ...
0 votes
0 answers
16 views

Why is Backup and Migrate version correct (7.91) and Core Update Status different (7.89)?

I am having a problem resolving this security error on multi-site configuration. One site doesn't get an error and the other sites do. The current backup and migrate application shows the correct ...
  • 101
1 vote
0 answers
26 views

Show user page only if displayed (and not current) user has a specific role

On my site, anonymous users can access user information with this type of url: /user/25 It works fine, I created a template for this branch: user–full-html-twig. However, I would like this type of url ...
0 votes
1 answer
27 views

Circular reference detected for service "http_kernel" with middleware having the correct number of arguments

I'm pretty confused by this. I am experimenting with using an HTTP middleware to try to send Google Analytics page views from the server instead of the client. However, after adding a basic middleware,...
0 votes
0 answers
29 views

Attach custom javascript library to entity print output

I'm trying to load an easy Javascript for the Entity Print module. It should load a library defined in my theme, and a JS File. I tried some hooks, (_page, _preprocess_html, etc) but had no chance to ...
  • 333
0 votes
1 answer
23 views

How do I update the sort field value dynamicaly?

I have a requirement to list events via view, but these events are categorized as past, ongoing and upcoming events. View results should show ongoing first, then upcoming and past events in the same ...
  • 854
0 votes
0 answers
19 views

Advagg breaks the site for logged in users

Recently started having issues with Advagg module. If I set the AdvAgg Cache Settings to anything other than Development, it breaks the site (one of the CSS file goes in redirect loop). Only happens ...
  • 161
0 votes
1 answer
45 views

Custom alias for home page

I have a bilingual website (French and English) I have set "/fr/nom-de-page" as the home page in /fr/admin/config/system/site-information But Drupal 9.4.5 insist on redirecting to /fr/ I ...
  • 137
0 votes
0 answers
10 views

Views Aggregator Plus enumeration, How can I access resulting data to create link to google maps

I have geolatlon field for 10 locations. The view enumerates the geolatlon lat/long and shows it correctly in the footer.(10 lat/long pairs separated by / ) Trying to now access the data as a string ...
  • 115
0 votes
0 answers
23 views

same view, same url path, identical content, but different categories

Not sure if this is a bug or not, but it's giving me a headache already. When I add new content on my D7 website, an article in this case I'm facing a strange behavior. Each article has its own "...
1 vote
1 answer
42 views

How do I translate a custom string in "Global: Custom text"?

In D9 website I have a view with Global: Custom text field. In that field I have placed a string like this: <span class="general-info">{{ 'General Info:'|t }}</span> I want to ...

15 30 50 per page
1
3 4
5
6 7
1730