Problem/Motivation

As per the current implementation is_last_revision processor only works for nodes

Refer: https://git.drupalcode.org/project/search_api_revisions/-/blob/8.x-1.x/s...

Steps to reproduce

Enable this processor and try to index any custom or other entity than nodes, it fails.

Proposed resolution

Replace line 102:
->condition('nid', $entity->id())
with
->condition($entity->getEntityType()->getKey('id'), $entity->id())

CommentFileSizeAuthor
#2 3209067-2.patch628 bytesgaurav_drupal
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Gaurav_drupal created an issue. See original summary.

gaurav_drupal’s picture

Assigned: gaurav_drupal » Unassigned
Status: Needs work » Needs review
StatusFileSize
new628 bytes

Provided the patch, please review

mkolar made their first commit to this issue’s fork.

mkolar’s picture

Hi, trying to merge this but somehow features here for auto create form+mr does not work, MR is empty.. can you create proper MR with all your changes (ideally both issues together)? we tested your patches and its OK! Let me know if you can do this and thank you!

lekes made their first commit to this issue’s fork.

mkolar’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.