


How to unpublish content that is under moderation
I am using the Content Moderation module in Drupal 8.2 and I have noticed there is no way to re-unpublish a node once it has been moderated into a published state. I’m able to create a new draft of the content and moderate that through to published state but I... read more
Hide a field from "Manage display"
If a field is set a hidden on Manage display, unless it’s displayed in a view, it cannot be seen anywhere on the site. Specify how fields are displayed says: Format The format column contains the options to show the field value in different formats. Hidden is... read more
User must click Back button twice after adding item in cart
I have added Drupal Commerce in an existing D7 site and I use the existing product nodes, in which I have added the Add to cart form. Everything looks nice and works fine, except for one thing. When a user adds an item into the cart and then tries to go back one step... read more
How do you redirect to an internal URL after submitting a form [closed]
I have tried to redirect after submitting. public function submitForm(array &$form, FormStateInterface $form_state) { $form_state->setRedirect(‘mymodule’); $form_state->setRedirectUrl(DrupalCoreUrl); } I get the following error. Fatal error:... read more
How to print custom date format in Twig?
How can I print a custom date format in Twig? First of all my I am trying to edit the field.html.twig of the field called field_publication_date, in that file I find this variable {{ item.content }} which prints Jun, 12/06/2016 – 12:29. This is what I have... read more
How to redirect to modal?
I use the module “Bootstrap Login Modal”. How to redirect /user/login to <a href=”#” data-toggle=”modal” data-target=”#login-modal”></a> all over the site ? read more
Get Checkbox Value From Another Form
How do i get the value of a checkbox from another form/page and how do i make it so if the checkbox is enabled, it’ll allow a button to be visible? checkbox in SettingsForm.php: $form[‘#tree’] = TRUE; $form[‘clients_enabled’] = array(... read more
How do I apply a discount for the second and successive items only if the quantity for those items is higher than 1?
Using Commerce Discount and Commerce Discount Extra modules there is no problem to set discount rule conditions for product type and quantity. This way I can set up 20% off discount that is applied for a cart line item when this line item has specific product type and... read more
Views sort criteria by date does not order properly
I have a drupal 7 site with the most recent updates to core and the views module. I am trying to build a view to show three pieces of content (training events) that should display the three most recent pieces of content, based on the date field set by the user... read more
Page redirect based on referrer
I am looking for an option to redirect user referred from a specific url (say abc.com) to domain.com/abc in Drupal 7 if http_referrer=’abc.com’ redirect to xyz.com/abc I looked at Redirect, http response headers modules but need something for... read more
Show field twice in node page
I created a custom bundle (content type) and I’ve created fields One of those field is a file type field, is a video file, stored in the private storage. I installed the videojs module to allow to watch the video. I need to show this field twice in the node... read more
Can a domain redirect work for both http and https?
Currently hosting a site on Pantheon and I would like to redirect traffic to a single domain. There is already a lot of links inside my site that are using: http://example.com/somepage, http://www.example.com/somepage, https://example.com/somepage,... read more
Esign field in Webform
I am attempting to add a signature field with validation to a webform. The validation fields show up, the signature field seems to be there (cursor changes to +) but no field for signature is there. Esign’s documentation says to ” Did you set the field to... read more
Entity reference field dependent on entity reference in referenced entity of another entity reference field
I have a content type ‘order’ with 2 entity reference fields. One is a reference to another content type ‘brand’ and the other is a reference to a taxonomy term ‘categories’. Now the content type ‘brand’ has an entity... read more
How to process html in twig file
I’ve a plain text field, where I’ve added few text in wrapped in tag. I’ve tried to get the processed html text in the twig by using {{ content.field_front_page_description|field_value }} {% set text = content.field_front_page_description|field_value... read more
How to update multiple fields using ajax?
In content type there are three field . Each field are node reference to different content. Here I want to restrict value and create dependency on these field. For example: I have one auto complete field “Country”. On change of “Country”,... read more
Need CKEditor to encode special characters
I would like CKEditor to encode all special characters. Currently it only html escapes >, <, and & I believe. I need the current html markup of this Let’s take a “ride!” to become something like this Let’s take a... read more
Image style URL does not work
I have an issue related to drupal image styles, and I am not able to fix it since last two days. Have searched and tried everything on google, but of not help. I have a drupal instance on production where all the images are stored at... read more