fix: remove redundant query= param from filter-specific metadata links on TFE page

Clicking orientation, AP program, finality, year, format, or keyword links
on the TFE page was passing both a dedicated filter param AND a query=
param. The query= text search doesn't look at the filter columns
(orientation, ap_program, etc.), so the AND combination yielded zero
results when the filter value didn't appear in title/authors/etc fields.

Also fix the language link: it was passing language as query= which
searches only title/authors/etc, not the languages column. Now uses
the dedicated language= param (DB layer already supported it, and
collectSearchParams now collects it).
This commit is contained in:
Pontoporeia
2026-07-10 17:20:21 +02:00
parent 14c21586c5
commit 6e1d54511d
6 changed files with 21 additions and 17 deletions
-1
View File
@@ -770,7 +770,6 @@
/* ── Collapsible filter controls ─────────────────────────────────── */
.search-filters-toggle {
flex-shrink: 0;
border-bottom: 1px solid var(--border-secondary);
}
.search-filters-summary {
+8 -8
View File
@@ -13,7 +13,6 @@
.tfe-content-row {
display: grid;
grid-template-columns: 49vw 1fr;
/* gap: var(--space-xl); */
width: 100%;
height: 100%;
min-height: 0;
@@ -24,6 +23,8 @@
overflow-y: auto;
min-width: 0;
padding: var(--space-xl) var(--space-m) var(--space-xl) var(--space-m);
padding-right: 0.5ch;
gap: 1ch;
}
.tfe-right-column {
@@ -34,13 +35,6 @@
padding: var(--space-xl) var(--space-m) var(--space-xl) var(--space-m);
}
/* Left column: stacks author, title, meta, synopsis — scrolls independently */
.tfe-left-column {
gap: var(--space-m);
/* to space the edge of the text and the scrollbar */
padding-right: 0.5ch;
}
/* Files container inside right column — flex kept for PDF expand-to-fill behavior */
.tfe-files {
display: grid;
@@ -555,6 +549,7 @@ body.pdf-viewer-open {
.tfe-left-column,
.tfe-right-column {
overflow-y: visible;
padding: var(--space-3xs);
}
.tfe-title {
@@ -569,6 +564,11 @@ body.pdf-viewer-open {
height: auto;
min-height: unset;
background: color-mix(in srgb, var(--accent-secondary) 92%, #000 8%);
border: none;
border-radius: 0;
}
.pdf-toolbar {
border-radius: 0 0 var(--radius) var(--radius);
}
.tfe-file-iframe {
@@ -1018,7 +1018,7 @@
var input = document.getElementById("tfe-files-input");
console.log(
"[pt-relink] looking for input | inputId=tfe-files-input | found=" + !!input,
`[pt-relink] looking for input | inputId=tfe-files-input | found=${!!input}`,
);
var closeModal = () => {
var modal = document.getElementById("peertube-relink-modal");
+3
View File
@@ -356,6 +356,9 @@ class SearchController
if (!empty($_GET['keyword'])) {
$params['keyword'] = (string) $_GET['keyword'];
}
if (!empty($_GET['language'])) {
$params['language'] = (string) $_GET['language'];
}
return $params;
}
+7 -7
View File
@@ -18,28 +18,28 @@
<?php if (!empty($data["orientation"])): ?>
<p class="tfe-meta-item">
<span class="tfe-meta-label">Orientation&nbsp;:</span>
<a href="/search?orientation=<?= urlencode($data["orientation"]) ?>&query=<?= urlencode($data["orientation"]) ?>"><?= htmlspecialchars($data["orientation"]) ?></a>
<a href="/search?orientation=<?= urlencode($data["orientation"]) ?>"><?= htmlspecialchars($data["orientation"]) ?></a>
</p>
<?php endif; ?>
<?php if (!empty($data["ap_program"])): ?>
<p class="tfe-meta-item">
<span class="tfe-meta-label">Atelier pluridisciplinaire&nbsp;:</span>
<a href="/search?ap_program=<?= urlencode($data["ap_program"]) ?>&query=<?= urlencode($data["ap_program"]) ?>"><?= htmlspecialchars($data["ap_program"]) ?></a>
<a href="/search?ap_program=<?= urlencode($data["ap_program"]) ?>"><?= htmlspecialchars($data["ap_program"]) ?></a>
</p>
<?php endif; ?>
<?php if (!empty($data["finality_type"])): ?>
<p class="tfe-meta-item">
<span class="tfe-meta-label">Finalité&nbsp;:</span>
<a href="/search?finality=<?= urlencode($data["finality_type"]) ?>&query=<?= urlencode($data["finality_type"]) ?>"><?= htmlspecialchars($data["finality_type"]) ?></a>
<a href="/search?finality=<?= urlencode($data["finality_type"]) ?>"><?= htmlspecialchars($data["finality_type"]) ?></a>
</p>
<?php endif; ?>
<?php if (!empty($data["year"])): ?>
<p class="tfe-meta-item">
<span class="tfe-meta-label">Date&nbsp;:</span>
<a href="/search?year=<?= urlencode($data["year"]) ?>&query=<?= urlencode($data["year"]) ?>"><?= htmlspecialchars($data["year"]) ?></a>
<a href="/search?year=<?= urlencode($data["year"]) ?>"><?= htmlspecialchars($data["year"]) ?></a>
</p>
<?php endif; ?>
@@ -69,7 +69,7 @@
<?php
$langs = array_map("trim", explode(",", $data["languages"]));
$langLinks = array_map(
fn($l) => '<a href="/search?query=' . urlencode($l) . '">' . htmlspecialchars(mb_strtolower($l)) . '</a>',
fn($l) => '<a href="/search?language=' . urlencode($l) . '">' . htmlspecialchars(mb_strtolower($l)) . '</a>',
$langs,
);
echo implode(", ", $langLinks);
@@ -83,7 +83,7 @@
<?php
$fmts = array_map("trim", explode(",", $data["formats"]));
$fmtLinks = array_map(
fn($f) => '<a href="/search?format=' . urlencode($f) . '&query=' . urlencode($f) . '">' . htmlspecialchars(mb_strtolower($f)) . '</a>',
fn($f) => '<a href="/search?format=' . urlencode($f) . '">' . htmlspecialchars(mb_strtolower($f)) . '</a>',
$fmts,
);
echo implode(", ", $fmtLinks);
@@ -97,7 +97,7 @@
<?php
$kws = array_map("trim", explode(",", $data["keywords"]));
$kwLinks = array_map(
fn($k) => '<a href="/search?keyword=' . urlencode($k) . '&query=' . urlencode($k) . '">' . htmlspecialchars(mb_strtolower($k)) . '</a>',
fn($k) => '<a href="/search?keyword=' . urlencode($k) . '">' . htmlspecialchars(mb_strtolower($k)) . '</a>',
$kws,
);
echo implode(", ", $kwLinks);