Docs: Upgrading from 1.18
Upgrading from 1.18
A checklist for a theme forked on Tilspire 1.18.x, up to 1.19.2 — five habits that now cost something, five worth replacing, and the Template API call to use for each.
Most of Tilspire 1.19.0 is additive: a theme that changes nothing keeps working, and is simply floored on every contract it does not claim. Five habits now cost something, and five more are worth replacing. If your theme was forked earlier than 1.18.0, read the 1.17 notes and the older ones as well; each release lists only what changed since the one below it.
Five habits that now cost something #
- It ships its own
views/auth-close.php,views/auth-account.phporviews/auth-mfa.phpwithout the confirm part. A member who joined through a provider or a passkey has no password, and cannot confirm a change to the account. Draw$this->component('confirm-identity', ...)inside the form. - It ships its own
views/auth-login.phpthat always shows "Create account". Sign-up can now be closed (Settings ▸ Security), and the link then leads to a notice. Hide it when$registrationOpenisfalse. - It ships its own
views/auth-account.phpand drops the sections' anchors. The account page's index links to#profile,#security,#privacy,#activityand#close. Keep them. - It builds
/uploads/<file>by hand from a media-library filename. New uploads live inuploads/media/YYYY/MM/, so the guessed address only works through a redirect: every image costs an extra request. Use$this->picture($item)or$this->image($item). - It keeps a copy of a Blog, Forums or Feedback view. A copy keeps the old heading and misses every later change, because module views now draw their heading through the
page-headcomponent. Delete the copy, or shipcomponents/page-head.phpand end it with$this->pageHeadDefault().
Five habits worth replacing #
These break nothing.
- Printing a count with
number_format(), and a date with a format of your own.number_format()ignores the site's Regional format. Use$this->number($n)for counts and$this->timeTag($value, $style)for dates, which takes part in the Relative dates setting. - Linking the account menu to
/accountalone. Use$this->visitor()['profile_url']and['picture_url'], both''when there is none, to link the profile and show the picture. - Drawing your own letter tile, or a plain name, for comment authors and Feedback's tracker items and replies. Since 1.19.2 comment authors carry
user_id,picture_urlandprofile_url, and tracker items and replies carryauthor_face. Pass them to$this->component('person-avatar', ...), withperson_nameand nevername, and link the name toprofile_urlwhen it is set. Core'scommentscomponent already does. - Writing your own copyright line in the footer. Print
$this->footerCopyright()(escaped text), and fall back to your own line when it is''. A theme that never calls it gets the line from core's floor once the owner fills the setting. - Writing a New topic link on a forum's page. Print
$this->action('forums.node.start', $node), which draws the link, or nothing when this visitor may not start a topic (1.18.0).
The owner can also turn on three parts of a page in Pages ▸ Settings: the trail, "Last updated" and "In this section". A theme that does not place them, with component('page-breadcrumbs'), component('page-updated') and component('page-children') or the matching pageTrail(), pageUpdated() and pageChildren(), gets core's own in a default place (contract 12). A theme that shows no sign-in buttons gets none: core's views draw them, so a sign-in or sign-up view of your own calls the social-signin component.
Checklist #
Work down it once, search your theme's folder for each pattern, and change what you find.
- Confirm it's you. In your own
views/auth-close.php,views/auth-account.phpandviews/auth-mfa.php, draw the part inside the form that changes the account, and keep the password field's name,current:
Load<?php $this->component('confirm-identity', ['confirm' => $confirm, 'confirmId' => 'close', 'confirmFocus' => false, 'confirmThen' => 'reload']); ?>components/passkeys-scriptwhen$confirm['passkey']is true. - Closed sign-up. In your own
views/auth-login.php, draw the "Create account" link only while sign-up is open:<?php if (($registrationOpen ?? true) !== false): ?><a href="/account/register">Create account</a><?php endif; ?> - Sign-up forms. In your own
views/auth-register.php, call<?php $this->signupChecks(); ?>last before the submit button, so the terms and privacy line sits just above it. Write no agreement text of your own; style.auth-legal. - Reset and closing. In your own
views/auth-reset.php, call$this->resetFactor($factor ?? null)and keep the code field's name,factor; core adds the part if you do not. A theme with its ownviews/auth-closing.phpkeeps both forms (step=cancelandstep=leave) and the CSRF fieldcsrf_token. - Account anchors. Keep
#profile,#security,#privacy,#activityand#closein your ownviews/auth-account.php. - Uploads. Search for
/uploads/. Replace each address you build from a media-library filename withpicture($item)orimage($item). - Copied module views. Search your theme for copies of Blog, Forums and Feedback views. Delete each, or restyle with a small override:
components/page-head.phpending in$this->pageHeadDefault(), a slot incomponents/slots/, or a small component such asblog-card,pagerorperson-avatar. - Dates and numbers. Replace
number_format()withnumber(), and a date you format yourself withtimeTag(). - Faces. Draw a comment author's or a tracker item's face with
person-avatar, and link the name toprofile_urlwhen it is set. Escape the addresses of a comment author;author_faceis raw, andperson-avatarescapes it. - Account menu. Link
visitor()['profile_url']and showvisitor()['picture_url']when they are not''. - Footer. Print
footerCopyright()where the footer's base line goes. Place the page parts you want withcomponent(), or leave them to core. - Version. Raise
versionintheme.jsonon every shipped change. Installing or updating a theme clears the page cache, and a theme copied onto the server another way clears it on the first visit after its version changes. - Check. Load the site as a guest and as a signed-in member, with sign-up open and closed, and open a page with its settings parts on. Then check the Health page for warnings about your theme.
New in 1.19.2 #
These are additive, and each is optional.
- Faces. Comment authors carry
user_id,picture_urlandprofile_url; Feedback's tracker items and replies carryauthor_face;posts()items carryauthor_url,''unless the person looking may open the author's profile. Print them withperson-avatarand link the name when the address is set. - An editor stylesheet. An optional
assets/editor.cssstyles the Pages and Posts editors. Start every rule with.tsp-editor. The Profile page offers the Immersive editor switch only while the active theme ships the file. error_varsontracker-suggest. The placeholders of the refusal's message, for the posting-limit refusal's:when: pass them tot()with theerrorkey.
The calls named above are described on these pages: number, timeTag and pageHeadDefault on Head, assets and views; visitor and footerCopyright on Site, visitor and request; picture and image on Fields and pictures; pageTrail, pageUpdated and pageChildren on Other pages and menus; posts on Posts; action on Actions and sections; the sign-in calls on Sign-in, forms and consent; comments on Search, comments and previews; and the tracker calls on Tracker.