Study guide · Extensions, Search and Interfaces
Advising on extensions, search and interfaces
No project gets by with the bare TYPO3 Core. As a consultant you need to know what TYPO3 can do out of the box, where its limits are and which extensions have proven themselves. On this page you follow one client project from the wish list to the recommendation. You choose extensions, plan news and protected areas, find the right search and connect other systems.
The example is the Seetal holiday region. It wants to rebuild its website. In the workshop, this wish list comes together:
- The editorial team wants to publish news and events.
- Hosts should log in to their own area and download price lists as PDF files there.
- Visitors should be able to search across two websites, including PDF brochures, with filters for place and category.
- The booking system and the newsletter tool should exchange data with TYPO3.
For each item you ask the same question: Can the Core do it, is there a proven extension, or does it need custom development?
What an extension is and where the Core ends
An extension is a software package that adds features to TYPO3. It can bring content elements, plugins, backend modules, new record types or interfaces. Technically every extension is a Composer package. The Core itself is made of extensions too, the system extensions. And the project's site package with templates and design is also an extension.
There are three groups:
- System extensions belong to the Core. The Core team develops them and releases them together with every TYPO3 version.
- Third-party extensions come from agencies and developers in the community, for example the news extension.
- Project extensions are built for one project only, above all the site package.
The difference between an extension and a plugin matters. In TYPO3 a plugin is a special content element with dynamic features, for example a news list or a search form. One extension can provide several plugins or none at all. Watch out with clients who know WordPress: there, “plugin” means what TYPO3 calls an extension.
If you know the limits of the Core, you can estimate effort early and realistically. The Core already brings a lot: pages, content elements, multiple languages and a form framework. It also has SEO fields, redirects, workspaces for approvals, frontend login, a simple search and the scheduler.
But the Core has no news or event module. It also has no online shop with cart and payment, no newsletter sending and no search with filters. For these you need extensions or external systems.
The TYPO3 Getting Started tutorial is a good starting point for the choice. Under Recommended Extensions it lists frequently used extensions for typical requirements, such as news, Content Blocks, containers or the Solr search. None of them is mandatory, and the list does not replace your own check in the project.
Finding and assessing extensions
Almost all publicly available extensions live in the TYPO3 Extension Repository, TER for short, at extensions.typo3.org. The detail page of an extension shows the description, all versions with their supported TYPO3 versions, the Composer package name and links to documentation and code repository. The download packages in the TER are meant for installations without Composer.
In a Composer installation you get extensions from Packagist at packagist.org. Most TYPO3 extensions are registered there as well. You install them with the command composer require and the package name. A package name always has the form vendor, slash, package, for example georgringer/news or typo3/cms-seo. Do not confuse it with other spellings: EXT:news is the short form of the extension key in TYPO3 paths, and tx_news_domain_model_news is a table name. Uploading archives is only possible in Classic Mode through the Extension Manager.
Before you recommend an extension, you check its quality. These details help:
- Does it support the project's TYPO3 version, that is TYPO3 14?
- When was the last release, and what does the version history look like?
- Is there documentation and a public repository with maintained issues?
- How widely is it used, and what does the community say about it?
- Were there security advisories, and who maintains it: an active agency, a team or a single person?
The look of the description or the colour of the icon says nothing about quality.
Why does this matter so much? Extensions come from many authors of varying quality. According to the TYPO3 documentation, most known security holes are in extensions, not in the Core. And an extension that does not support the next TYPO3 version can block an upgrade.
The system extensions
Some system extensions are required in every installation: core, backend, frontend, extbase, fluid and install, plus filelist and extensionmanager. These eight are marked as protected and cannot be uninstalled. Besides these there are many optional ones that you install as needed. A consultant should be able to explain the most important ones:
- form provides the form editor, seo the metadata and sitemaps, redirects the redirects.
- workspaces handles approval processes, scheduler runs planned tasks.
- felogin brings the login for website visitors, indexed_search the built-in search.
- webhooks and reactions connect TYPO3 with other systems.
New in TYPO3 14 is the theme Camino, as the package typo3/theme-camino with the extension key theme_camino. It is the default theme for new sites of version 14. In new classic installations it is active from the start. In Composer installations you require the package yourself. The well-known Bootstrap Package, by contrast, is a third-party extension.
What are the benefits of system extensions? They go through the same review and test process as the Core. They are tested with every version and receive security updates for the whole lifetime of an LTS version. This makes projects more stable and easier to plan. They still need updates, and optional system extensions can be left out or removed.
The Composer Helper on get.typo3.org helps with the setup. There you choose the TYPO3 version and the system extensions you want. You get the matching composer require command.
News with EXT:news
For the Seetal news, EXT:news by Georg Ringer is the obvious choice. It is one of the best-known third-party extensions, and its package name is georgringer/news. You use it to create and manage news and to show them as a list and a detail view. It does not send newsletters.
A news record can be of three kinds:
- A regular news item with its own text, teaser, images and files.
- A news item that points to an internal page in TYPO3.
- A news item that points to an external URL, for example a press release on another website.
News items are records, not pages. You store them in one or more folders in the page tree, that is pages of the type folder, also called sysfolders. In the plugin you select these folders as the record storage, the starting point. This lets you separate news by area and control them with permissions. You group news by topic with categories from the Core, the table sys_category, and with the extension's own tags. Plugins can filter by category.
For the output, EXT:news offers many views: list, detail view, date menu, category and tag lists, search form and search result. It does not offer a shopping cart or appointment booking. You adapt the look through Fluid templates in the site package and through the plugin settings.
Around EXT:news there are companion extensions. For the Seetal events, eventnews fits: it adds fields such as date and location to news records. List, categories and templates stay the same. For large event management with registration there are separate extensions.
Closed user groups
The host area is a closed user group: an area of the website that only logged-in visitors of certain groups may see. TYPO3 handles this with built-in tools:
- Frontend users and frontend user groups are records in a folder. Permissions always go to the group, never to a single user.
- On the access tab of a page or content element you choose the groups that may see it.
- The login form plugin comes from the system extension felogin. It brings redirects after login and logout and a “forgot password” feature. Backend users, by contrast, are managed by the extension beuser.
Two groups always exist. Hide at login shows an element only to visitors who are not logged in. Show at any login shows it to all logged-in visitors, whatever their group.
Now comes a trap many clients do not know: this does not protect files. A PDF in fileadmin sits in a public folder. The web server delivers it directly, without asking TYPO3. Anyone who knows the URL can download it, even if the page with the link is protected.
For the hosts' price lists there are two sensible approaches:
- A protected download extension from the TER. It delivers files only after the login has been checked.
- A non-public storage, for example outside the web root, whose files are delivered only through TYPO3.
Complicated file names, on the other hand, are only obfuscation and no protection.
If a client wants partners to log in with their Microsoft or Google account, felogin alone is not enough. felogin knows username and password with password recovery. Further login methods come from extensions for external login providers, for example via OAuth 2 or OpenID Connect. They use the authentication API of TYPO3. Backend accounts for external partners would be a security risk.
Why a website search?
A search on the website helps visitors find content faster. The larger and more varied a website is, the more important it becomes. It has nothing to do with visibility on Google or other external search engines. In the TYPO3 world there are four common solutions.
Indexed Search is included in the Core as a system extension. It indexes pages in the frontend while TYPO3 renders them. It registers the words of a page, counts and weights them and stores them in its own database tables. It needs no external server. For the content of PDF and Word files it calls external programs on the server, such as pdftotext and catdoc. If these programs are missing, only pages are indexed.
ke_search is a third-party extension. It reads content directly from the database instead of crawling pages in the frontend. It stores its index in the TYPO3 database and uses the full-text search of MySQL or MariaDB, that is the query with MATCH and AGAINST. It offers filters, called facets, and indexers for pages, news, files and more. It needs no search server of its own.
Apache Solr is a standalone search server based on the library Apache Lucene. The extension EXT:solr connects TYPO3 to this server. Without a running Solr server it does not work.
Elasticsearch is also a search server of its own based on Lucene. It is not a system extension but is connected through third-party extensions.
Recommending the right search
The choice depends on a few questions: How large is the website? Are there several sites or external sources? Do you need facets, synonyms and autocomplete? And what does the hosting allow?
Why is Indexed Search often not the first choice for very large websites with many visits? Index and search run in the TYPO3 database. With large data volumes this puts load on the database, and features such as synonyms or fine control of relevance are limited. For many smaller sites, though, Indexed Search is perfectly fine.
For Seetal, with two sites, PDF brochures, facets for place and category and hosts from the booking system, you recommend Solr, ideally as a hosted service.
Apache Solr and EXT:solr
EXT:solr brings many ready-made features for TYPO3:
- Facets to filter the results, for example by place or category.
- Autocomplete and search suggestions while typing.
- Spelling suggestions in the style of “Did you mean …?”.
- Highlighting of search terms, synonyms, stop words and multiple languages.
- Access restrictions by frontend user groups.
- An index queue that takes changes from the backend into the index promptly.
It does not translate content automatically or send newsletters.
System requirements: Solr is a Java application. So the server needs a Java runtime environment, plus enough memory and disk space for the index. Solr often runs as a Docker container or as a service at the hosting provider. Each version of EXT:solr supports only certain Solr versions, so the versions must match. With more content, more languages and more queries the index grows, and memory and computing needs rise. Under high load you plan for scaling, for example with more memory or replication.
Whether Solr fits is a trade-off. On one side are data volume, facets, multiple languages and external sources. On the other side are operating effort, know-how and the cost of the Solr server. Solr is powerful, but not always the best choice. For small sites the effort is often too high.
Interfaces: what an API does
An API, short for Application Programming Interface, is a defined interface. Through it, programs communicate with each other and exchange data. Web APIs usually work over HTTP, often in REST style with JSON.
Connecting systems through APIs has clear benefits:
- Data does not have to be maintained twice, for example hosts in the booking system and on the website.
- You can use features of other services, such as payments or map services.
But it also brings risks that you should raise openly:
- The website becomes dependent on the provider. If the service fails, or changes its API or its prices, the website is affected.
- It needs secure authentication. Access keys and secrets do not belong in the code or in public places.
- If personal data is transferred, data protection, legal basis and data processing agreements must be clarified.
- APIs are not maintenance-free. Long-term care belongs in the budget, and they are not encrypted by themselves.
Webhooks and reactions
For simple integrations TYPO3 ships two optional system extensions. You manage both in the module Administration, Integrations, which only administrators can see.
A webhook is an automatic HTTP message that one system sends to another when an event happens. So the receiver does not have to keep asking. The extension webhooks sends such messages from TYPO3. The Core ships these triggers:
- A page was created or updated, including when it is published or hidden. The trigger is called Page Modification.
- A file was added, updated or removed.
- A login failed.
- A multi-factor authentication check failed.
For Page Modification, the documentation also lists deleted pages. In the TYPO3 14.3 code, however, the trigger only reports creating and updating. If the system extension redirects is installed, it adds a trigger for redirects that were hit. Normal page views in the frontend or search queries do not trigger a webhook. Developers can add their own triggers from PSR-14 events, though.
How does the receiver know that a message really comes from TYPO3? Every webhook has a secret signing key. From it, the webhook's identifier and the content, TYPO3 calculates a hash using HMAC with SHA-256. TYPO3 sends this hash in the header Webhook-Signature. The receiver recalculates it with the same key and compares. This way it detects forged or altered messages.
A reaction works the other way round. The extension reactions handles incoming webhooks: an external system sends an authorized POST request to TYPO3, and TYPO3 performs an action. The built-in reaction is Create database record. It creates a record and fills it with data from the request, for example a news item from a press system. Developers can add further reaction types.
Every reaction has a unique identifier and a secret. The backend generates both when you create the reaction. The secret is shown only once. Like a backend password, it is stored only as a hash, never in plain text. Anyone who knows it can trigger the reaction and, for example, create records. That is why it belongs in a secure store of the calling system.
Key points
- An extension is a software package, a plugin is a content element with dynamic features.
- You find extensions in the TER, but in Composer projects you install them from Packagist with composer require.
- Before every recommendation you check compatibility, maintenance, documentation and security of the extension.
- The system extensions core, backend, frontend, extbase, fluid and install are mandatory, plus filelist and extensionmanager. Forms, SEO, redirects and workspaces are optional parts of the Core, and Camino is the default theme since TYPO3 14.
- EXT:news stores news in folders that must be selected as record storage in the plugin.
- Page protection does not protect files in fileadmin.
- Indexed Search is in the Core, ke_search needs MySQL or MariaDB, Solr needs its own Java server.
- Webhooks send out of TYPO3, reactions accept requests from outside.
Terms
- Extension
- Software package that adds features to TYPO3.
- System extension
- Extension that belongs to the Core and ships with it.
- TER
- TYPO3 Extension Repository, the public directory of extensions.
- Packagist
- Package directory from which Composer loads packages.
- Plugin
- Content element that brings a feature of an extension onto a page.
- Record storage
- Folders from which a plugin takes its records, also called starting point.
- Closed user group
- Frontend area only for logged-in members of certain groups.
- Facet
- Filter in a search, for example by place or category.
- Lucene
- Search and index library on which Solr and Elasticsearch are built.
- Index queue
- Queue in EXT:solr that brings changes into the index promptly.
- Webhook
- Automatic HTTP message from TYPO3 to another system when an event happens.
- Reaction
- Action in TYPO3 triggered by an authorized request from outside.
- HMAC
- Checksum calculated with a secret key.