kitodo / kitodo-presentation

Kitodo.Presentation is a feature-rich framework for building a METS- or IIIF-based digital library. It is part of the Kitodo Digital Library Suite.
https://kitodo.org
GNU General Public License v3.0
38 stars 44 forks source link

[Question] Purpose of `tx_dlf_navigation` query string #974

Open csidirop opened 1 year ago

csidirop commented 1 year ago

Description

Since v.4 there is a new query string added to the url. For me in my tests it is always tx_dlf_navigation[controller]=Navigation. Since Im using the DFG-Viewer on top I believe this is unnecessary. If i understood correctly, it has something to do with https://github.com/kitodo/kitodo-presentation/blob/4.x/Resources/Private/Templates/Navigation/Main.html

My questions:

Reproduction

Steps to reproduce the behaviour:

  1. Open a new document
  2. If there isn't the query yet, change the page

Or

Or

  1. Go to our test instance: https://dfg-viewer.bib.uni-mannheim.de
  2. Enter a valid METS URL or take one of our examples

Environment

csidirop commented 7 months ago

Same for the tx_dlf_pagegrid[controller]=PageGrid query string.

They turn up when:

csidirop commented 6 months ago

With v4.x we got so many additional query parameters. Are they really necessary?

If we take a look to the query we get when we use the search, we see a bunch of parameters:

https://dfg-viewer.bib.uni-mannheim.de/suche
  ?tx_dlf_search[__referrer][@extension]=Dlf
  &tx_dlf_search[__referrer][@controller]=Search
  &tx_dlf_search[__referrer][@action]=main
  &tx_dlf_search[__referrer][arguments]=YToxOntzOjE1OiJzZWFyY2hQYXJhbWV0ZXIiO2E6OTp7czo4OiJkYXRlRnJvbSI7czowOiIiO3M6NjoiZGF0ZVRvIjtzOjA6IiI7czo4OiJleHRGaWVsZCI7YToxOntpOjA7czo2OiJhdXRob3IiO31zOjExOiJleHRPcGVyYXRvciI7YToxOntpOjA7czozOiJBTkQiO31zOjg6ImV4dFF1ZXJ5IjthOjE6e2k6MDtzOjA6IiI7fXM6ODoiZnVsbHRleHQiO3M6MToiMCI7czo1OiJvcmRlciI7czowOiIiO3M6Nzoib3JkZXJCeSI7czowOiIiO3M6NToicXVlcnkiO3M6ODoiTWFubmhlaW0iO31969db09da5b5f75948dff937d18ee16a08f2c88cd
  &tx_dlf_search[__referrer][@request]={"@extension":"Dlf","@controller":"Search","@action":"main"}13ddc0bfc4e80a1e63dbd1da4ed39c1e26b02400
  &tx_dlf_search[__trustedProperties]={"searchParameter":{"query":1,"fulltext":1,"extOperator":[1],"extField":[1],"extQuery":[1],"dateFrom":1,"dateTo":1,"orderBy":1,"order":1}}5bee1462075d5c39baa454157aa020bd81e354e3
  &tx_dlf_search[searchParameter][query]=Mannheim
  &tx_dlf_search[searchParameter][fulltext]=0
  &tx_dlf_search[searchParameter][extOperator][0]=AND
  &tx_dlf_search[searchParameter][extField][0]=author
  &tx_dlf_search[searchParameter][extQuery][0]=
  &tx_dlf_search[searchParameter][dateFrom]=1600-01-01
  &tx_dlf_search[searchParameter][dateTo]=2024-02-01
  &tx_dlf_search[searchParameter][orderBy]=
  &tx_dlf_search[searchParameter][order]=

We can remove all tx_dlf_search[__referrer] parameters and still get the same result. When we next take a look to tx_dlf_search[__trustedProperties] we will see, that some parameter are already covert by tx_dlf_search[searchParameter]. And even if not, I really don't know what they are for because they all set to true (or 1) even if its not the case. See tx_dlf_search[__trustedProperties]={"searchParameter":{ [...]"fulltext":1 against &tx_dlf_search[searchParameter][fulltext]=0 when fulltext search is not selected. So removing tx_dlf_search[__trustedProperties] gives me still the same result.

This is the final url

https://dfg-viewer.bib.uni-mannheim.de/suche?
  tx_dlf_search[searchParameter][query]=Mannheim
  &tx_dlf_search[searchParameter][fulltext]=0
  &tx_dlf_search[searchParameter][extOperator][0]=AND
  &tx_dlf_search[searchParameter][extField][0]=author
  &tx_dlf_search[searchParameter][extQuery][0]=
  &tx_dlf_search[searchParameter][dateFrom]=1600-01-01
  &tx_dlf_search[searchParameter][dateTo]=2024-02-01
  &tx_dlf_search[searchParameter][orderBy]=
  &tx_dlf_search[searchParameter][order]=

which is a lot shorter and easier to read.

In comparison presentation v3.x had not one parameter.