Searching results not matching Replace results

Created on 6 April 2022, over 2 years ago
Updated 6 March 2024, 10 months ago

When I search for something and click the Search button, I get a page that show's all the results and tells me "Found 9 matches in 6 entities. " That is all working great.

but then if I try to use the Replace button to replace the text with something else, the results from the Replacement page does not match up with the Search from before. In this case, it says "7 entities processed. "

I have found this difference to be the case with many things I search for and then replace.

Shouldn't the number replaced match up with the number found in the Search? Otherwise, it appears that something is broken.

(It would be nice if on the Replacement page there was a log that showed where the changes were made, similar to how the Search page shows its results.)

πŸ› Bug report
Status

Active

Component

Tests

Created by

πŸ‡ΊπŸ‡ΈUnited States webphenom

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.

  • πŸ‡¬πŸ‡§United Kingdom aaron.ferris

    Im noticing a similar behaviour that seems to be related to multiple children of a particular field.

    Say for example I have a parent paragraph for a carousel, that has 8 cards (paragraphs). In those cards I have a similar string as the title for 2 of the cards.

    Search will label 1 entity found, but replace will mark 2 entities as being processed.

    I wonder if it's a mismatch when searching for child entities? The replace does work properly.

  • πŸ‡¬πŸ‡§United Kingdom aaron.ferris

    Something else that causes a discrepancy that ive noticed - nested paragraphs.

    If the structure is Grandparent (node) > Parent (paragraph) > Child (paragraph) and the string searched for is in the child, that will return 1 result, but the replace will actually = 3 (as far as I can tell).

    Logically that does sort of make sense, because when the child is saved, so must the parent and so must the grandparent. But it can be confusing to end users.

  • πŸ‡ΊπŸ‡ΈUnited States fizzgig Raleigh, NC

    Is there any potential for a fix on this anytime soon? Is there an alternative module that does something similar?

  • Status changed to Postponed: needs info 12 days ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Possible dup of https://www.drupal.org/project/scanner/issues/3441892 πŸ› Multiple string type fields on the same node require multiple replace runs Active ?

Production build 0.71.5 2024