Document how to convert from votingapi_widgets

Created on 29 August 2023, about 1 year ago
Updated 30 December 2023, 11 months ago

Problem/Motivation

Many sites use the Voting API Widgets module, but that does not currently have a Drupal 10 version - see

For people who would like to switch to using Rate, it would be useful to document how to convert old votes etc.

Steps (work in progress)

1. Install Rate
2. Convert old votes??? here's my example for a fivestar widget

  \Drupal::database()->update('votingapi_vote')
    ->fields([
      'type' => 'fivestar',
      'value_type' => 'points',
      'field_name' => NULL,
      'rate_widget' => 'fivestar',
    ])
    ->condition('type', 'vote')
    ->condition('value_type', 'percent')
    ->condition('field_name', 'field_rating')
    ->execute();

3. Remove Voting API fields from entities
4. Uninstall Voting API Widgets

💬 Support request
Status

Active

Version

3.0

Component

Documentation

Created by

🇬🇧United Kingdom malcomio

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @malcomio
  • 🇦🇹Austria jordik

    Good idea! Will you be able to tackle this and document this a bit more in detail?
    What about the votingapi_result table? Do we need to recalculate it?
    Thank you for the efforts!

Production build 0.71.5 2024