


HTML E-Mails are being sent out as plaintext
I am using the Swift mailer module to send HTML emails. My actual body in hook_mail_alter() is the following. <p><em><strong>New Enquiry Appear </strong></em></p> <table border=”1″ cellpadding=”1″... read more
How do I access the parameters fields of hook_mail_alter(&$message)?
I am using hook_mail_alter in drupal 8 to alter the email messages sent through contact form . How can I access $message[‘params’] fields in hook_mail_alter()? I am getting the following values with print_r(array_keys($message[‘params’]));.... read more
How to pull twitter feed in content type?
I need to create content type(twitter content ) where i can pull twitter feeds so that i can use that content type for entity reference and print the twitter feeds. Can any one please help or assist me how pull twitter feeds in custom content type? read more
"Missing configuration for parameter commerce_order"
I’m trying to define a default rule in a small module based on Commerce Price Table and Commerce Rules Extra. The rule is to set price based on the quantity of produtcs that contains a partial sku in the current order and the price table of the line item.... read more
Creating a layout with Page Manager
I’m trying to use Panels and Page Manager in Drupal 8. My current versions of each are: Page Manager: 8.x-1.0-alpha23+12-dev Panels: 8.x-3.0-beta4+41-dev My current problem is having no idea how to actually make a layout (layout_plugin is installed.) I’m... read more
Create a field collection field programmatically
Is there a way to create a field collection programmatically? I saw this code: $field_collection_item = entity_create(‘field_collection_item’, array(‘field_name’ =>’field_text’)); // Create new field collection item.... read more
How to get an export option as a pdf for views?
I am using views on my Drupal site I can able to export my view in csv, but I am not able export my views as pdf I need to export my view as pdf. Any suggestions on this it will be very helpful, Thanks in advance. read more
Redirect module does not allow redirection for existing node’s path alias
I installed fresh Drupal 8 and after that the Redirect module with proper settings. After adding the redirect rule for a path alias it does not work but it saves data properly into the database. But it works if I add internal path like node/{id}. In this case it works... read more
Display content based on URL
I am working on Drupal 8. I have a to display content from a content type on different pages. I am trying to use Views to achieve this. In the content type I added a field to refer to Pages so that I can create relation between content of content type and Pages... read more
How to place the language switch in the main menu bar?
The language switch appears on the bottom of the page. How can I move it to the main menu? read more
How to get child terms based on parent terms between two different taxonomies
I have created two vocabulary Program Topics I want to load the topics based on the program selection. It looks like category and subcategory. I created some program like java, .net, PHP and I created some topics like session (php), inheritance(java), cookie(php). So... read more
Image styles with $settings[‘file_public_base_url’]?
I deep dive in the settings.php file of Drupal 8.1 and try to configure $settings[‘file_public_base_url’]and $settings[‘file_public_path’]. All media links are correctly rewritten, that works with static files, but styles fails with 404 errors... read more
How do I call $form_state->getValue() to get as value in an array?
I created a form for a block plugin. I’m attempting to save the values to the form after submitting. However, I’m having trouble saving the values that are in an array. public function blockForm($form, FormStateInterface $form_state) {... read more
Change ID of webform hidden element
How can I change the ID of a hidden element (created with the Drupal 6 webform module) using hook_form_alter()? The ID that it outputs is something like ‘#edit-submitted-component-name’. I need the ID to be something very custom and I need to avoid... read more
Call to undefined function entity_create()
i try to include a node creation form by a field attach form. So i try to load the entity of a custom content type created by the back-office with is called ‘friterie’. But when i call the entity_create function i get this error : Call to undefined... read more
PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table
In my site, I get the following error: PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘cambodia_ohchrProduction.ohchr_cache_block’ doesn’t exist: TRUNCATE {cache_block} ; Array ( ) in cache_clear_all() (line 167 of... read more
How to get the count of referenced entity (by views entityreference result)?
For example, a student can register a class. The class node has a date field indicating whether the class is active for registering. The registration node has an entityreference field referencing to the class node. I get the referencing class nodes by using... read more
Edit CKEditor’s config programmatically
I’ve created a Drupal 8 module that adds a custom plugin to the core’s CKEditor. This plugin allows users to add tabbed content to their pages. The problem is that the plugin adds a class to the element it creates and CKEditor by default removes classes... read more