Questions tagged [9]

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

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

How to properly extend Entity Query class?

I am working on some complex aggregate reporting that pulls from several sources (node type) and generates a report in a table display. There are about 10ish line items (could be more later) and ...
user avatar
  • 26.5k
0 votes
0 answers
6 views

CommercePrice input array is invalid for destination

I have a problem trying to migrate from D7-D9.I'm migrating the products and the field that gives the error is the field_cost. "upgrade_commerce1_product_variation_product:field_cost: ...
user avatar
-3 votes
0 answers
14 views

Unable to read Jquery cookies in drupal controller

I have set a cookie in Jquery on the click function. Cookie has been stored in the browser. Cookies.set(cookieName, example); But when trying to get the cookies through request. It shows an empty ...
user avatar
0 votes
0 answers
15 views

Convert field from string_long to text_with_summary

I need to convert a field on a paragraph from the string_long type to the text_with_summary type. There is data in the field so I can't change it in the UI. How would I do this programmatically?
user avatar
  • 610
-1 votes
1 answer
13 views

Blocks in menu region visible only for authorised users - how to find a reason? [closed]

I have a website, which has some custom modules and I try to figure out, why blocks in one region are only visible for authorised users. What I checked so far: These blocks are not restricted in any ...
user avatar
  • 189
0 votes
1 answer
18 views

Multistep Ajax form with ManagedFile: current step array dissapears from $form upon file upload callback

