Skip to content

History of commits

4476 commits

refactor(guestbook): move the guestbook pages to Twig

The text of an entry and the reply to it come out of the formatter as Twig\Markup — they have been through the purifier, the media embedder and the smilies. A missing reply is null rather than empty markup, so the template can still tell there is none. The name of an entry was printed unescaped, including into the argument of an inline onclick handler; it is escaped now, for JavaScript in that one place. The editor partial received an already escaped value and printed it raw into an attribute. It takes the raw value now and escapes once, on output. The edit and reply pages rendered the editor a second time inside their scripts block, which emitted a second component with the same id; only the one in the form is left.
simba77 5 أغسطس 2026 22:04 Branch: 10.x 7405e29

refactor(community): move the community pages to Twig

The public result page comes with them: `@theme/pages/result.twig`, named explicitly by the callers that answer "for registered users only". The condition that pulled the admin sidebar into it is gone — an admin copy of the page will be its own file. The list, the row and the links under a list become components, and the byte-identical administration template is dropped: users, birthdays and the staff list are one page with different data. Two things the old markup hid: - the row printed a delete link from an attribute nobody sets, so the block never rendered; it is removed, and with it the "Delete" string of this domain; - the karma of a row came from an alias the karma query adds, and reading it off a row loaded any other way would call it as a method; it is computed from the two real columns instead. Links between the pages were relative (./search/, ../), which resolved to a different page depending on the trailing slash of the current URL; they are absolute now.
simba77 5 أغسطس 2026 21:56 Branch: 10.x b3973eb

refactor(contacts): move the contact page to Twig

The first form to move, so two components of the theme come with it: the validation messages of a field and the consent checkbox. Both print each message as text and put the line breaks in the template, instead of joining messages with a tag into one unescaped string. The sanitized title of a consent is Twig\Markup now, which is what lets the checkbox print it as it is under autoescape. The phone of the tel: link is normalized by the DTO rather than by a preg_replace in the middle of the markup. The admin pages of the module stay on Plates: templates are dispatched one by one, so the two halves of a module move independently.
simba77 5 أغسطس 2026 21:48 Branch: 10.x 9040d30

docs(agents): add the Twig migration recipe

What the five migrated modules settled: the layout of a migrated module, the review every output goes through, and the four traps that cost a page each — the __call() of an Eloquent model, the truthiness of Markup, a layout variable shadowing the data of the page, and string literals the escaper leaves alone.
simba77 5 أغسطس 2026 21:41 Branch: 10.x 2919de1

refactor(online): move the visitor lists to Twig

The four pages share one template each way, so the visitor row and the tabs become components of the module. Where a visitor is is a link assembled from the places configuration, so both formatters behind it return Twig\Markup and the templates print it as it is. The forum one returns null instead of an empty string: markup is an object, and an object is truthy however empty it is — a caller could no longer tell "no place" from "nothing to show". The IP and browser of a visitor were guarded by rights >= 3 with a second, always true check for any rights inside; only the outer one survives.
simba77 5 أغسطس 2026 21:39 Branch: 10.x 8ea43fc

fix(docker): send the charset with stylesheets

text/css is not among the default charset_types of nginx, so the stylesheets went out as "text/css" with no encoding while the pages carried UTF-8. A browser is then free to read them as latin1, and the breadcrumb divider showed up as ».
simba77 5 أغسطس 2026 21:32 Branch: 10.x 5a05bbc

fix(view): keep layout variables from shadowing page data

A {% set %} in a layout lives in the context its blocks are rendered in, so "notifications" set for the sidebar counters replaced the list of the notifications page, and the page died on the first item. Every variable a layout keeps for itself is now prefixed with layout_, and a test holds the convention for the layouts still to be written.
simba77 5 أغسطس 2026 21:24 Branch: 10.x f5ab3d6

refactor(notifications): move the notification pages to Twig

Two contracts change with them, and both serve every list page still to come: - Pagination::render() returns Twig\Markup, so a template prints {{ pagination }} with no raw filter. Plates keeps echoing it, since Markup is a string when used as one. - Notification::getMessageAttribute() returns Markup too: the event templates in the configuration carry links, and under autoescape they would print as tags. Whether the navigation is shown is decided by Pagination::hasPages() instead of comparing the total against the per-page setting of the visitor, which is what that comparison meant.
simba77 5 أغسطس 2026 21:19 Branch: 10.x 150b4de

refactor(language): move the language modal to Twig

A fragment loaded into a modal, so the template names no layout at all — the Twig counterpart of a Plates template that never called $this->layout(). The list of languages comes from the controller instead of the configuration array the template used to read, and the checked radio is written as a condition rather than as an echoed attribute string.
simba77 5 أغسطس 2026 21:13 Branch: 10.x 077f4ae

refactor(redirect): move the external link page to Twig

Escaping moves to the output: the controller no longer runs htmlspecialchars() on the referer and the template no longer runs it on the URL, so the value is escaped once, by the environment. The host in the warning is still emphasised inside the translated sentence, so that one string stays markup and says so. The referer comes off the request instead of $_SERVER, and the page is covered by the smoke set.
simba77 5 أغسطس 2026 21:09 Branch: 10.x 6bd0a30