


Add a conditional CSS class to the label of the view exposed form
I try to add a CSS class sr-only to the label of my Views exposed form. In form-element-label.html.twig I added: {% if title is not empty or required -%} <label{{ attributes.addClass(classes) }}>{{ title }}</label> {% elseif title[‘#markup’] ==... read more
Set Default Value of User Entity Reference to logged in user
I have a Drupal 8 installation that has a user reference field and I would like the currently logged in user to be the default value for the field. I believe in Drupal 7 I would’ve used the [current-user:name] Token for this. That functionality didn’t seem... read more
Additional old_XXXXXXtaxonomy_term__field_XXX Tables after upgrading
After Upgrading from Drupal 8.6 to 8.7 I have tons of new (garbage?) tables in the database. The naming schema for the tables is old_XXXXXXtaxonomy_term__field_XXX Is there a drush command to remove them or can i just drop dem directly? I tried drush eval... read more
Templates aren’t called in custom module?
I am trying to add templates for the paragraph in the custom module. It invokes only the paragraph.html.twig. In theme suggestion, paragraph–example-ch-hero-panel.html.twig is given. I am using the same templates. By default, The template will be taken for the... read more
GraphQL query not returning data
I have 5 different content types and I’ve added content / nodes. I’m using graphQL to fetch the data, however in 1 of the content types the data is not being returned. This is the latest content type I’ve added, so I can query data from all 4 other... read more
How do I pass a response from a Webform custom handler back to Drupal to display on the confirmation page
I have created a custom module for a custom Webform handler. The custom handler submits to an external SOAP api. There are various response options that are received back from the SOAP api that currently I am printing to screen (for testing purposes). But when using... read more
CKeditor stripping allowed style attribute
I’ve installed Colorbutton to my Drupal 8 site. I have enabled the button for Full HTML and For Basic HTML I have allowed the attribute <span style> in the Basic HTML allowed attributes area. I have defined a set of hex value colors. When I edit a page the... read more
Why isn’t my custom Form API #states applied in my webform yaml editor working?
I have the need to set visibility state of a checkbox option in one question (Table checkbox select) based on the value of another checkbox in the same table. I also have other scenarios where I would need same functionality but across different questions in the same... read more
Use generated JWT from Keycloak to authenticate user using REST API
We are working on developing a mobile app and users should be able to log in to the app and in our backend Drupal site authenticated from Keycloak. Our main goal is that the user would be able to login from the app to update/create content using REST api. We will be... read more
HTTP Client Manager $request->getStatusCode() == 200 return?
When I read this HTTP Client Manager docs on Drupal, I don’t understand why it returns the $build when $request->getStatusCode() == 200, is that supposed to be not equal 200? I also copy and paste the code from Drupal docs. public function posts($limit,... read more
Webform dynamic select options based upon another element’s state
Say there are two select elements with dynamic options (via an options alter hook, sourced from an external resource): A and B. There is also a datasource that provides a relationship that determines the options in B that should shown when a particular selection in A... read more
Drupal 7 Docker container solution for Azure App Service
Did you know that you can run Drupal in a Linux container on Azure App Service? This is possible using the Web App for Containers flavor of the App Service resource type. This may be an attractive Drupal hosting alternative if: Your company (or customer) already has... read more
jsonapi Cross-Origin Read Blocking (CORB) blocked cross-origin response in vue
I got the data with postman in json:api at drupal. But I has error of CORB in Vue-resource.get() with code blew: data(){ return{ cyclePic:[], rootUrl:this.$http.options.root, header:{headers:{Accept:’application/vnd.api+json’,... read more
How can I add an AJAX callback to a checkbox?
I am using taxonomy manager module I want to add ajax callback to checkbox tree view for checkbox is checked condition but it is not working can some one please suggest me. I have modified the code like this $form[$term->tid][‘checkbox’] = array(... read more