Duplicate entity error

Created on 15 December 2023, about 1 year ago

Problem/Motivation

Use this module on Contenty Type and Comment at the same time.

Steps to reproduce

I tried to use this module by adding the like_dislike field to the default Article and Page in Drupal 10 (new installation),
And I also added the field like_dislike to Comments (Drupal default in a new installation).

The problem is that sometimes the entity_id: Id of entity(content), is the same for the Node ID and for the Comment.

Create an article or page, add some users, make some comments on that article or page and then try to like them,
some of them will not work the like/dislike, and upon inspection, it will be noticed that the entity id is the same for the node and for some comment.

e.g. to like/dislike of the page and the same to some comment.

🐛 Bug report
Status

Needs work

Version

2.4

Component

Code

Created by

🇧🇷Brazil peduardo

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

Comments & Activities

  • Issue created by @peduardo
  • Assigned to samit.310@gmail.com
  • Issue was unassigned.
  • Status changed to Needs review 11 months ago
  • 🇮🇳India samit.310@gmail.com

    Hi @peduardo ,

    The issue has been fixed, please review.

    Thanks
    Samit K.

  • 🇮🇳India KumudB Ahmedabad

    In Drupal version 10.x with the 2.4.x-dev release, the like/dislike functionality for both comments and content is working as expected. I was unable to reproduce the issue in my local setup, and everything appears to be functioning correctly.

    we can close this.

    Steps to Reproduce
    To reproduce the issue, follow these steps:

    1. Create a New Drupal 10.x with the 2.4.x-dev release Installation: Or Start with a fresh installation of Drupal 10.

    2. Install the Like/Dislike Module: Use Composer to add the drupal/like_dislike module.

    3. Add Like/Dislike Field to Node Types:

    • Go to Structure > Content types.
    • For both Article and Page, add a field of type like_dislike.

    4. Add Like/Dislike Field to Comments:

    • Go to Structure > Comment types.
    • Add a like_dislike field to the default Comment type.

    5. Create Content:

    • Create a new Article or Page.
    • Add comments to this content, ideally from different users.

    I have attached a screen recording for your reference.

  • 🇮🇳India KumudB Ahmedabad
  • 🇮🇳India KumudB Ahmedabad

Production build 0.71.5 2024