Pages with categories request listings.json, which 404s when the site has no listing
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- Medio día
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- javascript, typescript
Línea de trabajo
Start with findAndActivateCategories() in quarto.js and updateGlobalListingIndex() in src/project/types/website/listing/website-listing-index.ts; compare the website and standalone rendering paths described in the issue. Check how the script determines whether listings are available and how the index is written. Done means pages with categories and no listings make no failing listings.json request in either case.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
I have:
- searched the issue tracker for similar issues
- installed the latest version of Quarto CLI
- formatted my issue following the Bug Reports guide
Bug description
When a page has categories in its title block, quarto.js fetches listings.json to turn the categories into links to a listing (findAndActivateCategories()).
If no listing exists, that file is not there, so every such page makes a request that returns 404 and logs an error in the browser console.
Rendering is not affected, because the script only reads the response when the status is 200.
This happens in two places:
- A website with no listing page.
updateGlobalListingIndex()insrc/project/types/website/listing/website-listing-index.tsonly writeslistings.jsonwhenlistingPaths.length > 0. - A standalone HTML document with
categories. The fetch runs here as well, againstlistings.jsonnext to the document.
For websites, writing listings.json every time (as [] when there are no listings) would remove the 404.
The standalone case would need the script to know whether listings exist before it fetches.
This is mostly cosmetic.
Steps to reproduce
A website with no listing:
# _quarto.yml
project:
type: website
website:
title: "Repro"
---
title: "Home"
categories: [one, two]
---
A page with categories, in a website with no listing.
A standalone document:
---
title: "Standalone"
categories: [one, two]
format: html
---
A standalone document with categories.
Render each one, serve the output over HTTP, open the page and look at the network panel and the console.
Actual behavior
Both pages request listings.json, get a 404, and log Failed to load resource: the server responded with a status of 404 (Not Found) in the console.
Expected behavior
No request for listings.json when there is no listing to link to, and no console error.
Your environment
- OS: macOS 27.0.1.
- Browser: Chromium (Brave), headless.
Quarto check output
Quarto 99.9.9
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.10.0: OK
Dart Sass version 1.101.0: OK
Deno version 2.9.8: OK
Typst version 0.15.1: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 99.9.9
commit: 6f81421488bde28d87cee51c9988e666bc09f7be
- Lenguaje dominante
- JavaScript
- Estrellas
- 6.1k
- Forks
- 478
- Merge medio
- 17 h 36 min
- PR fusionados (30 d)
- 139
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de quarto-dev/quarto-cli
-
enhancement good-first-issue localization
Dificultad 2/5 1-2 días Aptitud para principiantes 76/100
quarto-dev/quarto-cli#15289 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug engines-jupyter
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
quarto-dev/quarto-cli#15281 ·
Los mantenedores suelen responder en 1 día
-
enhancement localization
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
quarto-dev/quarto-cli#15268 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
html maintenance
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
quarto-dev/quarto-cli#15261 ·
Los mantenedores suelen responder en 1 día
-
enhancement websites
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
quarto-dev/quarto-cli#15255 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de quarto-dev/quarto-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
RocketChat/EmbeddedChat#1416 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yetone/magpie#5265 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
ai-driven-fuzzing bug Cosmetic
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
linagora/cozy-client#1831 ·
Los mantenedores suelen responder en 1 día