All Questions

Filter by
Sorted by
Tagged with
-1 votes
0 answers
16 views

Drupa 10 still slow after improuving performance [closed]

I have a slow drupal commerce website. I decided to remove all the content and keep just a simple html to display, but the drupal is still quite slow, see : Just to show this html : <!DOCTYPE ...
mt.i.1's user avatar
  • 61
0 votes
0 answers
5 views

Not saving total price for orders in drupal commerce

I tried to implement saving total price in orders but it`s returning an issue like before saving everything is good, but after it debug returning null protected function createOrder($order_data) { $...
Anton97's user avatar
0 votes
1 answer
16 views

Views not picking up custom field plugin in views UI

I want to create a views field plugin. At the moment, I just want to display "Hello world". I have a custom module "lazy_admin". This is lazy_admin.info.yml name: 'lazy_admin' type:...
Hodgekins's user avatar
  • 113
0 votes
0 answers
17 views

Why doesn't currentUser return correct permissions? [closed]

This happens a lot of the time with custom resources and I cannot figure out why. Custom permissions return wrong value with currentUser but returns correct value when loading user by uid. $this->...
Abdul Sadik Yalcin's user avatar
-4 votes
0 answers
34 views

Some un-wanted pages appearing in google search

Dears we're using Drupal version 10.1.6 and when I search for my website on Google search engine. under the main link "sub-links" showing with words such "page 8, page 2, Node .....&...
user114798's user avatar
0 votes
0 answers
43 views

How to do a 301 redirect without installing any module? [closed]

Putting this in the .htaccess file of the website didn't cause a redirect: Redirect 301 https://example.com/node-one https://example.com/node-two How to do a 301 redirect without installing any ...
user114794's user avatar
-1 votes
0 answers
18 views

How to upgrade versions? [closed]

Good Day, Drupal Community. The organization (Philippine-based) I am currently connected with has been using a Drupal-based web since 2010. The website is deemed business critical since this was ...
jec's user avatar
  • 1
0 votes
1 answer
16 views

How to prevent the anonymous user from being the author of a custom entity type?

I am making a module that stores push notification tokens as a custom entity type. Because of the nature of push notification tokens (sending a notification to the user's device, like an email address)...
Patrick Kenny's user avatar
0 votes
1 answer
19 views

How to use GitLab CI to test submodules that have different dependencies than the parent module?

I have created a contrib module that adds an entity type. I then created a submodule that adds a JSON-RPC endpoint to enable creating entities of the parent module using JSON-RPC. This submodule ...
Patrick Kenny's user avatar
0 votes
1 answer
19 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,213
-1 votes
1 answer
25 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
0 votes
0 answers
23 views

Untranslated date tokens

I'm using Automatic Label and Pathauto to generate patterns for my content from a date field. The problem is that it always ends up being in English, while my site is Dutch only. The following token ...
Willem's user avatar
  • 1
0 votes
0 answers
19 views

Closing div at start of twig template is removed at render

Issue Overview: I have a entity embed container that is added in ckeditor. Theres a custom template suggestion that renders the template. For styling reasons, I need to close out the wrapping div ...
Baerkins's user avatar
  • 101
0 votes
0 answers
13 views

How can I upload files to a submission using the REST API?

I am trying to upload PDF files to webform submission using REST API. I used webform rest module rest webful service module to add content in the webform, i am able to add content but unable to add ...
Aatif Chevli's user avatar
1 vote
0 answers
16 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
14 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
17 views

Using Webform to upload a media file?

I have the Media Module enabled and have a Media type defined called Approved Image. This is identical to the standard Image but has just one addtional boolean field called 'authorised'. I can create ...
ChumKui's user avatar
  • 179
-3 votes
0 answers
23 views

search api autocomplete to suggest words and not contents

the module search_api_autocomplete makes suggestions of content related to the typed words. I would need to give suggestions on existing words of the indexed db , or words already type in the browser ...
Matoeil's user avatar
  • 3,415
-3 votes
0 answers
10 views

How to pass create drush command with arguments [closed]

I want to create a drush command and in my service.yml i want to pass arguments and want to received argument in my drush command
Hissam Khan Babar's user avatar
-3 votes
0 answers
21 views

View presentation format not executed

I have created universities (with their different fields) and subjects (with their different fields as well, in addition to a reference field for university). I have a view to show the universities ...
Óscar 's user avatar
0 votes
1 answer
50 views

Submitting an existing block or form in a modal doesn't work

I am trying to open either the simplenews subsription block or the corresponding form in a modal. I tried with both the form using the formBuilder service or the exising plugin-block and in both cases ...
Mike's user avatar
  • 1
0 votes
1 answer
19 views

Change the fields that do the sorting of the view content on exposed field click

I need to sort indexed contents by "modification date" per default. An exposed button "Relevance" would sort by relevance instead. views sort options does not seem to allow that. ...
Matoeil's user avatar
  • 3,415
0 votes
1 answer
47 views

The node ID for newly created nodes is fetched but the node is not loaded

I have a custom module that loads all my nodes from type demarche_en_ligne, it worked fine for a few years but now when we create a new node it won't load. For instance I created a new node and ...
Xanthous's user avatar
  • 101
-2 votes
0 answers
26 views

Custom structure for multi-step webform's submission

I need to send webform submission data in an email with a specific structure: <h2>Wizard Page 1 Title</h2> <table> <tr> <td>Element Title</td> ...
Lena's user avatar
  • 1
0 votes
1 answer
84 views

Convert links to be shown in a modal

I am trying to alter links in my footer to be opened in a modal: function mymodule_preprocess_menu(&$variables) { $items = &$variables['items']; $attributes = [ 'class' => '...
Mike's user avatar
  • 1
-1 votes
0 answers
9 views

Display membership card in empty window

Wow, feeling stupid right now. I need to display some membership details and a QR code in an otherwise empty window - so that the user can print it. How do I force a page not to have all the branding, ...
Adaddinsane's user avatar
0 votes
1 answer
50 views

ServiceCircularReferenceException due to "State service now uses a cache collector for performance"

The change described in State service now uses a cache collector for performance added in 10.3 (issue: use cache collector for state) causes the kernel tests of a module to break: 25) Drupal\Tests\...
Patrick Kenny's user avatar
0 votes
0 answers
14 views

Allow defined user role to create webform but not alter form settings

I have searched, but have not found an answer to this question, and am wondering if I am just missing something obvious before I submit a bug report. Drupal 10.2.6, Webform 6.2.2, and an otherwise ...
Mike Cermak's user avatar
0 votes
0 answers
9 views

Delete image from form after invalidated

I made a custom hook_alter_form to invalidate and delete a image if invalid. php code in the .module file <?php /** * Implements hook_form_alter() to add custom validation for image ratio. */ ...
Simon Van den Bossche's user avatar
0 votes
1 answer
30 views

How to import older database into newer configuration of site? [closed]

As the title suggests, I've been working on upgrading the configuration of our website on a local version of the site which last had the database imported in mid-April. Since then, I've updated core, ...
ACanadianCoder's user avatar
-1 votes
0 answers
22 views

Cookie Does Not Contain The "secure" and the "HTTPOnly" Attribute , using EU Cookie Compliance module?

I work on my Drupal 10 website (https) using WAMP Server with Apache. I've just received the results of a security audit and found two issues: the cookies don't contain the 'secure' and 'HttpOnly' ...
ELIZ Des's user avatar
0 votes
0 answers
9 views

I can't get multiple values out of my RSS feed for pre-defined field Author name

I'm really new to this but have managed everything so far other than to pull out multiple authors. I am importing from a url with RSS/Atom parser and the XML is structured like so: <author><...
Sharon Hemming's user avatar
0 votes
0 answers
13 views

Sort by date after date_modify

Using Views > fields I want to sort 'date_modify' result. The statement(code) below provides all the dates (unsorted), nicely, however Views > Sort Criteria doesn't work since it seems to only ...
Systemlord's user avatar
-2 votes
1 answer
39 views

contextual menu module - error 400 on URL /contextual/render break contextual links on a limited number of pages

on a fully developed drupal, some contributors noticed me that the contextual menu links are broken on a limited set on pages. After a quick check i see that all those pages have a broken XHR request ...
SupFrig's user avatar
  • 109
0 votes
1 answer
53 views

How to inject RevisionableStorageInterface()?

I have a module I'm trying to update to Drupal 11. Here's the code: public function processItem($data) { $entity_type = $this->entityTypeManager->getDefinition($data['entity_type']); $...
Patrick Kenny's user avatar
0 votes
0 answers
11 views

How to add a filter form in a view to filter entries based on selected entries from a related content type?

I have created several filter forms for content types to filter content based on its taxonomies. In the View Filter Criteria section I can choose a custom field from the content type which relates to ...
Laurence Cope's user avatar
0 votes
0 answers
15 views

in view path, can I replace tid with token:name

What I have, the view path bild the path with token id's. such like: excample.com/view?token=555 maybe with [node:field_token:entity:name] or {{ node:field_token:entity:name }} ? with ...
Hartmut Theis's user avatar
0 votes
0 answers
11 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
0 answers
19 views

How to create a view with filters using data from an api?

We have a multisite setup and need to share taxonomy data from one site to all of the other sites. I have created a REST Export view on the site that has the taxonomy data. The next thing I've done is ...
Jordan's user avatar
  • 49
-3 votes
0 answers
22 views

get the facet taxonomy label from the query using JS

i have set a facet using a taxonomy ref field from an indexed search api view. Using JS: const searchParams = new URLSearchParams(window.location.search); const facetSearch = searchParams.get('f[0]'); ...
Matoeil's user avatar
  • 3,415
-1 votes
0 answers
19 views

sort by relevance in search api index views

When adding an exposed sort by relevance in a search api view index : The select option has only the option "sort by relevance". What is the use of that exposed sort then ? Should there not ...
Matoeil's user avatar
  • 3,415
1 vote
0 answers
30 views

How add a "Raw value" field on views?

I'm on Drupal 10.2.x and editing the view content. I'm using the contrib module views_cm_current_state. The module implements hook_views_data() to add, for what I understand, a new field. The field ...
Giuseppe's user avatar
  • 971
0 votes
1 answer
14 views

Get Feeds to overwrite edited entity item

I have a custom entity type and use Feeds to populate the entities. All works great on initial import. I then run a cron job that updates some fields of the entity that are not imported from the feed ...
Kevin Finkenbinder's user avatar
-3 votes
0 answers
18 views

Different content display options for mobile and desktop

I have a page with a file field (pdf only). In content display editor I can select the style for my file field. I want to select PDF Viewer (a module) as display style for desktop and PDF Preview (...
Simon Van den Bossche's user avatar
0 votes
2 answers
87 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
2 answers
25 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
1 vote
1 answer
47 views

Two-way Entity reference, programmatically

I'm building a custom module to handle two custom entities which extend ContentEntityBase: Organization and Contact. Organization can have multiple contacts, while contact can belong to one ...
bdereta's user avatar
  • 151
0 votes
1 answer
15 views

Title field does not show for product

Long time user of Commerce here -- but working with a brand-new Drupal 10 install and just realizing how much I was building on prior work with my old setup. Just created a new Product type, ...
Tiffani Chin's user avatar
0 votes
1 answer
55 views

How to get a deep clone of an entity object

Is there a way of getting a second object for an entity that is a different PHP object (with different PHP objects inside as well)? I tried using https://github.com/myclabs/DeepCopy with a node entity ...
joachim's user avatar
  • 846
0 votes
0 answers
50 views

How add a cache context in a form_alter?

I'm on Drupal 10.2.x. I'm writing a form_alter for a node add/edit form, where I am putting some extra markup data depending on terms of a vocabulary licenses. function my_module_form_alter(&$form,...
Giuseppe's user avatar
  • 971

15 30 50 per page
1
2 3 4 5
1756