System Setup 

Web Server 

Content Security Policy 

In case a Content Security Policy is set on the Kitodo.Presentation instance, make sure that blob: URLs are allowed as img-src. Otherwise, the page view may remain blank.

TYPO3 Setup 

Extension Configuration 

You should check the extension configuration!

  • go to the Extension Configuration (ADMIN TOOLS -> Settings -> Extension Configuration).
  • open dlf
  • check and save the configuration

Allowed hosts for server-side requests 

To prevent server-side request forgery (SSRF), the server only fetches documents and document resources from hosts that are either publicly routable or listed in the extension configuration.

The setting general.urlAllowList is a comma-separated list of host names that the server may fetch even if they do not resolve to a public address. Wildcards such as *.example.org are supported.

general.urlAllowList = kitodo-production.example.org, *.iiif.example.org
Copied!

If a document is loaded from an internal host, or if a document references resources on an internal host (for example an IIIF image server or an annotation server), that host must be listed here. Otherwise the request is refused and a warning is written to the TYPO3 log.

Note that hosts which resolve to private, loopback, link-local or otherwise reserved addresses are rejected by default. This includes the cloud metadata address 169.254.169.254. Redirects are validated in the same way, so a document cannot be used to reach an internal service through a redirect either.

Tenant Configuration 

You must create a data folder for some Kitodo.Presentation configuration records like metadata, structures, solrCore and formats (namespaces). This can be achieved easily with the 'New Tenant' backend module on the left side in section 'Tools'.

Make sure, all fields are green. Then all necessary records are created.

TYPO3 Configuration 

Disable caching in certain situations 

Avoid empty Workview 

You may notice from time to time, the viewer page stays empty even though you pass the tx_dlf[id] parameter.

This happens, if someone called the viewer page without any parameters or with parameters without a valid cHash. In this case, TYPO3 saves the page to its cache. If you call the viewer page again with any parameter and without a cHash, the cached page is delivered.

With the search plugin or the searchInDocument tool this may disable the search functionality.

To avoid this, you must configure tx_dlf[id] to require a cHash. Of course this is impossible to achieve so the system will process the page uncached.

Add this setting to your typo3conf/LocalConfiguration.php:

'FE' => [
    'cacheHash' => [
        'requireCacheHashPresenceParameters' => [
            'tx_dlf[id]',
        ],
    ],
]
Copied!

Tip: Use the admin backend module: Settings -> Configure Installation-Wide Options

TypoScript Basic Configuration 

Please include the Template "Basic Configuration (dlf)". This template adds jQuery to your page by setting the following typoscript:

page.includeJSFooterlibs.jQuery

Slug Configuration 

With TYPO3 9.5 it is possible to make speaking urls with the builtin advanced routing feature ("Slug"). This may be used for extensions too.

TYPO3 documentation about Advanced Routing Configuration.

The following code is an example of an routeEnhancer for the workview page on uid=14.

routeEnhancers:
  KitodoWorkview:
    type: Plugin
    namespace: tx_dlf
    limitToPages:
      - 14
    routePath: '/{id}/{page}'
    requirements:
      id: '(\d+)|(http.*xml)'
      page: \d+
  KitodoWorkviewDouble:
    type: Plugin
    namespace: tx_dlf
    limitToPages:
      - 14
    routePath: '/{id}/{page}/{double}'
    requirements:
      id: '(\d+)|(http.*xml)'
      page: \d+
      double: '[0-1]'
Copied!

Solr Installation 

This extension doesn't include Solr, but just a prepared configuration set. To setup Apache Solr, perform the following steps:

  1. Make sure you have Apache Solr 8.11 or 9.x installed and running.

    Download Solr from https://solr.apache.org/downloads.html. Other versions may work but are not tested.

  2. Copy the config set to your solr home
cp -r dlf/Configuration/ApacheSolr/configsets/dlf $SOLR_HOME/configsets/
Copied!
  1. Get the Solr OCR Highlighting plugin and put it into the modules directory.

    The plugin is available on GitHub: https://github.com/dbmdz/solr-ocrhighlighting/releases. The documentation can be found here: https://dbmdz.github.io/solr-ocrhighlighting/.

    The Solr OCR Highlighting plugin is required for full text search as of Kitodo.Presentation 3.3. Version 0.9.1 is the minimum version. Choose the build for your Solr major version (8 or 9).

cp solr-ocrhighlighting-0.9.1.jar $SOLR_HOME/modules/ocrsearch/lib/
Copied!
  1. Using basic authentication is optional but recommended.

    The documentation is available here: https://solr.apache.org/guide/8_8/basic-authentication-plugin.html