statamic / cms

The core Laravel CMS Composer package
https://statamic.com
Other
3.7k stars 508 forks source link

Search doesn't consider taxonomy terms with localized fields #9803

Open beliven-emanuele-bertoldi opened 5 months ago

beliven-emanuele-bertoldi commented 5 months ago

Bug description

How to reproduce

Logs

No response

Environment

Statamic 4.52
PHP 8.1
Laravel 10.8

Installation

Fresh statamic/statamic site via CLI

Antlers Parser

None

Additional details

No response

duncanmcclean commented 5 months ago

Just to clarify, are you talking about the Control Panel search or the search on the frontend with the {{ search:results }} tag?

beliven-emanuele-bertoldi commented 5 months ago

@duncanmcclean the search on the frontend with the {{ search:results }} tag

duncanmcclean commented 5 months ago

I've tried to replicate this issue locally, but everything seems to be working fine for me 🤔

Although, it's possible I'm misunderstanding the reproduction steps you provided... is this what you're doing?

  1. Creating a new category term with title & description fields in the default site.
  2. Then, on the right-hand side, clicking on another site to localize the term.
  3. Using the {{ search:results }} tag on your frontend to search for text in the category description.

In my testing site, I have a term with two localizations - English & German. The description of my English localization contains the word Coffee and my German localization contains the word Kaffee.

When I search in my English site, Coffee returns the term but Kaffee doesn't. Then, when I search in my German site, Kaffee returns the term but Coffee doesn't.

Is that accurate? Are you expecting it to work differently?

beliven-emanuele-bertoldi commented 5 months ago

Hi @duncanmcclean , thanks for your feedback!

Our use case involves the use of propagation (https://statamic.dev/tips/localizing-entries#propagation), so using untranslated (propagated) content during search on sites with different language.

So, based on your example, it would be like having the description Coffee in English and propagated as-is to German and then searching for Coffee on the german site.

duncanmcclean commented 5 months ago

Oh, you're using entries, not taxonomies?

github-actions[bot] commented 3 months ago

This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.

beliven-emanuele-bertoldi commented 3 months ago

Sorry @duncanmcclean, not sure what you mean.

Hope this could better clarify the issue.

Thanks for your support!

github-actions[bot] commented 1 month ago

This issue has not had recent activity and has been marked as stale — by me, a robot. Simply reply to keep it open and send me away. If you do nothing, I will close it in a week. I have no feelings, so whatever you do is fine by me.