Fivestar widget not displayed when using Layout Builder

Created on 10 August 2020, over 4 years ago
Updated 1 February 2024, 11 months ago

Problem/Motivation

Widget is not showing in layout builder. Can confirm it is showing when not using layout builder. Drupal 8 - Lightning Distro. Has anyone else had this issue?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ’¬ Support request
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡³China scottosan45

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡¦Ukraine proweb.ua

    last dev fivestar
    PHP 8.1.14
    Drupal 9.5.3

    fivestar widget not displayed in Layout Builder

  • πŸ‡ΊπŸ‡ΈUnited States tr Cascadia

    From @plach in #10:

    Layout Builder's field blocks skip any empty field, so the fivestar widget is never displayed.

    I suggest one way to avoid this is to give the Fivestar field a default value when you add it to your content type and configure it.

    I'm not sure that what LayoutBuilder is doing is correct, as it seems to be ignoring a valid field that is allowed to be empty. Perhaps at the very least LayoutBuilder should be giving you the option to skip the field, rather than just ignoring it.

  • πŸ‡¨πŸ‡³China wqmeng

    Hello,

    I test the layout builder and fivestar field on the lasted version, both empty vote and voted field, the fivestar widget do not show up.

  • πŸ‡ΊπŸ‡¦Ukraine proweb.ua

    In Layout Builder I displayed a field through the views block

  • I am not using the dev version but if anyone else comes across this like i did with layout build.
    Here is how i solved the issue:

    • must have a default value
    • Allow users to cancel their ratings.
    • Allow users to re-vote on already voted content.
    • Allow users to vote on their own content.

    why this makes it work is over my head but its a solution.

Production build 0.71.5 2024