How to change the image style for image preview in node-add/edit form?

How to change the image style for image preview in node-add/edit form?

IN a related question, “How to set image style for media browser in node edit form?” one response noted that “Once you have chosen the image and clicked save and the overlay is closed, images are display in the “Media thumbnail” image... read more
How to change the image style for image preview in node-add/edit form?

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 to change the image style for image preview in node-add/edit form?

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 change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

"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

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
How to change the image style for image preview in node-add/edit form?

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 change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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 change the image style for image preview in node-add/edit form?

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 change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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 to change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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 change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

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
How to change the image style for image preview in node-add/edit form?

Update command won’t work for multisites

I have a Drupal 7 site with a half-dozen multisites/subsites and I am trying to setup Drush so that I can run my modules updates from the command line for the subsites. Running Drush for the main site works fine. Running Drush for ONE of the sub sites works fine.... read more