Fallback and locale=all reads of a list with q search again in each other locale

Offen Anfängerfreundlich
#3,469 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
csharp

Rechercherichtung

Beginne in src/FluentCMS.Core/Localization/LocaleFallbackReader.cs ungefähr bei den Zeilen 170–180 und verfolge, wie der erste Lesevorgang die IDs auswählt und wie die anderen Locale-Lesevorgänge die Abfrage anwenden. Entferne den Suchbegriff aus diesen anderen Locale-Lesevorgängen und behalte dabei die ausgewählten IDs bei. Füge Tests für Fallback- und locale=all-Lesevorgänge mit q hinzu; fertig ist es, wenn beide Akzeptanzfälle bestehen, auch bei Locales, deren Text nicht übereinstimmt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:localization plugin type:bug

Problem

LocaleFallbackReader.ReadAsync (src/FluentCMS.Core/Localization/LocaleFallbackReader.cs, around lines 170-180) reads the other locales of a page with query with { Filter, Sort, Page, Cursor, Select, Populate, Locale, Fallback }, and keeps query.Search. So every fallback or locale=all read of a list with q asks the search index again in each other locale, once per batch, although the ids are already chosen.

  • ?q=merger&locale=de with a de → en fallback, where the entry's en text lacks "merger": the empty de fields are not filled from en.
  • Under locale=all, the locales whose text lacks the word are missing from the entry's map.
  • Each such read is cut at MaxSearchResults again, outside the searchTruncated flag of #3302.

Proposal

Drop the search (Search = null) from the reads of the other locales, since the ids are already chosen by the first read.

Acceptance

  • A fallback read of a list with q fills the fields from the fallback locale whether or not its text matches
  • A locale=all read of a list with q returns every locale of each entry it lists
  • Tests for each

Found in the review of #3468. Bundle 12, with #3376.

Vorherrschende Sprache
C#
Sterne
567
Forks
107
Ø Merge
1 Std. 19 Min.
Gemergte PRs (30 T.)
353

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus fluentcms/FluentCMS

Alle Issues in fluentcms/FluentCMS

Ähnliche Issues

Weitere Issues zu C#

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.