Pre-hash query parameters are ignored

Abierto Apto para principiantes
#3 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
angularjs, javascript
Área
frontend

Línea de trabajo

Empieza por el código que lee url mediante $location.search() y revisa la configuración de $locationProvider; el issue identifica LocationHashbangUrl.$$parse de Angular 1.4.7 como la causa de que se ignoren las consultas anteriores al hash. Compara las dos formas de URL del issue y verifica que la consulta anterior al hash carga el Manifest. El issue también señala los destinos canvas y Range como limitaciones independientes; confirma el alcance previsto antes de considerarlos parte de esta corrección.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Found while designing the resource bag for Oh My RERUM (CenterForDigitalHumanities/oh-my-rerum#10). OMR hands a resource to a tool as a percent-encoded URI in the pre-hash query string, which is the form the IIIF Content State 1.0 spec recommends. This tool cannot see it.

url is read through $location.search(), and html5Mode is never enabled on the $locationProvider. In Angular 1.4.7, LocationHashbangUrl.$$parse (angular.js around line 11518) treats a URL with no fragment as empty — the source comment reads "Otherwise we ignore what is left".

So this works:

/aybee/index.html#!/aybee?url=https://example.org/manifest.json

and this does not:

/aybee/index.html?url=https://example.org/manifest.json

The second form is what a spec-conformant caller produces. Enabling html5Mode, or falling back to window.location.search when $location.search() comes back empty, would both fix it.

Two notes that may matter for the same change:

  • url is the only parameter the app reads. There is no way to open the viewer at a particular canvas, so a caller cannot point at a position within a Manifest.
  • The app requires a Presentation 2.x Manifest; it walks sequences[0].canvases and throws on anything else, including a Canvas or Range URI, which are legal Content State targets.

Why we are not working around it

OMR will keep emitting the conformant pre-hash form and surfacing the load failure to the visitor rather than special-casing per-tool URL shapes. A placement flag in the registration schema would mean encoding this defect into every downstream tool registry, so the fix belongs here.

Lenguaje dominante
JavaScript
Estrellas
0
Forks
0
Merge medio
2 d 21 h
PR fusionados (30 d)
1

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CenterForDigitalHumanities/aybee

Todos los issues de CenterForDigitalHumanities/aybee

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.