v2-hub icon indicating copy to clipboard operation
v2-hub copied to clipboard

Related data not shown in CP search results

Open skauk opened this issue 6 years ago • 7 comments

Describe the bug When you have a custom column defined for a collection which references related collection entry it won't display in search results.

To Reproduce Steps to reproduce the behavior: Let's say we have two collections: Books and Authors. Each Book entry has a collection field that references a single Author entry. In folder.yaml for Books you have something like:

columns:
  - title
  - author.title

This will display the title of the author related to the Book entry. Once you start searching this Book collection this column will disappear.

Expected behavior Display related data in search results.

Environment details (please complete the following information): Latest Statamic (2.11.16)

skauk avatar Dec 23 '19 10:12 skauk

I've came up with a fix for this. It'd be great if that was added. Here's the patch:

show-additional-columns-with-search.patch.zip

skauk avatar Apr 18 '20 07:04 skauk

@jasonvarga Any comment on this? I have additionally implemented search by related fields. Can imagine that could be useful for many.

skauk avatar Apr 21 '20 10:04 skauk

@rcknr thanks for the fix! how come no one from the official side is taking care of this?

marcusand avatar Aug 17 '20 11:08 marcusand

I think officially everyone has moved on to v3. From what I've seen so far, however, v3 has some of these type of shortcomings as well.

skauk avatar Aug 17 '20 11:08 skauk

I see...we just bought some licences for v2 and seeing that it is not really supported anymore is a bummer

marcusand avatar Aug 18 '20 16:08 marcusand

The upgrade to v3 is 100% free if you just bought v2. Also, v2 is still supported, but at this point really only security/critical fixes.

jackmcdade avatar Aug 18 '20 16:08 jackmcdade

ah all right, thank you

marcusand avatar Aug 19 '20 08:08 marcusand