How to count the number of votes for each star in fivestar?

How to count the number of votes for each star in fivestar?

I’m using Drupal 7, Voting API and Fivestar. I try to count the number of votes for each star, and display the percentage, like : It is at present possible to have only the number of total vote. How can I achieve this? With Voting API... read more
Migrating revisions from external data source

Migrating revisions from external data source

We are trying to migrate content from an external data source into Drupal 8 using the core migrate modules. This is a stripped down example of the data being migrated: id resourceId articleId version title body... read more
Migrating revisions from external data source

Access MailChimp forms

I currently have a form that it is fully loaded from my Mailchimp Account. I configured it for display as a page using mailchimp configuration page (admin/config/services/mailchimp/signup). Then when I was trying to access it with no admin permissions I got Not... read more
How to resolve the 403 error when creating a new node via RESTful module?

How to resolve the 403 error when creating a new node via RESTful module?

I’m trying to create a new node through REST on Drupal 8 with no success and a 403 (Forbidden) error. I’m using REST UI module to enable permissions with the following config for Content resources: GET authentication: basic_auth formats: hal_json, json... read more
Migrating revisions from external data source

How to change DateTime field value on form submit

I am trying to update a DateTime field in an altered form submit. Something like: php function my_module_form_submit($form, FormStateInterface $form_state) { if (!$profile->field_someother_field->isEmpty()) { $date = new DrupalDateTime();... read more
Migrating revisions from external data source

Angular application and Drupal services

I am creating an Angular application using headless Drupal. I am using Drupal services module for web services. I am trying to implement login mechanism in this app. Login is working fine but to handle authenticated requests, it is necessary to use... read more
Migrating revisions from external data source

#states and #ajax are not working on pop up

I need to get form only with HTML. To do this, I’ve used delivery callback in hook_menu(). This is my sample code: function test_menu() { $items[‘htmlform’] = array( ‘access callback’ => TRUE, ‘page callback’ =>... read more
Migrating revisions from external data source

Setting the default value of an entity form radio button using hook_form_FORMID_alter

I have written a custom Drupal 7 module which needs to set the value of a radio button of an entityform based on a value queried from the database. I have tested hook and it is working as i am able to set a text field with in the form using:... read more
Migrating revisions from external data source

how to get all options values of simple hierarchical select in drupal $form?

i have writed this code to unset empty terms : function shs_selective_form_alter(&$form, &$form_state, $form_id) { if ($form_id == ‘views_exposed_form’ && $form[‘#id’] ==... read more
Migrating revisions from external data source

Where is the Migrate UI page?

In Drupal 8.2.x there is the new migration UI tool. I’ve enabled it, but I can’t find any link going to any UI page. Back in Drupal 7 when you enabled a module, it would have a configure link next to the module name in the modules page, but Drupal 8... read more
Migrating revisions from external data source

Installing a New Site with Drush and Ansible

I’m trying to create an Ansible Role to run on a VM that creates a new site (so my colleagues don’t have to memorize the drush si –db-url command and automate the entire process. I’m running into a problem where the drush si command is getting... read more
Migrating revisions from external data source

How to display more than 10 items in link widget autocomplete?

This is a question about the Link module. Since with the Link module you can enter external or internal links both, we strongly rely on it. Unfortunately the number of items to be displayed from its autocomplete field is limited to 10. We have a lot of nodes with... read more
Migrating revisions from external data source

How to remove custom block parent div’s?

I have created custom block in my custom module. I have created block template file into module templates folder. Custom block content coming successfully as per given in block__MODULENAME__dummmy_xyz.tpl.php file. I have only added following code into my block tpl... read more
Migrating revisions from external data source

How to add domain access to custom entity?

Trying to do this for a custom entity, but it seems like Domain Access doesn’t have its own entity to reference, and I’m not quite sure what method to use. I’m still looking into it, but since I couldn’t find a question on it yet, I thought... read more
Migrating revisions from external data source

Which alias do I use to run it with another PHP version?

The Server available for our new Drupal project uses an old PHP CLI Version by default. But I have setup an alias in .bash_profile like so: alias php7=/path/to/php7 and that is working fine. I would like to use Drush, so I cloned the repository, such that I can use... read more
Migrating revisions from external data source

How do I translate view’s page path alias?

I’m able to translate views titles and menus thanks to config_translation core module. I would like to have path aliases translated as well but it seems to lack this feature. Any other way to do it? read more
How to show translated taxonomy terms in term listing in content listing style

How to show translated taxonomy terms in term listing in content listing style

I have question about translation of taxonomy terms in Drupal 8. Let’s assume this configuration: New created vocabulary, vocabulary language – not specified, terms language – not specified, show language selector, enable translation. With this... read more
Migrating revisions from external data source

Show AJAX throbber during AJAX call

I created custom module to make simple Ajax call. This module looks like this: <?php /** * Implements hook_menu(). */ function module_ajax_contact_menu() { $items[‘node/get/ajax/%’] = array( ‘page callback’ =>... read more
Migrating revisions from external data source

Blank screen with no error messages on new server

I have a working Drupal 7 site, built with git, running on 2 different servers, one test server and one server used for staging and production sites. So I know that the site is working. So after deciding to move the production and staging sites to a new Apache server... read more
Migrating revisions from external data source

Image path all 404 after move my remote site to localhost

I just moved everything from my remote Drupal site to localhost (C:xampphtdocsfolder). All links (content images, menu links) are shown like http://localhost/sites/default/files/inline-images/magento.png when it should be... read more