I have a custom multi-step Ajax form. On the second step, I have defined a managed_file field where users can upload several attachments: public function buildForm(array $form, FormStateInterface $...
user avatar
-3 votes
1 answer
39 views

How can i preprocess variables php to js

Hello everybody I'm new to Drupal and I'm working on a new payment module. This module provides a block and I need to pass some variables from the controller to the blocks twig template. I have a ...
user avatar
0 votes
0 answers
47 views

Creating remote video media entity programmatically not generating thumbnail

Using Drupal 9.4.1, I am creating a remote video media entity programmatically and for some reason the title and thumbnail are not being created. They are created when cron runs so in my terminal when ...
user avatar
  • 405
2 votes
1 answer
125 views

Lando local dev site tabs link to live

Suddenly, my local dev site's tabs have started linking to the live site. For example, when I view https://mysite.lndo.site and click the edit tab, it points to https://mysite.com/node/166. If I type ...
user avatar
1 vote
0 answers
5 views

How do I make an exposed drop-down filter filter on a grouped set of date fields?

We have a Drupal 9 View of nodes that have a date field. The node dates will all be for a particular day for one specific week (for an event). We have the View formatted set to group the dates and ...
user avatar
0 votes
0 answers
27 views

Missing or invalid module: Kint in update.php

I have updated my project to Drupal 9.4.1 from Drupal 8 and updated all packages with the composer successfully. But when I want to run the update.php file then the error popped up. It says "...
user avatar
  • 1
0 votes
0 answers
32 views

Fit locations does not work with GPX files

I installed the "Geolocation Field" module on Drupal 9. I created a "track" content type with a "Geolocation GPX File" field. I created a node with a GPX file loaded. ...
user avatar
  • 1
0 votes
0 answers
21 views

How to offer the GPX file for download, on the node?

I installed the "Geolocation Field" module on Drupal 9. In my content type, I created a "Geolocation GPX File" field to load a GPX file. I loaded a GPX file in the node field : ...
user avatar
  • 1
0 votes
0 answers
31 views

How can I distinguish appearance of live and dev sites? [closed]

When you have your live site open in one browser window and your dev site open in another, it would be nice (and safer!) if you could easily flag up which is which. Ages ago I came across a module ...
user avatar
  • 1,364
0 votes
0 answers
34 views

I cannot add fields to the User entity

After upgrading from Drupal 8 to Drupal 9.4, I get errors when I try to add a field to the User entity. There was a problem creating field daddd: Attempted to create an instance of field with name ...
user avatar
-1 votes
0 answers
32 views

current logged in user that equals Entity Reference field for a Profile

I have 2 profile type Student have field name and id Professor have field name and entity reference to student(s) I want student users who loged in see the assigned professor to him/her I tried views ...
user avatar
  • 11
0 votes
0 answers
16 views

"Uncaught Error: Class 'Consolidation\Log\LogLevel' not found in /app/vendor/consolidation/log/src/ConsoleLogLevel.php:21"

I am using lando for the first time and having difficulties. I cloned a git repo and ran the "lando start" and "lando composer install"commands. After that, when I am trying to run ...
user avatar
  • 1
0 votes
1 answer
81 views

How can I add Composer to an existing site?

I have a site running on Drupal 9.3.15 installed from the zip file. I want to use composer and I followed [Add Composer to an existing site1, but I get this error message. Parse error: syntax error, ...
user avatar
  • 59
3 votes
3 answers
132 views

DrupalDateTime::createFromFormat() returns the wrong time value

I want to get the date of last monday at 00:00:00 in a specific timezone. When I try this: DrupalDateTime::createFromFormat('U', strtotime('last week monday'))->setTime(0, 0, 0)->setTimezone(new ...
user avatar
  • 26.5k
0 votes
0 answers
12 views

HTML5 Video - How to set attributes on a per-use basis?

I'm using the Video module to handle HTML5 Video embeds on my site. I can't figure out how to allow users to set looping/muting/autoplay setting on a per-use basis. For instance, if one of our ...
user avatar
  • 583
-2 votes
1 answer
28 views

How to set value on drush updb running and get that value on hook_update_N, to call specific function? [closed]

On drush updb I am trying to set parameter value (ex: drush updb {value} -> drush updb unique) to get this value on my_module_update_9001(&$value): function my_module_update_9001(&$value) { ...
user avatar
  • 1
0 votes
0 answers
6 views

Group rows by date

In a custom view, I have some values which belong to the same month (06/2022). If I have some other data, they will be also displayed (before or after the 06/2022) How can I change the configuration ...
user avatar
  • 31
0 votes
0 answers
10 views

The clientside validation error message is shown on the top of the field

I'm on Drupal 9. I am using the Webform client-side validation (Select2 Jquery). Form validation error messages look good for all field types, except the select fields, where the validation error ...
user avatar
  • 113
1 vote
0 answers
28 views

When I add a particular field, the preview disappears. Why?

I have a Drupal 9 view which shows the fields of a particular content type. This content type has a particular field, ver. When I add this field in the view, the preview disappears and I get this ...
user avatar
0 votes
0 answers
10 views

How to delete webform submission without confirmation

I would like to delete webform submission by direct link, maybe in modal or something like this...without redirection to confirmation page. I use theme switching module to refirect to default theme ...
user avatar
  • 1
-3 votes
0 answers
21 views

Upgrade entire site while migrating

I've agreed to help migrate a Drupal 7 site to a new domain/host, and the owner wants it updated. Since Drupal 9 is current, I figured I'd do that. I have no previous experience with Drupal. I have ...
user avatar
0 votes
0 answers
15 views

Translation in JavaScript file doesn't work [closed]

I am using Drupal 9 and Laravel-mix for the front end setup. In my JS file I tried to translate the sting with Drupal.t('the string'); The string can't be found in the Translate UI if I use yarn build....
user avatar
0 votes
2 answers
43 views

AnnotationException for no apparent reason

This site suddenly is making an AnnotionException. Nothing was changed on the server nor de site itself, just maybe Apache / PHP updates. I tried using different PHP versions, 7.4 / 8.0 / 8.1 but all ...
user avatar
  • 3
-3 votes
0 answers
33 views

How can I use the batch API to export data to a CSV file? [closed]

I need to implement the following : Read data from the database Put the data into a CSV file and download it. The number of records to be exported is vast in numbers therefore to avoid a time-out ...
user avatar
-1 votes
0 answers
17 views

How can I hide/show exposed filters according to permissions? [closed]

I have three exposed filters: Colors, Shape, and Size. I want to show all the exposed filter to anonymous users, but hide Shape and Size to authenticated users.
user avatar
1 vote
0 answers
16 views

How to write time range condition for datetime field?

I need a query that will show events only in specific time range. For an example: Event 1 -> 2022-06-12T20:00:00 Event 2 -> 2022-06-11T11:00:00 Event 3 -> 2022-04-12T09:00:00 Event 4 -> ...
user avatar
0 votes
1 answer
22 views

How do I export numeric data with JSON:API?

All the data exported is formatted with a string. Enclosed with quotes. I'd like excluded_id to be numeric. The current state is the following. [ { "pending_id": "1234", "...
user avatar
  • 1,357
0 votes
0 answers
46 views

How do I redirect users after login without using contributed modules?

We have to upgrade Drupal 8.9 to Drupal 9.3.3; since the login_destination module stop working, and we don't know why, I've tried others modules like Anonymous Login, Redirect After Login, User ...
user avatar
0 votes
1 answer
15 views

Allow users to add extra products/services in the cart

The idea is to allow users to choose supplemental products right in cart (for example, insurance or assembly). Those are in no way related to main product type items. I know there is the Commerce ...
user avatar
0 votes
0 answers
13 views

Custom #upload_validators not firing

I have the following code but the custom validator is not being fired when I add a file to the file field. If the file isn't a csv then I get an error message but if I upload a csv then the second ...
user avatar
0 votes
1 answer
22 views

Allow to update unpublished node of sub user

I have a site where I work with main users and sub users (users created by a main user). Using permissions I allow these users to edit other users nodes. Using a script inside hook_node_access I make ...
user avatar
  • 892
0 votes
1 answer
34 views

How to add parent terms of a taxonomy term?

On my Drupal 9 site, I have an "Article" content type with a taxonomy reference field_tags. This field is configured so that the user can choose the appropriate term from a drop-down list. ...
user avatar
  • 1
0 votes
0 answers
26 views

Changing user edit page in custom theme using twig

I'm trying to create a custom user edit page with twig located under /user/uid. I have a custom theme and inside the templates folder I have created user.html.twig and in custom_theme.theme I've ...
user avatar
0 votes
0 answers
27 views

How do I create a block that displays nodes related to the current page?

I have a taxonomy vocabulary (Tags) with the following terms. term 1 term 2 term 3 term 4 term 5 term 6 term 7 term 8 term 9 term 10 term 11 term 12 term 13 term 14 term 15 term 16 I have an ...
user avatar
  • 11
0 votes
0 answers
19 views

Views: querying several fields and presenting aggregate values

I have a need to build a report that aggregates field values using sum and count. I am running into trouble though figuring out how to solve rows that don't map at a field. For one, the table headers (...
user avatar
  • 26.5k
0 votes
0 answers
12 views

How to get the multiple fields values update in one field on view page

i am creating one preprocess_views_view_field for specifc one field.I have 2 fields file name and news link. while need to change or get the those values are pass to field_link_text. I cant achive it ...
user avatar
2 votes
0 answers
32 views

Variations created with a queue worker sluggishly slow

The site my team is currently building is meant to import a list of all available trips for a travel booking agency. The method we settled for (for now) can be summarized as such : A daily cron job ...
user avatar
-4 votes
0 answers
36 views

3 Tier Architecture [closed]

Dears, We have an important project for when of the biggest ministries in the Gulf and we are facing difficulties to harness the power of layout builder on Drupal headless. Does anyone have experience ...
user avatar
-2 votes
0 answers
17 views

Using EJS value in twig function

I'm using the Flyout module for my drupal commerce. I'd like to use this syntaxe <%- orderItem.purchased_entity.product_id %> inside my twig function {{ getMediaUrl(THE_ID) }} How can I mix both ...
user avatar
  • 31
1 vote
0 answers
311 views

I can't import the configuration on production servers [closed]

I am unable to uninstall the MySQL module. I can't import the configuration on production servers when I upgrade Drupal from 9.3.x to 9.4.x. I get the following error. The import failed due to the ...
user avatar
0 votes
0 answers
58 views

How to set current page on webform

I have a webform setting Wizard page like this I want to know how to set current page for webform. Example after user enter input for information page, when user click next button I'll store this ...
user avatar
  • 726
0 votes
0 answers
44 views

How to display nodes that belong to the same taxonomy term as the current page?

I created a "Categories" taxonomy vocabulary with the following terms and child terms : - Crypto -- Binance -- Ledger -- Metamask - Geek -- Security -- Apple ... The "tags" ...
user avatar
  • 33
0 votes
0 answers
40 views

Docksal mysql issues

I have a couple docker/docksal projects on my Macbook M1. Today, MySql issues prevent either from being used. The one thing I did earlier was to install homebrew and the Pantheon terminus brew. But I ...
user avatar
2 votes
1 answer
49 views

Configuration import continues to list items as 'importable'

I am developing on a Drupal 9 site. I have found something a bit odd when running drush cim. There are a handful of configurations for which it DOES say there was a success, but when you run drush cim ...
user avatar
  • 1,761
1 vote
1 answer
28 views

What does scaffolding files for drupal/core do when I do a composer require <module>?

I noticed that default.settings.php files gets copied to scaffold folder: Copy [web-root]/sites/default/default.settings.php from assets/scaffold/files/default.settings.php Why is it copying this file ...
user avatar

1
2 3 4 5
24