


Prevent Quick Editing on certain DOM elements
I want to enable quick edit within a block which contains some JS libraries (such as slick). As slick changes the DOM, when I use quick edit it saves this altered DOM and then the slick library doesn’t work. Simplified example: Saved HTML (pre-page load) <div... read more
How to add currency field?
With respect to the question, can anyone suggest a remedy for the same. How can I create a field for currency(with selecting currency and text field to enter the amount) considering the fact that there are multiple currencies. I have tried adding prefix but it can... read more
Migration from source YML: implode all values of each array element nested inside an parent array
We are trying to pull in some data from an outside source that serves JSON. The structure of said json is like this: [ { “name”:”something”, “desc”:”some kind of desc.”, “tags”: [ {... read more
Preview template for node with custom template?
I have a custom content type, ‘Article with Header’ for which I have a custom twig template, ‘page–article-with-header.html.twig’, which manages the layout for this content type. When I preview the node before publishing, the template... read more
Adding HTML class attributes to Entity Reference field links in View
I have a view (“Tasks”) that pulls in Task nodes, complete with sorting and filtering. Each Task can have multiple nodes attached via the “Related Articles” field (field_related_articles). I am trying to loop through each node (which can be a... read more
Custom form validation is missing
I have a registration form : <div class=”register-error” id=”register-error”>{{ form.status_messages_user_register_form }}</div> <div class=”row”> <div class=”col-sm-6″>{{ form.field_first_name... read more
Pass custom variable to block.html.twig
I have a customer who requires the correct set of responsive classes for his block in a given theme depending on its position and count. In my theme_preprocess_page(&$vars) I can identify the blocks in this region and build up an array for each block using its... read more
How do I keep data without using sessions
Is there a way to store data for separate users in Drupal without using sessions. I have previously used Drupal varibales. But it didin’t work because the variable gets updated for every user (So whenever I access the variable it shows the last users details). I... read more
Why does js click function run multiple times?
I’m creating some accordion functionality for fields and paragraphs using a combination of twig templates and a custom JavaScript file. Everything prints as expected and the basic accordion functionality works; however, the click function script is running... read more
embed photo album hosted on flickr.com using flickr module not showing photo album
I am attempting to use the Flickr module flickr-8.x-1.0-alpha2 along with Flickr API and Colorbox module to display a album of recent photos from Flickr.com. I have setup the API keys. and added flickr setings in Text formats and editors, but the it doesnt producing... read more
REST GET ResourceResponse returns encoded json
I have a decoupled drupal project with an angular 5 front end that is utilizing a restful api to store data. Because this API needed a key that we didn’t want to expose we have created a restful endpoint in the Drupal code that acts as a sort of proxy. The front... read more