Setup
The demo is built by the script Build/ in the
demo branch. It creates a self-contained, runnable TYPO3 13.4 +
SQLite site in a directory of your choice. The dlf extension is
symlinked into the site from the current checkout, so the site always runs the
exact code of the branch you are on.
No Docker, no Apache Solr and no theme CSS are required. Instead of pointing the viewer at a public document, the script installs a small local sample document (a METS file plus three placeholder pages, thumbnails, ALTO fulltext and per-page PDFs) and serves it on its own static HTTP port, so the PageView viewer works end to end completely offline.
Requirements
- PHP 8.2 or newer (a Homebrew PHP is fine) with the extensions used by TYPO3. PHP 8.5 works as well.
- Composer.
- A checkout of this repository on the
demobranch.
The script pins the Composer PHP platform to 8.4.99 for you, so the dependency resolution does not depend on the installed PHP version.
Running the script
Build/Demo/setup-demo.sh
This creates the site in $HOME/ and prints the URLs to
open. Run it again at any time to re-sync an existing site with the current
checkout (the script is idempotent).
Options
|
Option |
Default |
Description |
|---|---|---|
|
|
|
Where to create the site. |
|
|
8090 (next free port if taken) |
Frontend dev-server port / base URL. |
|
|
(localhost dev server) |
Serve the site under a public base URL instead of the localhost dev
server (e.g. behind an Apache vhost or reverse proxy). It becomes the
TYPO3 site base, and the web server must serve
|
|
|
(localhost data server) |
Public base URL of the sample data files ( |
|
|
current git branch |
|
|
|
|
Backend admin username. |
|
|
see below |
Backend admin password. For localhost installs (no
|
|
|
|
Viewer theme to use. The available themes are the subdirectories of
|
|
|
(off) |
Start both servers in the foreground after setup. |
|
|
(off) |
Skip the local sample document. The on-page form then starts empty and you paste any METS / IIIF URL. |
|
|
Show this help. |
Workarounds baked into the setup
The script applies several workarounds that a fresh install otherwise needs:
enablein the site TypoScript, so the PageView proxy (a non-seekable stream) is not given a bogusContent Length Header = 0 Content-header by the cms-frontend content-length middleware.Length: 0 plugin.set, because that setting has no default and the metadata controller crashes on multivalued metadata when it is null.tx_ dlf_ metadata. settings. separator - The FE
cacheandHash. require Cache Hash Presence Parameters ['tx_ dlf [id]'] pageso a viewer request carryingNot Found On CHash Error = 0 tx_renders uncached instead of 404ing on the missing cHash.dlf [id] - The viewer map container height is provided by the extension itself, so no theme CSS is needed for the viewer to render.
A separate data server
The sample data (METS, page images, thumbnails, media) is served on its own static port, distinct from the frontend app. This is deliberate: the built-in PHP server is single-threaded, and a request that reaches back into the same port (the app fetching the METS and page images server-side) would deadlock it. Keeping the data on a different port avoids that.