All Questions

Filter by
Sorted by
Tagged with
0 votes
0 answers
4 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
  • 782
0 votes
0 answers
13 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
9 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
13 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 on the db , or words already type in the browser history. ...
Matoeil's user avatar
  • 3,415
-3 votes
0 answers
9 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
12 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
0 answers
15 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
0 answers
34 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
23 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
61 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
8 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
46 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
1 answer
12 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
28 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
19 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
11 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
39 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
27 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
86 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
46 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
13 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
52 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
48 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
-2 votes
1 answer
33 views

Unable to execute drush command in local [closed]

While running drush, Receiving error stating: [preflight] Package "drupal/core" is not installed I have updated my environment variables like below after installing drush globally. Drush ...
sudhan's user avatar
  • 1
0 votes
0 answers
10 views

Tax, coupon, and zero payment

I am trying to do a very basic task which I guess should be available out of the box. I have read many other comments that do one and not the other, some are even offering programming with hook ...
user3532287's user avatar
1 vote
0 answers
41 views

How to create third party settings for themes?

How to I properly implement third party settings for a theme, without clearing 3rd party settings from other modules? E.g. my site has a gin.settings.yml with third_party_settings: shortcut: ...
Hudri's user avatar
  • 5,530
0 votes
1 answer
49 views

How to render a link to a page fragment in Twig

I have a Twig template that prints a link with the following code: {{ link(item.title, item.url) }} This code is rendered as an a element with a href attribute similar with the following: https://www....
quilx's user avatar
  • 19
0 votes
2 answers
73 views

How can I alter the element markup in a multi-step form?

I have built a multistep webform using webform version 6.2.2 and Drupal 10 and I want to show a summary element on each step that updates with the information of user input from all previous pages. ...
Jamesbeat's user avatar
0 votes
1 answer
97 views

Is there a way to remove cache tags from a render array

When I turn on cache debugging, I see a lot of cache tags for render arrays that don’t make sense. I don’t see an obvious way to remove these cache tags. For example, they don’t seem to appear in the $...
miwayha's user avatar
  • 31
0 votes
0 answers
37 views

What are all the steps needed to migrate from Video Embed WYSIWYG to Core Media (images/video fields too)?

As the title suggests, I'm in the process of upgrading from Drupal 9 to 10 and would like to finally migrate over to Core Media, as opposed to just using inline video/images/files as we have for the ...
ACanadianCoder's user avatar
0 votes
1 answer
56 views

Access field formatter settings in a field type plugin

How can I get the field formatter settings inside a field plugin? The field plugin extends FieldItemBase and the corresponding field formatter plugin extends FormatterBase. If there is no direct way, ...
Mike's user avatar
  • 1
0 votes
0 answers
23 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
27 views

Erroneous .tar.gz created by drush archive:dump. The archive cannot be restored with drush archive:restore

I use Debian 11, PHP 8.1.28, drupal/core-recommended:10.2.6 and drush/drush:12.5.2. When I run drush archive:dump no error is reported. But when I want to restore the archive with drush archive:...
quilx's user avatar
  • 19
2 votes
2 answers
168 views

How do I enable a PHP extension on GitLab CI?

I'm trying to use Drupal.org's GitLab CI to test a module that has a dependency on a package that requires PHP's ext-sodium to be installed: No composer.lock file present. Updating dependencies to ...
Patrick Kenny's user avatar
0 votes
2 answers
62 views

Can you set default configuration settings for a contrib on install?

I am looking to set default configuration settings for a contributed module, Nodeaccess, on install. I know that you can do that on site spin-up but this module will not be enabled by default. I tried ...
Chad's user avatar
  • 1
-3 votes
2 answers
42 views

Can't seem to find a way to have & in a term description show up as &

In a site on D9. I have a vocabulary that has titles as the term descriptions. One of the term descriptions is This & That No matter what I try, the & is converted to & in CKeditor4. This ...
JAyenGreen's user avatar
0 votes
0 answers
14 views

Drupal multistage webform ECK entity reference token

I have a multi-stage webform where a user will select courses they wish to enrol a user too and on the last page it will confirm the products. This is being done as a checkbox populated by an entity ...
Alex Noble's user avatar

15 30 50 per page
1
2 3 4 5
1756