whoami
Lucas Jenß
cat /etc/motd
The Coding Journal ツ — Notes taken on an epic coding journey. Technical solutions, debugging notes, and practical guides from the trenches of software development.
ls -la ~/languages/
- drwxr-xr-x
- ▶ PHP
- ▶ Ruby
- ▶ Scala
- ▶ C#
- ▶ JavaScript
- ▶ Objective-C
- ▶ Shell Scripting
ls -la ~/toolchain/
- drwxr-xr-x
- ▶ Typo3
- ▶ Akka
- ▶ Capistrano
- ▶ Git
- ▶ MAMP
- ▶ Adobe Illustrator
- ▶ NSTrackingArea (Cocoa)
uname -a
- drwxr-xr-x
- ▶ Mac OS X
- ▶ Unix
Migrating TYPO3 RealURL Configuration To Route Enhancers
Migrating TYPO3 realurl configuration to the new route enhancer syntax is more than replacing one configuration file with another. The change moves URL handling into TYPO3’s site configuration and makes routing a structured part of the core. That brings clearer rules, better separation between page types, and fewer dependencies on an extension that was once essential.
The work is usually encountered during an upgrade from TYPO3 8 or an earlier release to TYPO3 9 LTS and later versions. A familiar realurl_conf.php may have managed page paths, news records, language prefixes, and date segments for years. Route enhancers take over those responsibilities through YAML, route aspects, and the site configuration stored in config/sites.
For Australian development teams, the migration often happens across a distributed setup: a developer in Melbourne, a client in Sydney, and production hosting in Brisbane or another regional data centre. Plan for AEST and AEDT differences, local content review, and a quiet deployment window rather than treating the change as a simple file conversion.
Understand The Routing Model
RealURL was extension-driven. Its configuration described page paths and database fields through PHP arrays, often with a large amount of custom logic. TYPO3’s route enhancers are core routing definitions. They are attached to a page or page tree in the site configuration and describe how arguments become readable URL segments.
The most common enhancer types are PageType, Simple, and Extbase. A PageType enhancer can map a page type to a suffix or format, while Simple is useful when a single route argument comes from a record field. Extbase handles controller and action arguments and is common for extension plugins such as news, events, or directory listings.
The syntax is declarative, but the concepts still require careful mapping. A route enhancer does not automatically know that a news record should use its slug, nor does it infer whether an integer is an ID or a year. Route aspects such as PersistedAliasMapper, StaticRangeMapper, and LocaleModifier provide those instructions.
Audit Existing RealURL Behaviour
Start by recording what the old configuration actually does. Read the complete realurl_conf.php, including user functions, post-var sets, fixed post vars, page path rules, language settings, and special handling for file names. Search the project for generated links and hard-coded paths as well; the configuration may be only part of the URL contract.
Create a list of representative URLs from production. Include a normal content page, a news detail page, a paginated listing, a translated page, a URL with a file extension, and any route containing dates or categories. A TYPO3 installation serving a Sydney organisation may have years of indexed links, campaign URLs, and links in printed materials. Those historical paths matter as much as the new route syntax.
It also helps to document the expected response for each URL: 200, redirect, 404, or a canonical redirect. Keep the old configuration available in version control while developing the replacement. Clear notes and compact examples are valuable when several developers are involved, much like the concise presentation found in this design reference.
Translate Rules Into YAML
The new configuration normally lives in a site’s config.yaml, commonly under a path such as config/sites/example/config.yaml. A simplified news route may look like this:
routeEnhancers:
News:
type: Extbase
extension: News
plugin: Pi1
routes:
- routePath: '/{news_title}'
_controller: 'News::detail'
_arguments:
news_title: news
aspects:
news_title:
type: PersistedAliasMapper
tableName: tx_news_domain_model_news
routeFieldName: path_segment
The exact controller and plugin values depend on the extension version and the site’s TypoScript. In some projects, the argument is named news, news_title, or another custom value. The important relationship is that the route placeholder, _arguments mapping, and database field all agree.
| RealURL concept | Route enhancer equivalent | Migration concern |
|---|---|---|
preVars |
Site language and site configuration | Confirm language prefixes and fallbacks |
postVarSets |
routes and _arguments |
Preserve argument order and names |
lookUpTable |
PersistedAliasMapper |
Check table and slug field |
fixedPostVars |
Page-specific enhancer configuration | Attach the rule to the correct page |
fileName |
PageType enhancer |
Check suffixes and index handling |
| Custom user functions | Route aspects or application logic | Rebuild only what is still required |
A PersistedAliasMapper expects a persisted record and an alias field. If old records have empty slugs, duplicate values, or characters that were normalised differently by RealURL, the generated path may change. Review the database before testing the YAML. In larger Australian sites, this is a suitable task for a staging copy refreshed outside peak AEST traffic.
For date-based URLs, use an appropriate aspect rather than embedding arbitrary PHP logic in the route definition. A StaticRangeMapper can represent a fixed range, while a custom aspect may be justified for a specialised domain model. Keep custom code small and tested. Developers who already use automated style checks may recognise the value of a repeatable workflow such as this Rubocop CI workflow.
Preserve Slugs, Languages And Caches
Route enhancers affect both incoming requests and generated links. A page can appear correct when visited directly but still produce an unexpected URL from Fluid, TypoScript, or an Extbase view helper. Test link generation from the actual plugin context, because controller and action arguments may be supplied differently from a manually typed request.
Language configuration deserves special attention. TYPO3 site languages define the language prefix, locale, fallback behaviour, and sometimes domain. The route enhancer then handles record arguments within that site context. Check English and translated records separately, particularly if the Australian site has content for New Zealand, Singapore, or other nearby markets. Confirm whether translated slugs are stored in the expected field and whether fallback records should produce a localised path.
Caching can hide a faulty migration. Clear TYPO3 caches after changing site configuration, and test with a fresh browser session and a cache-busting query only when necessary. Review generated canonical tags, hreflang links, XML sitemaps, and redirects. If a news detail page is cached under an old argument, the first successful request may give a misleading impression that every route is working.
Do not overlook web server rules. Apache or Nginx must pass the requested path to TYPO3, and an old .html suffix or front-controller rule may cause redirects before TYPO3 sees the request. Check the production PHP version and deployment process as well. Notes from unrelated platform work, such as these NDK build notes, illustrate a useful habit: separate the application configuration from the environment assumptions around it.
Validate And Deploy Safely
A controlled test pass should cover both old inbound paths and newly generated links. Compare the results with the inventory created before editing the configuration, then inspect logs for missing route arguments, invalid records, and unexpected redirects.
Use these checks before asking content editors to sign off:
- Resolve detail pages for current and archived records
- Test translated pages and language fallbacks
- Check pagination, filters, dates, and category segments
- Compare canonical URLs with the intended public format
A second pass should focus on deployment and search visibility:
- Export redirects for URLs that cannot remain identical
- Warm critical caches after the configuration change
- Crawl the staging domain without indexing it
- Monitor 404s, redirect chains, and server errors after release
For a busy Melbourne or Sydney site, deploy during a low-traffic period and keep a rollback copy of the previous site configuration. If the project coincides with end-of-financial-year publishing, a campaign launch, or a major public holiday, postpone the cutover unless the route change is urgent. Give editors a short list of URLs to verify, including one record they know well.
Once the route enhancer definitions are stable, remove obsolete RealURL configuration only after confirming that no extension or deployment script still references it. Keep the migration notes with the site configuration, record any intentional URL changes, and add regression tests for the routes that carry the most search traffic. Move the YAML into version control, run the checks in every deployment, and release the new TYPO3 routing rules with the same care as application code.
cat ~/interests.json
| Key | Value |
|---|---|
| editor | Terminal-first workflow |
| os | Mac OS X / Unix |
| vcs | Git, distributed version control |
| deploy | Capistrano, cron automation |
| graphics | SVG, Adobe Illustrator troubleshooting |
| networking | IP validation, SSH, VPN |
git log --oneline --reverse
Solving SVG import issues in Adobe Illustrator CS6 and CC
When importing an SVG into Illustrator, the operation fails with an unknown error [CANT]. A workaround for this Adobe-side bug.
Solving NDK build issues on OS X
Troubleshooting native development kit compilation problems on Mac OS X.
Programmatically adding PHP generated TypoScript to the backend configuration
Integrating dynamically generated TypoScript into Typo3 backend setups using PHP.
ArgumentError: Could not parse PKey: no start line
Debugging an SSH key parsing error encountered during deployment.
Validating IP-Addresses in PHP
Using PHP filter functions with flags like FILTER_FLAG_IPV4 and FILTER_FLAG_IPV6, and understanding how filter_var handles reserved IP addresses.
Cocoa: Using NSTrackingArea
A short tutorial on using Cocoa's NSTrackingArea to capture mouseEntered and mouseExited events.
cat ~/contact.txt