


How can I define HTML element classes with twig pattern fields?
I want to use drupal fields to define class names in ui_patterns. i.e. define a field in a pattern twig.html file and use its {{ twig variable }} as a class name. The following doesn’t work. Is there a correct way of doing this? is it even possible? {% set... read more
Controlling a dependent field in a multi-instance paragraph
The fields below are part of the node/add node/edit forms of my custom node type. The paragraph field_para_city contain one field_city. (I later need to add other fields in the paragraph). The user can add multiple instances from field_para_city. field_city has an... read more
point a subdomain to a page without using domain module
I want to add a subdomain to my site (mysite.local) so it is, x.mysite.local and I want that to land on a custom page, i.e. a node, a view. I do not want to use the domain module because it has way more stuff that I need. Is there an easy way to do that in a custom... read more
Order receipt email content
I have a Drupal 8.6.7 site with Commerce 8.x-2.11 installed. I would like to include slightly more information in the emails sent out when customers complete the checkout process. I would like to reference both the equipment category field and a more general category... read more
Getting a formatted address component in another field’s template
I need to pull the administrative area component from an Address field and place the full text of it it in the template of another field on the content type. I’ve managed to accomplish this with the following code. In preprocess: function... read more
Add paragraphs item to user entity
I want to create a new paragraph item to a user bundle. This is the code: $name = “Test”; $userdata = user_load($user->uid); $paragraph = entity_create(‘paragraphs_item’, array(‘field_name’ => ‘field_userdata’,... read more
Update webform without composer
I need to update webform from 8.x-5.0-beta18 to 8.x-5.1 but unfortunately, I cannot use Composer because it is not possible to install it on my server due to server restrictions. This also apply to: Clientside Validation 8.x-1.0-rc3 to 8.x-1.0 Poll 8.x-1.1 to 8.x-1.2... read more
sql:sync not working
I’m using drush 9 on a remote server and I’m trying to perform a sql:sync. This is my alias: live: host: www.mysite.com paths: drush-script: ‘/home/wodby/drush-wrapper.sh’ files: files root: /var/www/html/web ssh: options: ‘-p 9191 -o... read more
Show and Tell with Agaric Cooperative
Join Agaric for Show and Tell Wednesday January 23rd from 11am – 11:30am EST (4pm GMT) Agaric friend and co-worker Rahul Baisane – Will present on building mobile apps using Drupal 8 He makes it look easy to build your mobile app with Drupal 8 – come... read more
Get delta of parent form field widget
I’ve got some form input fields in a paragraph whose visibility need to be dynamically toggled by the value of a another field. This can be done with the states API and the HOOK_field_widget_WIDGETTYPE_form_alter hook. My problem is that the paragraph is nested... read more
Views slideshow not displaying images
I created a content type with title, body, and slide (image) fields. I created a view block (format: bootstrap carousel, fields: slide). After I place the block in a region, I see the slideshow block, but I don’t see the image. I only see blank slideshow on my... read more
Import images from RSS with Feeds module without Feeds Image Grabber
I’m passing all the sites from D7 to D8 and so far so good. But one of my sites gives me a couple of problems. I was populating the RSS site in Drupal 7 using Feeds Image Grabber. Now, Feeds Image Grabber for Drupal 8 is not there. So how do I get RSS images... read more
Grant available to NGOs | HSBC Skills for Life-2019| Last Date to apply : 21st January 2019
Request for Proposal: Skill development for disadvantaged youth | HSBC Skills for Life: 2019 Dear Changemaker, The Swades Foundation in partnership with HSBC is inviting proposals from NGOs, for skills projects that have specific emphasis on empowering youth from... read more
How do I get the field definition of a paragraphs image field
I need to get the resolution of the image using getFieldDefinitions(). For normal fields I can get the field definitions with below. $fieldDefinition = Drupal::entityManager()->getFieldDefinitions(‘node’, $type); foreach ($fieldDefinition as $field_name... read more
"Broken pipe" between Nginx and PHP-FPM
On 6th January, I updated my Drupal 8 development system (composer update). The following ls listing shows the modules that were updated. drwxr-xr-x 7 drupal8 www-data 4096 Jan 6 02:36 checklistapi drwxr-xr-x 7 drupal8 www-data 4096 Jan 6 02:36 ctools drwxr-xr-x 4... read more
REST API Guzzle POST gives timeout but the same call works if I run it on the server cli
I have Drupal running in a docker container and nginx running in another container. When I do the login call through postman or directly on the webserver cli it works perfectly. But when I do call from within my application I get a timeout after 30 seconds. From... read more
Hiding menu item depending on specific access
I work on a D8 (8.6) I want to hide some item on my menu depending on route param onto this link. When I try to access the route I get a 403 error and works as expected but the the link inside the menu is still displayed. I create a custom Accessinterface which return... read more
How to change the ‘Quantity’ label in commerce-order-item-add-to-cart-form
I’m trying to modify my ‘Add to cart’ form, changing the ‘Add to cart’ button text and the ‘Quantity’ label: if(strpos($form_id, ‘commerce_order_item_add_to_cart_form_commerce’) !== false) {... read more