- Issue created by @aaron.ferris
- π©πͺGermany Anybody Porta Westfalica
I think this is a major issue because it has risky and unexpected results. I agree only the actual content / latest revision should be touched here. Could you prepare a MR with a fix?
Is the result the same with MR!1 from here: π Errors on search-only for deep-nested paragraphs Needs review ?
- π¬π§United Kingdom aaron.ferris
I can prepare a MR sure, I implemented something for my use case, may not necessarily suit the wider module at this point but happy to showcase something thats working for me.
- πΊπΈUnited States smustgrave
@aaron.ferris did the linked issue resolve the problem? Wonder if this is a dup.
- π¬π§United Kingdom aaron.ferris
Ill definitely check it out @smustgrave - thanks, if not ill add the patch ive been using on a project that seems to resolve the issue for me... ill hopefully get some time over the holidays to have a proper look.
- π¬π§United Kingdom aaron.ferris
OK, managed to have a look at this - I don't believe this issue exists on 2.0.x
1. Drupal 10.3
2. Scanner 2.0 beta
3. ERR 1.12
4. Paragraphs 1.18No patches.
- Enable scanner, ERR, paragraphs
- Add a new paragraph with a single plain text field
- Add a Paragraphs field to the basic page content type, configure to allow the new paragraph
- Add a new basic page
- Add a paragraph, use 'old paragraph value' as the plain text field value
- Save the node
- Edit the node
- Remove the paragraph, add a new one
- Use 'new paragraph value' as the field value
- Search for 'old paragraph value' in scanner
- Expected: No results
- Actual: No results
- Search for 'new paragraph value' in scanner
- Expected: 1 result
- Actual: 1 result
Ill setup with 1.x as well just to reconfirm that it still exists there.
- π¬π§United Kingdom aaron.ferris
I can confirm the general approach from https://www.drupal.org/project/scanner/issues/3196119 π Errors on search-only for deep-nested paragraphs Needs review does indeed resolve this issue and it follows a very similar approach to the patch I am using on a project (essentially a method to check if the found paragraph has a parent). I think we can close this as a duplicate.
1. Drupal 10.3
2. Scanner 2.0 beta
3. ERR 1.12
4. Paragraphs 1.18Approach from https://www.drupal.org/project/scanner/issues/3196119 π Errors on search-only for deep-nested paragraphs Needs review
1. Setup as above
2. Add a new paragraph with a string field
3. Add a paragraphs field to the basic page content type, allow references to the new paragraph
4. Add a new basic page
5. Use 'old paragraph value' as the string
6. Save
7. Edit this node
8. Remove the old paragraph, add a new one, use 'new paragraph value' as the field value
9. Save
10. In scanner, search for 'old paragraph value'
11. Expected: 0 results
12. Actual: 0 results
13. Search for 'new paragraph value'
11. Expected: 1 result
12. Actual: 1 result