All Questions

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

How to connect Netbeans IDE to AWS Bitnami Drupal 8 installation?

I'm hosting a Drupal 8 installation on AWS using the recommended Bitnami image. I'd like to be able to edit some of the files remotely from my computer using the NetBeans IDE. I've successfully ...
0
votes
0answers
4 views

Autofocus on select or textfield works on and off

I have set autofocus on my form element as follows: $form['product']['widget']['#attributes']['autofocus'] = TRUE; The element is autofocused intermittently, if I refresh page 10 times it works for ...
-1
votes
0answers
5 views

What is the alternative phone_countries() ,and valid_phone_number()

in my custom d7 code i was used this line of code $form['extra']['multicountry'] = array( '#type' => 'checkboxes', '#options' => phone_countries(), foreach ($country_keys as $...
0
votes
1answer
8 views

user deletion : user_cancel_reassign not working when user has more than 10 associated contents

I am attempting to suppress Users with no permissions/roles from our sites. The user associated contents should be kept on user deletion. This code below works when the user has a few associated ...
0
votes
0answers
9 views

Get the first letter of each word in a string in twig [closed]

is there simple we can get Get the first letter of each word in a string I google it and found an answer for PHP not for twig. PHP answer link that what I want in twig Click here {% set string = "...
0
votes
0answers
7 views

Exract all node field values to json including reference entities with value

I am writing a module to export drupal's content to another platform, the module provides a UI to manage content types and their fields to be shared on another platform via API. So far i have managed ...
0
votes
0answers
5 views

How to decode base64 image using pre save hook?

I am uploading image using jsonapi. But here the data is base64 format (As per requirement). Uploading to media entity. So I need to write a hook media entity pre save so that file uploaded should be ...
1
vote
1answer
13 views

Symfony\Component\HttpFoundation\Response is never cached

My custom controller is returning data but it is never being cached. My controller function: use Symfony\Component\HttpFoundation\Response; $build = [ '#theme' => 'search_form_suggest'...
0
votes
1answer
12 views

Delete Query Syntax

I am trying to write queries in drupal 8 , I know that I must use the delete() function , however just for testing on my draft I tried the following query and it worked : $connection = \Drupal::...
0
votes
1answer
15 views

How to alter an existing breadcrumb link programmatically?

I am trying to alter the 'Home' Breadcrumb link using hook_system_breadcrumb_alter() The default Breadcrumb class allows you to add New links using the addLinks method. However it does not allow one ...
-2
votes
0answers
10 views

Autofill drupal field in edit page

I am not sure if this was posted earlier, but I would be specific and conscise. I am writing a Drupal module to store post meta in the "Node edit" page field. Just basic field, in node edit ...
0
votes
0answers
9 views

How to aggregate values from fields in Paragraphs based on value of another field in that same paragraph, and display in an aggregated Views table?

Hopefully my title makes sense... I am setting up a Drupal 9 website for internal use as a financial reporting engine and a CRM. I am making use of the following modules: Paragraphs Views Viewfield ...
-1
votes
0answers
9 views

Site does not update on mobile devices

I have a site built in Drupal 7. It is using leaflet to plot GPS advancements in real time. On laptops and desktops I have to refresh the browser (any browser on Mac/Linux/Windows) to see the updates. ...
0
votes
0answers
5 views

Book node entity to set child nodes access permissions

I'm working on a simple permissions module for books. This module should make a book with its child nodes private. The toplevel content type is called reader than I have a child content type edition ...
-2
votes
0answers
12 views

How to style the webform submission pdf

I want to style the webform submission pdf files. I want to add a logo and a footer, also I would like to change the font. But I have no idea how to do this, so I need help for this issue.
0
votes
0answers
6 views

How to calculate two taxes for the same product?

Spanish taxes depends on the product but also on the customer. A product could have one of this taxes: normal (21%), reduced (10%) and super-reduced (4%). This is managed by a field on the variation ...
-5
votes
0answers
12 views

How can I start a test series in my website? [closed]

Please help me and tell me about how to start the test series or any best plugin that is suitable for it. My requirement is that the test is started after login. And it has a color code with total ...
0
votes
0answers
17 views

How do I add an help text icon next to a custom form element label?

I'm trying to add an information icon next to a custom form label. When users hover the cursor over that icon, it should display the label description. I know '#attributes' => array('title' => t(...
0
votes
0answers
21 views

Delete an account without showing the confirmation form

I've been working on creating a feature which allows certain non-admin but higher-than-user roles within a Drupal 8.8 system to delete users from the system. In essence, only admin and 'moderator' ...
-1
votes
0answers
11 views

JSON format missing

I'm using D7 with Services module. I have discovered recently that the JSON format on live server is not "rendered" differently: I don't know what has changed there, but the JSON output on ...
0
votes
0answers
36 views

Why does my custom block disappear after page reload?

I have created a custom block with a custom module (Example: https://www.webwash.net/programmatically-create-block-drupal-8/). The goal is to display some external content, which is working. The only ...
-2
votes
0answers
31 views

Ajax request to API in custom block each minute

I want to display a counter on a website with a block, that refreshes every minute. I have an API where I can get the counter-value. https://myapiwebsite.com/api/checkin/getCounter?token=mytokenvalue ...
0
votes
1answer
26 views

How do I get the image path inside a jsonapi response?

I a content type for movies that includes plain text fields, and an image. The field name for the image is field_movie_poster. Using the JSON API, How do I include the image path in the request? If I ...
1
vote
0answers
58 views

Clearing Cache related to user data

Drupal's cache system is a complete nightmare causing all sorts of issues with my user sessions. To provide a couple examples Our navigation header block contains a link that takes users to a ...
0
votes
0answers
9 views

will webform work with views bulk operations?

Given a webform that submits emails sometimes the destination mailbox might not be available. As far as drupal is concerned the submission was successful. I can resubmit individual submissions. I need ...
0
votes
1answer
12 views

Pass a webform value to a node via Rules?

I have a rule that is successfully creating a node of a content type when a webform is submitted. How do I pass a value from the webform into the created node via rules? (This is a Drupal 7 site.)
-3
votes
0answers
26 views

How to create an archive containing files with the Drupal interface? [closed]

When you reserve a domain name with a host, it offers a free space of 10 MB to publish a web page (this type of offer does not support PHP). I created a small 8MB website with HTML, CSS and JS (it's ...
-3
votes
1answer
25 views

Set a default integer value with #ajax, according to a form state value in the same form

There is an integer field: "Number of pitches" Another integer field: "Maximum people allowed". These will usually be the same values. I am trying to set the value of the field ...
0
votes
0answers
27 views

Multisite doesn't work after upgrade

I have a docroot with 2 websites, both share core and contrib modules. I have 2 DB, one for default and another for subdomain. Inside "sites" folder also have 2 different folders: default ...
-3
votes
0answers
19 views

Undefined function entity_load(), entity_access() [closed]

field_widget_instance(), entity_load(), entity_access(),!drupal_static(),locale_language_list(), get_token_context, format_variables $instance = field_widget_instance($element, $form_state); ...
0
votes
0answers
12 views

Large menu management options

I have a site with about 800 pages in the main menu. When creating or editing a node, managing the menu item parent can be challenging with a select list containing so many options! I am using Big ...
0
votes
0answers
11 views

unable to load the field_media_img properly within the bootstrap style

While creating a view I would like to add {{ field_media_img }} in a <div class="card-img-top">. Therefore I created a view with 5 fields, all "exluded from display". And a ...
-1
votes
0answers
15 views

Why does the Magnific Popup not show alt or title in bottom bar?

I have an existing site built in D7. I've created a new page that displays a views based grid of images of one specific content type. When you click on an image, magnific pop-up creates an overlay ...
0
votes
1answer
18 views

Success with cookie, fails with JWT: RuntimeException: Failed to start the session because headers have already been sent

My Controller is working with cookie auth but failing with JWT. This Controller is supposed to flag an entity for the logged-in user. If I am using cookie auth, there are no errors and everything ...
0
votes
0answers
14 views

Order confirmation email with custom order fields

I have added some fields to the order type and they are completed on checkout flow. I would like to include those fields in the confirmation email but I haven't found a way to get it on the twig ...
0
votes
1answer
24 views

Views rest export does not update

I have two websites. On website 1 I have a calendar showing upcoming events. Next to a regular views page I also created a views rest export page with 6, of the most near in the future, upcoming ...
1
vote
0answers
24 views

How can I have the file upload destination private by default?

Currently Webform file component uses public files as default upload destination. This is probably because private files path is not always available if not configured in Drupal settings correctly. ...
0
votes
1answer
10 views

JSON:API error unprocessable entity status 422 entity_id this value should not be null

I'm trying to post a flag with JSON:API but I'm getting the following error: "errors": [ { "title": "Unprocessable Entity", "status": "...
1
vote
1answer
29 views

Is there any way to show a “computed field” value in edit mode?

I have a content type (Structure) to which I added a text computed field. In a module I added the following code. function computed_field_field_reference_compute($entity_type_manager, $node, $fields, $...
0
votes
0answers
8 views

field widget form element not updating #attributes via #ajax callback

I am trying to do a simple update to a form element in my field widget, I have a start and a end dates in the field widget and I need the start date to be the min date of the end date, so I call an ...
0
votes
1answer
28 views

hook_views_query_alter() not working?

Very new to web development and even newer to Drupal, and I have some questions that I would really appreciate if anyone could answer! Here's my yml file, [Site name] is actually just the name of our ...
0
votes
1answer
19 views

Error trying to submit webform programatically multiple times: Duplicate entry for key 'PRIMARY'

I'm trying to programatically send submissions to a webform n times, but when I submit the submission info to the webform for the second time, I get an Integrity constraint violation: 1062 Duplicate ...
1
vote
1answer
33 views

How do I download a form table in CSV or Excel format? [closed]

I have a form whose class extends FormBase. The form has a table that gets populated with information. Basically I'm trying to download the table into a CSV or Excel file. I've seen some old posts for ...
0
votes
1answer
27 views

I'm attempting to render responsive images and control art direction. Could somebody see whyI can't get breakpoints.yml to be respected?

I'm creating a title/ hero-image section that consists of two 50/50 columns at desktop but then stacks at about tablet (e.g. 1024px) I’m using a custom twig template for this content type. I want ...
0
votes
0answers
22 views

JS File's `attach` method not always executed when loaded through block template

We are using a custom barrio sub theme and have some JS files we attach to our template files using the {{ attach_library('custom_barrio/my_js_library') }} line at the top of our twig templates. ...
0
votes
2answers
111 views

OO way of adding base field definitions

Is there any object oriented Drupal way to add a base field definition to an existing entity? Of course I am familiar with hook_entity_base_field_info(), but I am trying to keep my .module file size ...
0
votes
0answers
31 views

“drush updatedb” failes with “The provided host name is not valid for this server”

I run my site with Drupal 9.1.6 on Strato Webhosting. The site is well accessible via Webbroser either under mydomain.tld or www.mydomain.tld. I can perform a database update running update.php, but ...
0
votes
0answers
30 views

Issues with Domain Access module

Using Drupal 8.9.13. I cannot seem to make the site I am building functional with the Domain suite of modules installed. Symptoms: After installing and enabling the Domain module, the site generates a ...
1
vote
1answer
23 views

How to add template suggestions for form elements of a certain form ID?

I'm looking to edit some Twig templates for certain form elements, but I need template suggestions only for certain form IDs. How do I go about that? I currently have the following functions in my ....
-2
votes
0answers
13 views

Get current layout all block in custom module for block

I want all blocks detail of current layout builder block in custom module for block. I want to checkbox for all current block in my custom block. I want this functionality in public function blockForm(...

15 30 50 per page
1
2 3 4 5
1689