PageCraft Changelog
PageCraft Changelog
All notable changes to this project are documented in this file.
The format follows Keep a Changelog. Versioning follows Semantic Versioning.
[Unreleased]
Fixed
- The front-end runtime init no longer polls forever. It waits for
ContentBoxRuntimeevery 50 ms, and with no limit a page whose runtime never loaded (a CDN miss, a CSP block) polled 20 times a second for as long as it stayed open. It now gives up after 10 seconds. Both call sites,ft.page_craft.phpandmod.page_craft.php. Raised by WMD in the Craft 1.4.0 test.
[2.6.0] — 2026-11-16
Added
-
LICENSE.md: PageCraft Commercial License Agreement, Version 2.0. PageCraft 2.x is a paid product: one license per production website, with any number of local, development and staging copies of that website. Copies of 1.x obtained free under Version 1.0 keep those terms; upgrading a site to 2.x needs a 2.0 license. New against 1.0: the bundled ContentBox.js, ContentBuilder.js and FormBuilder may only be used as part of PageCraft; the license notice must not be bypassed; the optional AI features are the customer's own OpenRouter account and terms. Ships in the add-on folder of the release package (build-release.shpackages every tracked file). -
Settings → Demo images: download the real demo photos and videos. The release replaces ContentBox's demo media (about 125 MB) with grey placeholders, so blocks and templates inserted on a customer's site showed grey boxes. A Super Admin can now fetch the real files, one template set per request.
- The build zips each set's real media before the placeholder step and writes a
manifest with a checksum per zip and per file (
scripts/media-packs.py).scripts/publish-media.shattaches them to a GitHub release taggedmedia-<ContentBox version>on the public content repo. - The shipped theme carries
assets/pagecraft-media.jsonwith each placeholder's size and checksum. A file is replaced only while it is still that placeholder, so a customer's own file is never overwritten. Only paths named in the manifest are written, each verified, so a tampered or truncated download writes nothing. Filenames are unchanged, and existing pages pick up the real images with no edits. $config['pagecraft_content_repo'](owner/repo) or$config['pagecraft_content_url'](any HTTPS base) point it elsewhere, for example your own server.- New
themes/user/pagecraft/contentbox/VERSIONrecords the bundled ContentBox version, since the bundle's own version string is unreliable. Update it on every vendor upgrade: it names the media release.
Tested end to end against a locally served release: 199 of 200 placeholders replaced byte-identical, the one changed file kept, a second run replaced nothing, and a corrupted zip was refused.
- The build zips each set's real media before the placeholder step and writes a
manifest with a checksum per zip and per file (
Changed
-
ContentBox.js 6.0.9 → 6.0.12. Bundles and assets from stock 6.0.12.
- What arrives with the bundle: select several blocks at once (drag from the
empty area beside them, then Delete), category tabs in the Snippets dialog,
undo for Image panel changes, editing a design-layer image from the panel, and
fixes to the element and image tool positions and to content added after a
wrapped image. 6.0.12's
imageResizeandimageTooloptions are not set, so the defaults (on) are unchanged. - Animated templates: 33 → 36. Three new animated headers made with photos
only. They use only
video-background, which is registered. The Animated pack index (templates-animated/blocks-index.json) is regenerated. It had not been since 0.9.1 and still listed 39 old designs, so the Sections tab counted from stale data until the site rebuilt it. The Simple Start index is regenerated too: it still listed the navbars pruned from that pack (73 → 65). - Swiper Slider fork merged three-way against 6.0.9. Upstream added per-device Slides Per View (desktop, tablet, mobile), a 9:16 ratio, embedded video slides (YouTube, Vimeo and others) next to local video, and inline SVG placeholders instead of requests to placehold.co. PageCraft's additions are kept: the Image Overlay (Dim) option, the richer new-slide caption, the overlay div on new slides, and jumping to a slide once it is added.
- The runtime bundle and stylesheet are unchanged from 6.0.9, so the scoped
sheets, the framework profiles and
reference/contentbox-vocabulary.mdstay as they are. The cache-buster is re-applied tocontentbox.min.js(+81 bytes, 3 sites). templates-showcasegains 51 templates that use Site Logo and Site Menu. That set is not offered in PageCraft, so nothing changes in the editor.contentbox/VERSIONis now 6.0.12, so Settings → Demo images looks for themedia-6.0.12release. Runscripts/publish-media.shafter the release build.
- What arrives with the bundle: select several blocks at once (drag from the
empty area beside them, then Delete), category tabs in the Snippets dialog,
undo for Image panel changes, editing a design-layer image from the panel, and
fixes to the element and image tool positions and to content added after a
wrapped image. 6.0.12's
-
ContentBox.js 6.0.8 → 6.0.9. New in the vendor release, and what PageCraft does with it:
- Light and dark mode for sections (Box panel → Mode) comes with the bundle and
the runtime sheet, which adds 8
*-mode-*colour utilities (text-mode-muted,bg-mode-surface…). The Quick templates now carrydata-mode="light". - Automatic plugin registration is on, as a safety net. A plugin that content
uses but
ThemeAssets::contentBoxPlugins()does not list now loads from the plugins folder instead of rendering as dead markup. That was the 6.0.0 failure, where 21 new plugins could be inserted and did nothing. The runtime is givenpluginFolderon the front end (field and module tags) and in the editor canvas. Without it, the runtime would derive the folder from a listed URL ending in/<name>/index.js, and ours end in?v=<version>, so the feature was off by accident and could have switched on by itself in a later vendor release. The list stays primary because its URLs carry the cache-buster; an auto-loaded plugin has none, so behind a CDN it can be stale after an upgrade until it is added to the list. This does not change the block picker. - Site Logo, Site Menu and Site Menu (always visible) ship as plugin folders
and are not offered. Their only blocks are the vendor's four new navbar templates
in templates-simple, which are pruned like the earlier navbars, since the Nav
Builder is PageCraft's navigation. The new Header templates
(
assets/templates-showcase/) are on disk but not wired into the editor.
Forks:
nav-menuandswiper-sliderwere unchanged upstream and are kept as they were.templates-quickandtemplates-simplewere three-way merged against 6.0.8: all 9data-pc-type="footer"tags and the single Navigation entry survive, and a staleonmouseoverbutton in templates-quick now takes upstream'sdata-cb-hover. The stockmodules/form-builder.htmlthe sync brought back is removed again. The bundle cache-buster (+81 bytes), the runtime scoping and the embed guards (1,507 rules, up from 1,501) are re-applied bypatch-contentbox.php. - Light and dark mode for sections (Box panel → Mode) comes with the bundle and
the runtime sheet, which adds 8
-
scripts/build-vocab-reference.phpreads the patched runtime sheet again. It found 0 classes on the sheet aspatch-contentbox.phpleaves it, scoped and carrying the embed guards. It now reads inside@scope, strips the guard, and prefers a bare class rule over an.is-*-prefixed one, so the type scale reads as font sizes. The reference is 834 classes, the 8 new ones the only difference.
Removed
-
The classic Form Builder. Its forked module
assets/modules/form-builder.htmlconflicted on every ContentBox upgrade, and it could only go once no production site held a classic form. katiesway staging and production are converted. Removed with it:ThemeAssets::rewriteFormActions(), the render-time<form>-tag rewrite that pointed classic forms atform_submit, and the_pc_hphoneypot check inFormSubmit. The current Form block is unaffected: its rewrite,rewriteContentBoxForms(), and itsreference_codehoneypot are separate.A site with classic forms left must convert them before upgrading. Without the module the block can't be edited, and its action is no longer rewritten, so it posts to the vendor's
/formsubmissionplaceholder. Runscripts/convert-classic-forms.php(dry run by default; see docs/08-forms.md). The converter stays, and so does the picker filter that hides the classic block.
Fixed
- "Could not regenerate sections file" when
pagecraft-sections.jsbelongs to another account. Seen on Cloudways, where a file uploaded by the master SFTP user can't be overwritten by PHP, which runs as the application user. When the folder is still writable,SectionFileWriternow writes a new copy beside the file and swaps it in, so the file ends up owned by the PHP user, and logs that it did. If the folder isn't writable either, the error is the same as before.
Docs
- Dynamic Content under a page cache.
docs/06-dynamic-content.mdnow says that template caching or a static or full-page cache freezes an embed with its page until that cache entry is cleared. Raised by WMD testing the Craft port.
[2.5.3] — 2026-10-08
Fixes from a review of the Craft port's Dynamic Content, by WMD (the Craft developer). Everything below that is not port-specific applied here too.
Fixed
-
The runtime no longer restyles embedded templates. An embed renders inside a ContentBox section, wrapped in
.pc-dynamic-render, so the host's own markup sat inside.is-wrapperand.is-container, and the runtime styled it. On a Craft site's Tailwind footer partial, 43 of 117 elements changed:sm:flex-rowcollapsed to a column, gaps shrank, borders went to 0. Two halves:- the scoped rules now stop at the embed:
@scope (.is-wrapper, .is-section) to (.pc-dynamic-render); - the 1,501 unscoped rules that reach descendants (
.is-container h1, the preflight.is-wrapper *) each get:where(:not(.pc-dynamic-render,.pc-dynamic-render *))on their subject.:where()has zero specificity, so for PageCraft's own content the cascade is unchanged. Only elements inside an embed stop matching.
The unscoped twins carry the guard on every rule, since they have no scope to bound them.
patch-contentbox.phpre-derives a sheet scoped by any earlier release from the file itself, so EE's committed tree still needs no vendor copy. - the scoped rules now stop at the embed:
-
A template embedding itself no longer loops. An embedded template that renders the same field re-entered the renderer forever. A Craft test page ran 23.7 s and 1.3 GB before a blank 500. Stripping
{layout}closed one route to it, not all.TemplatePreviewnow keeps a render stack: a template already being rendered is skipped, nesting stops at 3, and the reason is left as an HTML comment. Both render paths use it,render()and the fieldtype's inline path. -
Picking a template now marks the content changed. The picker modal bypasses ContentBox's editor flow, and the
inputevent it dispatched reached nothing, so autosave missed the choice. It now calls the builder'sonChange(). -
An empty embed can be configured again after a reload. The "click handler attached" flag was a DOM attribute, so it was saved with the content. After a reload the click did nothing. It is now tracked in memory and stripped from old content. The unset sentinel is also filtered on the
options.templatePathcopy ContentBox passes tomount(). That copy reached the render endpoint as "unset" and left the embed on "Loading…".
Added
$config['pagecraft_template_embed_roots']limits which template groups (orgroup/templatepaths) Dynamic Content may embed. It is enforced where an embed renders, not only in the picker, because anyone who can edit the HTML can type any path. Unset allows every template, as before. See docs/06-dynamic-content.md.
Changed
- The template-embed plugin is shared with the Craft and Statamic ports. They
carry byte-identical copies synced from this repo. The picker's wording no longer
names EE. The render URL joins
template_pathwith?or&depending on whether the base URL already has a query, and EE's?ACT=base produces the URL it always did. Treat this file as shared: change it here, then run each port'sscripts/sync-shared.php.
Verified
- Both scoped sheets differ from 2.5.2 only by the guards and the lower boundary. In Chrome, a page of 30 ContentBox sections plus an embed of Tailwind-style host markup: 663 content elements unchanged from 2.5.2, and host elements changed by the runtime from 13 to 0.
- The render stack skips self- and mutual embeds and caps depth at 3. Unit-tested here; exercised end to end on the Craft and Statamic ports, which carry the same logic.
- The plugin fixes were exercised in the Statamic editor, on the identical file: a
saved empty embed with the old flag opens the picker, a pick fires
onChange(), and the saved HTML has the path and no flag. With an EE-shaped URL the plugin requests?ACT=…&entry_id=…&template_path=…, as before. Not clicked through in the EE editor.
[2.5.2] — 2026-10-07
Fixed
-
Content stays styled when a host theme moves its sections. 2.5.0 scoped the runtime to
@scope (.is-wrapper)alone, which assumed our sections stay inside the wrapper. Crafto'smain.jsruns$('section').wrapAll('<div class="page-layout">')on every modern and full-screen-menu page, which lifts each<section class="is-section">out of the wrapper. Every scoped rule then matched nothing: the form plugin's styles and all the bare utilities. On katiesway.com a sign-up form rendered as bare text while the canvas looked right.Both scoped sheets (the runtime and its
.frameworkvariant) now scope to@scope (.is-wrapper, .is-section). Content stays styled wherever the theme moves it, and nothing leaks, because host markup never carries.is-section. Inside the wrapper nothing changes: every scoped rule shares the one@scope, so they still tie on proximity, and a scoped rule still beats an unscoped one at equal specificity.patch-contentbox.phpupgrades a 2.5.0–2.5.1 sheet by swapping the prelude in place, which is exact. The rules inside are what the transform would write from stock, so EE's committed tree needs no vendor copy for it. The unscoped twins have no scope block and do not change.Not rescued, and never were: the unscoped rules written as
.is-wrapper …. On a page where the theme moves the sections, section min-height, the container's 30px padding and the wrapper's font size still drop. That was already true before 2.5.0. -
The front-end runtime is cache-busted.
contentbox-runtime.css, its.frameworkvariant, their unscoped twins andcontentbox-runtime.min.jswere linked with no version, on both the field-tag and the module-tag path. After an upgrade a browser or CDN kept the previous runtime, so a stylesheet fix like the one above never reached visitors. They now carry?v=<installed version>, which changes on the first CP visit after an upgrade.
Added
- A pointer to Form Delivery in the form's Settings tab. ContentBox's
formblock takes its recipient and redirect from the blue envelope button on the section toolbar, never from its own Settings tab. But the Settings tab has "Form Submission Settings" in it, so that is where everyone looks first. Twice now that has been read as "the recipient setting is gone". A note under that heading now says where the setting is. It is injected into the plugin's editor iframe on each load, like the button itself, soassets/plugins/form/editor.htmlstays stock.
Verified
- Both scoped sheets changed by exactly one line each: the prelude. On a local page,
moving the sections out of the wrapper changes only properties set by
.is-wrapper …rules. The same two-root prelude, rebuilt from stock for the Craft port, restores the moved content completely in a reproduction of Crafto'swrapAll, with the host's own.p-4,.rowand.is-blockuntouched. Swapped into the live katiesway.com sign-up page, it restored the form, and reverting the swap broke it again. - Both front-end paths emit versioned runtime links (
.frameworkon the field tag, plain on the module tag). - With
form-delivery.jsloaded, the vendor'seditor.htmlgets exactly one note, directly under "Form Submission Settings", including when its iframe is inserted before itssrcis set. The plugin builds that iframe in the editor document, underbuilder.builderStuff, which the observer covers. Not yet clicked through in the CP.
[2.5.1] — 2026-10-02
Fixed
-
The editor canvas now has an
@scopefallback. 2.5.0 scoped the runtime stylesheet and gave both front-end paths a probe that loads an unscoped twin where@scopeis unavailable. The canvas got neither, and it loads the same sheet.Below the
@scopefloor (Chrome 118, Safari 17.4, Firefox 128) the browser drops the entire scoped block, so the canvas kept the.is-*rules and lost every utility —.row,.column,.p-4,.opacity-N. The section skeleton survives while the styling inside it does not, which reads as a content bug rather than a browser-support one. That is a worse failure to diagnose than the front end's would have been, and the front end was the half that already had the fallback.The probe is injected by
scripts/patch-contentbox.phprather than written into the file, because on the Craft and Statamic ports these canvases are vendor files replaced wholesale on every ContentBox upgrade. It derives the twin's URL from the stylesheet link already in the document, so it does not care where the theme is served from, and it parses a real@scoperule rather than sniffing a feature flag — the same test the PHP uses.
Added
build-release.shnow refuses to package an unpatched tree. It checked the cache-buster and nothing else, so a tree cache-busted before the scoping existed — or one whose canvases a vendor upgrade had replaced — passed and shipped a runtime that restyles the customer's page. It now also requires both runtime sheets to carry@scope, both unscoped twins to exist, andblank.htmlto carry the probe. Each failure names the fix. Verified by removing each in turn and confirming the build stops.
Verified
- In Chrome on the 6.0.8 canvas: with
@scopesupported the probe is a no-op and only the scoped sheet is linked. Forcing the fallback branch loads the twin and takes.p-4outside the wrapper from0pxto16px— the pre-scoping behaviour, leak included — while.is-sectioninside the wrapper stays styled. The0pxalso re-confirms the scoping itself from a second direction. --checkleavesblank.htmlbyte-identical; a second run reports the probe as already present on all three platforms.
[2.5.0] — 2026-09-26
Changed
-
ContentBox 6.0.8, up from 6.0.7. The vendor's own headline is keyboard access: Esc steps out of the text into the tools of whatever you are in and then one level per press — text tools, a picture or table's tools, element, column, row, box, section — with Shift+Esc stepping back in, arrows along a toolbar, and Enter or Space to use a button. Also improved drag & drop placement, and a new
builder.sortableList()for plugin settings panels.That last one closes a CDN dependency we had reported upstream. Every bundled plugin now uses
sortableList()instead of pulling a drag library from a CDN at panel-open time — 81 of the 94 changed vendor files are that one refactor.The upgrade touched no PageCraft code. Four of the seven locally-patched vendor files changed upstream and were three-way merged; the merge base is 6.0.4, not 6.0.7, because that is when these forks were last synced:
plugins/swiper-slider/index.js— ours adds theoverlayDimfield. Merging against the true ancestor also picked up 6.0.6/6.0.7's asset-field rework, which this fork had been missing: the plugin's image field still used a hand-rolled browse button instead ofbuilder.createFileButtons(), so it never offered the asset manager. Fixed as a side effect of merging correctly.templates-quick/templates.js— ours addsdata-pc-type="footer"; upstream had moved the demo markup todata-cb-hoverand we were still carrying the oldonmouseoverhandlers.templates-simple/templates.js— ours adds the Navigation category and prunes the vendor's Legacy navbar section (scripts/prune-nav-sections.py). Both survived the merge: category 4 present, category 6 at 20 entries not 21.plugins/nav-menu/index.js— not merged. Ours differs from stock by 4,295 lines against upstream's 78; it is a different plugin under the vendor's filename, and the standing decision is to rebuild rather than keep patching.
No new plugins or block categories in 6.0.8, so both hardcoded registries (
ThemeAssets::contentBoxPlugins(),BlocksJs::BUILTIN_CATEGORIES) are unchanged.code-viewandform-panelremain deliberately unregistered. The vocabulary reference regenerated identical at 826 classes; the framework profiles regenerated at the same 90 / 122 rules.
Added
-
scripts/patch-contentbox.php— the local vendor patches, reproducible.Craft and Statamic have had this since 1.3.0. EE did not, and EE is the platform where it matters most: the upgrade recipe is
cp -Rover the vendor tree, and every copy silently overwrites a patched file with stock. Nothing errors. The editor still boots. You find out when a CDN serves stale module HTML, or when a customer'sopacity-8turns out to be 8% instead of 80%.It applies the three-site module cache-buster and the runtime stylesheet scoping, is idempotent, and
--checkreports without writing. Point it at any site's theme folder to audit that install — there are six local EE sites carrying their own copy and they drift. -
The ContentBox runtime stylesheet is now scoped to
.is-wrapper. Ported from the Craft and Statamic 1.3.x round, where an outside review measured the leak.contentbox-runtime.cssships ~2,000 bare utility selectors —.row,.column,.p-4,.opacity-N,[class*=size-]— with no ancestor, so they restyled the whole host page, not just PageCraft content. On a Bootstrap host that is the.rowgutter collapse; on any host it is the.opacity-Npercent-vs-tenths collision already recorded in PAGECRAFT_STATE.md section 4.Only the leaking half is scoped. Selectors already rooted at
.is-*,body,htmlor:rootstay exactly where they are — wrapping the sheet wholesale breaks the content instead, because inside@scopea bare selector gains an implied:scopeprefix and.is-wrapper div.is-sectioncan then never match. Keeping them out also sidesteps scope proximity, which is weighed before order of appearance: a scoped.is-container h1would outrank the typography presets'.type-* h1at equal specificity. Because it never enters the scope, the 348 preset sheets need no change.The global
body { width:100%; overflow-x:hidden; … }rule is reduced tobody { margin:0 }rather than dropped.overflow-x:hiddenbreaksposition: stickypage-wide on a customer's site;margin:0is load-bearing, and without it a bare host renders the content 16px narrower than the editor showed. -
A fallback for browsers without
@scope. A browser that does not know the at-rule drops the whole block rather than ignoring it and keeping the contents — which would leave PageCraft content completely unstyled, far worse than the leak.@scopeneeds Chrome 118+, Safari 17.4+ or Firefox 128+.So both emission paths now probe for it — by parsing a real
@scoperule, not by sniffing a flag — and load an unscoped twin of the sheet when it is missing. Older browsers get exactly what they got before: styled content, some leakage.wrapper="no"is deliberately not treated as "there is no wrapper to scope to". It means the opposite in practice: the theme supplies the.is-wrapperitself and asks PageCraft not to add a second one, as this repo's ownlayouts/_wrapper.htmldoes for the global header and footer. A first attempt did switch sheets on that parameter, and because the runtime CSS is enqueued once per request and the global header runs before{layout:contents}, it would have turned the scoping off for every page on the stock layout.
Verified
scripts/patch-contentbox.php --checkleaves all three checksums untouched, and reports the patched tree as already applied.- The reviewer's
pagecraft-verify.py, run against this tree in headless Chrome:runtime → host9 / 0 / 0 andhost → content0 / 6 / 41 for no-CSS / Tailwind 4 / Bootstrap 5 — identical to Craft 1.3.2, and matching their reference transform's numbers. Scoping changed no content element on any host. - Front end on ee-pb: scoped sheet linked once, probe emitted once, twin referenced,
7 sections rendering, with
wrapper="yes"andwrapper="no"alike. blank.htmlcanvas in Chrome on the 6.0.8 bundle:ContentBoxRuntimeconstructs, 1,094 rules parsed from the scoped sheet with the@scopeblock intact.node --checkpasses on all three vendor bundles and all three merged forks.
[2.4.0] — 2026-09-23
Changed
-
The editor's JavaScript now lives in files, not PHP heredocs.
Actions/EditorFrame.phpcarried 2,028 lines of JavaScript inside heredoc strings — 67% of the file. It now carries none, and emits one configuration object plus ten plain.jsfiles inthemes/user/pagecraft/js/editor/. The file itself went from 3,028 lines to 1,268.This is preparation, not a feature. Ported as-is to the Craft and Statamic builds those 2,028 lines would have become three copies that drift, which is exactly how the gap between the three builds opened in the first place. Extracted, they are roughly 2,000 lines all three can share.
Nothing about the editor's behaviour changes. Every block moved byte-for-byte, verified by diffing the extracted file against the removed text; where indentation had to shift (object-literal members becoming statements) the changelog entry for that commit says so.
window.PAGECRAFT_CONFIGis the new interface between the CMS and the editor. It carries version, user permissions, URLs, global-component lock state, feature flags, section categories, and the ContentBox options object PHP assembles from add-on settings, block packs, template packs and the framework profile. The extracted scripts read only from it, so they never learn which CMS they are running under. Live runtime handles keep the existingwindow.pagecraft_*convention;sendSavejoinspagecraft_builderandpagecraft_csrfaspagecraft_save.Extracted:
boot.js,copy-paste.js,column-split.js,save-as-section.js,sidebar-buttons.js,global-header.js,global-footer.js,form-delivery.js,typography-scope.js,position-tool-guard.js.
Fixed
- Three extracted blocks referenced the page IIFE's
buildervariable, which a shell scan had reported as absent. Two threwReferenceErroron first load; the third,column-split, had thirteen more references that had not thrown only because they sit in observer callbacks nobody had triggered yet — it would have shipped looking fine and broken on first use. Each file now resolvesbuilderonce fromwindow.pagecraft_builder. Caught by the browser console, not the scan.
Note
- The
?v=cache key on these files is the add-on version, so this release invalidates them cleanly. Editing an extracted file without bumping the version serves the stale copy from browser cache — worth knowing during development. - On a development install the repo's
themes/user/pagecraft/and the site's are separate directories. Changes to an extracted script must be copied across, or you will debug a change that never reached the browser. Packaging is unaffected: this script hoists fromgit archive.
[2.3.1] — 2026-09-23
Fixed
-
"Array to string conversion" from
LicenseGrace, raised on every install that had not yet written its grace key — which is every install, since the key is only written when something is wrong with a licence.->row('value')is a real EE idiom:DB_result::row()returns the named column when a matching row exists. When none does,array_key_exists()fails on the cached row data,$nresets to0, and it returns a row instead. Casting that to string produced the warning — and the literal string'Array'.That had a side effect beyond the noise.
state()callsclear()on a licensed site;clear()comparesget()against'', and'Array'is not'', so it concluded there was something to clear and wrote an empty row intoexp_config. One spuriouspage_craft_license_grace_sincerow per site, on the first render of a publish form or the settings screen.Both storage reads now use
->row()and read the property, which behaves the same whether or not a row exists. Verified against a reproduction of EE's ownDB_result::row(): with a row present, old and new agree; with none, the old returns'Array'and warns while the new returns''silently.The grace clock itself was never wrong —
(int) 'Array'is0, the same as(int) ''— so no licence state was misreported.Checked all six local installs: no spurious rows exist, because none has rendered a PageCraft field since 2.2.0 landed. If one turns up elsewhere,
DELETE FROM exp_config WHERE \key` = 'page_craft_license_grace_since'` is safe — the value is recreated on demand.
Note for the suite
- This bug is in the shared
LicenseGracesource, so Mason has it too, as will any add-on that took the same copy. The porting guide says to change only the namespace, which faithfully carried the defect across.
[2.3.0] — 2026-09-23
Changed
-
ContentBox.js 6.0.4 → 6.0.7. Cleanest bump yet, and it fixes a bug EE users have today: changing a link's URL in the link dialog did not take effect (6.0.7), a regression introduced upstream by a ContentBuilder update.
Also arriving: quick section controls on the Box panel and switches to hide the on-page section/box tools, both opt-in and off by default (
sectionQuickTool,sectionTool,boxTool— 6.0.6); plugin image and video fields now offer an asset manager and an upload button (6.0.6); and a colour-picker fix for editing a value by paste or caret movement (6.0.6).- Cache-buster re-applied exactly as the recipe predicts: 3 modulePath sites,
+81 bytes,
node --checkclean. - No registry drift. 57 plugins on disk, 55 registered; the two unregistered
are
code-viewandform-panel, which is the deliberate state from a45/a47, not a miss. No new plugins and no block-category changes in 6.0.5–6.0.7. - No authoring guidance moves. The class vocabulary is unchanged at 826
classes — only the generation date differs — and the framework profile still
weakens exactly 90 runtime rules, so 6.0.5–6.0.7 added no bare
!importantutilities. - 22 vendor files changed: the six bundles plus 14 plugins touched by 6.0.6's asset-field rework.
Investigated and cleared: 6.0.6 replaces each plugin's hand-rolled browse button with
builder.createFileButtons(), which shows the asset-manager button only whenhasFilePicker()passes — and that testsimageSelect/mediaSelectand friends, none of which PageCraft sets. That looked like a silent loss of the asset picker across 14 plugins. It is not: ContentBox maps thefilePickeroption onto all five of those properties at boot, so the button appears as before. Recorded because the next person to readhasFilePicker()will reach the same wrong conclusion.The three-way merge was again unnecessary — but for a new reason worth writing down. Three of the seven forked files did change upstream after 6.0.4 (
nav-menu/index.js,swiper-slider/index.js,templates-quick/templates.js, all dated 2026-09-14). For nav-menu it does not matter: ours is 3,879 lines against stock's 684, differing by 4,576, while upstream changed 17. It is not a fork any more, it is a different plugin under the vendor's filename — which is what the standing "rebuild it, don't keep patching" note has been saying. - Cache-buster re-applied exactly as the recipe predicts: 3 modulePath sites,
+81 bytes,
Verified
-
Confirmed working in the control panel on 2026-09-23, on 2.3.1 (which carries this upgrade plus the
LicenseGracestorage fix).That makes all three platforms confirmed on ContentBox 6.0.7 the same day — ExpressionEngine, Craft and Statamic — which is the first time the suite has been on one version since the Craft and Statamic scaffolds were written in March.
[2.2.0] — 2026-09-22
Added
-
Licence notice — Bison's shared
LicenseGracecomponent, ported from Mason 1.16.0. PageCraft is an EE store product as of 2026-09-21, so EE now reports a real licence status where it previously reportedna.Nothing is gated on it. The class produces one thing — a sentence — and the add-on does exactly two things with it: prepend it to the publish field and raise it as an inline alert on the settings screen.
isLicensed()andstate()are never read outside the class, so no code path anywhere branches on a licence state. An unlicensed install is a fully working install with a message on it.That is deliberate, not an oversight. An author cannot fix a billing problem, usually does not know what a licence is, and would lose the afternoon — while the person who can fix it is not the one writing pages that day. It also means a licence check that gets it wrong costs a notice rather than someone's work. Mason shipped the opposite and reversed it.
- Grace clock runs from the problem first seen, not from installation, and resets on success — so a two-year-old site whose card expires gets seven soft days, not the firmest wording on day one.
- Dev hosts (
.ddev.site,.test,.local,localhost,127.0.0.1) are always licensed. - Publisher domains via one shared config line, not one per add-on:
$config['bison_licensed_domains'] = ['gobison.digital', ...]; - Owner matching is exact host, so listing
example.comdoes not quietly covernotexample.com. - No table, no migration, no settings screen: the clock lives in EE's own
exp_config.
Ported with a single change to the source — the namespace — verified by diffing against Mason's copy line for line. Two deviations from the porting guide, both because it described a different checkout: the directory here is
Services/(plural), matching the six services already present, and the commit belongs in the page_craft repo, not the jontoney site repo, which holds a deployed copy.
Verified
- All thirteen rows of the guide's behaviour table reproduce against a harness:
na/valid/update_available/missing_license_key/license_expiredall resolve to licensed;invalidgives grace at day 1 and 4, lapsed at day 9; renewal clears the clock;.ddev.siteand owner domains are exempt; and a host that merely ends with an owner domain is not. - Confirmed by grep that no code outside the class reads the licence state.
Note on existing installs
- Versions before 2.2.0 contain no licensing code and are unaffected by this release — there is nothing in them to change behaviour. On upgrade, an unlicensed site gains a notice and loses no functionality.
[2.1.2] — 2026-09-16
Added
-
config.phpoverrides for External Preview, because the setting lives in the database and therefore travels with a database clone:$config['pagecraft_external_preview_url'] = 'http://localhost:4321'; $config['pagecraft_external_preview_pattern'] = '/{uri}/';A preview URL of
http://localhost:4321cloned to staging points every editor there at their own machine. That is the same shape of bug as a clonedsite_url, which cost a day on staging.katiesway.com earlier this month — worth closing before it happens rather than after.A config value that is set but EMPTY forces the feature off, so a production config can disable it regardless of what a cloned database says. The check is for presence, not truthiness:
?:would fall through to the database on an empty string and defeat the point.Credit where due — this was spotted in an independent review of the integration, not by me.
[2.1.1] — 2026-09-16
Fixed
- External Preview did nothing at all. It read the entry's URL title from
$this->row, which EE populates when a fieldtype renders a tag on the front end — not when it draws the publish form. So the title came back empty on every entry, hit the new-entry guard, and fell through to the EE preview. The guard behaved correctly; the fault was trusting an EE internal for a value that can be looked up. It now uses$this->rowas a fast path and falls back toexp_channel_titleskeyed on theentry_idalready resolved above.
Added
-
{uri}placeholder — the Structure URI, and the one to reach for on any Structure site.{url_title}and{uri}agree on top-level pages and diverge as soon as one is nested: a page under Services has the URIservices/consultingbut the URL titleconsulting, so/{url_title}/previews a page that does not exist. That only shows up the first time someone nests a page.It reuses the same
site_pageslookup the EE preview button already did, hoisted intostructureUriFor()so the two cannot drift. If Structure has no URI for the entry, Preview falls back to the EE page rather than building a URL that is probably wrong.
Documentation
- The home page gets its own note. Most headless front ends render home from an
index route at
/and exclude it from the dynamic route so it is not built twice, while EE still knows that entry as/home/— so Preview 404s on exactly one page. PageCraft reports the CMS path on purpose; guessing which entry is "the index" would be inventing the app's routing convention, and differently for each front end. The docs show the one-line Astro redirect that maps it, which also fixes hand-written links following the CMS path.
Verified
- Confirmed working on ee-bones against
astro dev:aboutresolves through{uri}, and home resolves once the app maps/home/to/.
[2.1.0] — 2026-09-16
Added
-
External Preview — point the editor's Preview button at a headless front end (Astro, Next, Eleventy) instead of the EE page.
Two settings under Global Settings:
- External Preview URL — e.g.
http://localhost:4321 - External Preview Path — appended to it, default
/{url_title}.{url_title}and{entry_id}are the placeholders, so/blog/{url_title}and/p/{entry_id}both work.
Deliberately not a toggle plus a URL. Two controls means two ways to be half-configured — switched on with no URL, or a URL doing nothing because the switch is off. A blank URL is the off state, so the setting cannot disagree with itself.
A new, unsaved entry falls back to the EE preview. It has no URL title, so a
/{url_title}pattern would resolve to the front end's index — which looks like a working preview of the wrong page. Falling back cannot mislead.Which server you aim at changes the workflow, and the docs say so: a dev server fetches per request, so preview is live the moment you save and no build is needed; a built static site serves the last build and lags until rebuilt. For day-to-day editing the dev server is the one you want — which is why this shipped before any build-trigger button.
- External Preview URL — e.g.
Verified
- The URL builder was exercised across nine cases: trailing slash on the base,
missing leading slash on the pattern,
{entry_id}-only patterns with no URL title, a new entry with no URL title, empty pattern falling back to the default, blank base switching the feature off, and a URL title needing percent-encoding.
Not yet verified
- The button has not been clicked in a live control panel — the CP session
expired mid-test and logging in is not something I do. The logic is covered
above; what is unconfirmed is only that the rendered
hrefmatches.
[2.0.8] — 2026-09-15
Fixed
{exp:page_craft:html}and{exp:page_craft:css}failed silently. Both requireentry_idandfield, and returned an empty string without them — a blank page and no explanation. They now emit an HTML comment saying what is missing, the wayrenderalready did.
Documentation
-
The reference described
{exp:page_craft:html}as rendering "the current entry … without knowing the field's name". It has never done either. The method has required both parameters since v1.3.0; a bare tag returns nothing. The README's layout example showed it with no parameters at all, which is exactly the template someone would copy and then watch do nothing.Both corrected, and the page now says what to use instead: inside
{exp:channel:entries}, use the field tag ({page_builder}), which the channel module resolves per row. The module tags are for when you already hold an entry id. This also sidesteps the parse-order trap already documented underrender, where{entry_id}is not yet substituted when a nested module tag runs.Third false claim found in this reference in two days, after
main_cssandsection_cssin 2.0.5. The page was written from intent rather than from the code.
[2.0.7] — 2026-09-15
Fixed
-
Duplicate heading ids on the CP Documentation page. All fifteen docs render into one page with one renderer instance, but
render()reset its slug counter on every call — so seven elements carriedid="reference"and twoid="troubleshooting". Invalid HTML, and any in-page link to one of them landed on the first. The counter now carries across calls so the existing collision suffix does the work (reference,reference-2, …);resetSlugs()is there for a standalone render that wants a clean namespace.Verified: 119 ids on the assembled page, 119 unique, 0 duplicated.
Investigated, not reproduced
-
A report of stray bordered "pill" artifacts on the Documentation page, diagnosed elsewhere as unclosed fenced code blocks leaking
<code>tags. That does not reproduce against this codebase at any version. Checked three ways:- Every doc renders with balanced tags, and the assembled page has no
<pre>inside<code>, no nested<code>, and no empty<code>. - Loaded in a real browser — whose HTML5 parser is what would do the
reconstructing — the live CP page at 2.0.6 reports 401
<code>elements, zero empty, zero nested. The 2.0.1 and 1.1.25 doc sets render the same way. - The measured pill styling in that report (
1px solid #dfe0ef, radius 5px) is not PageCraft's:.pc-docs-body codeis#f0f3f8with no border. So the elements described were not inside our docs body.
The duplicate ids above are a genuine defect found while looking, but they do not produce that visual. If the artifacts persist after updating, the missing piece is which site and version they appear on.
- Every doc renders with balanced tags, and the assembled page has no
[2.0.6] — 2026-09-14
Added
-
AI Assistant documentation (
docs/09-ai-assistant.md) — closing the gap 2.0.5 recorded. A shipped 2.0 feature with two settings surfaces, five image models, a rate limiter and an OpenRouter dependency had no page at all.Covers what a user cannot work out alone: that PageCraft does not resell AI and you bring your own OpenRouter key; that the key is encrypted and never shown again, so a blank field after saving is correct rather than a failed save; that the toggle and the key are both required, which is the cause of a missing button; and that generated images land in the EE file manager as ordinary files.
Every figure was read from the code rather than recalled — 40 requests per minute per member (
AiProxyGuard::RATE_MAX), the 2,000-character image prompt cap (AiImage::MAX_PROMPT_CHARS), the code and chat model lists, and the fixed image-model allowlist that stops a tampered request billing an arbitrary model. The button is described as the code creates it: sparkles icon, tooltip AI Assistant, in the left toolbar.It also records the thing this week taught us the hard way: AI pages compose from raw markup rather than the block picker, so they exercise different code paths from hand-built pages, and saying "it was AI-generated" is useful when reporting a rendering problem.
Verified
- 15 docs now agree across all four places — on disk, registered in the CP, linked from the index, and in the package.
[2.0.5] — 2026-09-14
Fixed
- The Template Tags Reference documented two tags that have never existed.
{exp:page_craft:main_css}and{exp:page_craft:section_css}have no matching methods on the module, so anyone following the page got nothing and no error. Replaced with the tag that actually does the job,{exp:page_craft:css}, including the detail the old entries omitted: bothentry_idandfieldare required, and it outputs nothing at all without them. The note explains what happened rather than quietly swapping the names, since anyone whose template already uses the old tags needs to know why they render nothing. {exp:page_craft:runtime_assets}exists and was undocumented. Now listed.- The "Reference" footer listed the same two non-existent methods. Corrected to
render(),html(),css(),runtime_assets(),global_header(),global_footer().
Added
- An Asset placeholders section in the tags reference. The page bills itself
as the full listing and omitted all four
{pagecraft_*}placeholders, which were documented only in passing on three other pages. - Guidance to put
{pagecraft_styles}before your own stylesheets, in both the reference and the examples page. ContentBox ships utility classes with common names, many carrying!important, so load order decides collisions. Calls out.opacity-*specifically: ContentBox reads it as a percentage (opacity-8= 8%) while many themes read it as tenths (80%), which silently rescales a theme class that works everywhere else. Written from the gobison.digital overlay that rendered at 8% instead of 80%.
Changed
docs/README.mdcalled page 07 "Grid Framework"; the CP sidebar and the page itself call it CSS Framework. Aligned.
Verified
- All 14 docs agree across four places: on disk, registered in the CP, linked from the docs index, and present in the package.
- Every
exp:page_craft:*tag appearing in the docs now resolves to a real method, checked mechanically rather than by eye.
Known gap
- AI Code Chat has no documentation at all — not the OpenRouter key, not enabling it, not image generation. A shipped 2.0 feature with a settings surface and no page. Worth writing; not written here.
[2.0.4] — 2026-09-14
Fixed
-
"+ → Image" inserted nothing visible. Same for Video and Audio.
ContentBox builds the sample media from
snippetPath + "example.png", and PageCraft setssnippetPathto empty on purpose —Actions/BlocksJs.phpalready rewrites every block path to an absolute URL, because packs live in different directories and a shared prefix cannot serve them all. So the sample references collapsed to a bareexample.png, resolved against the canvas<base>, 404'd, and inserted an<img>with an emptyalt— which renders as nothing at all.Fixed with ContentBox's own escape hatch for this, which PageCraft had never set:
snippetSampleImage/snippetSampleVideo/snippetSampleAudio, each pointed at the real asset inassets/minimalist-blocks/.snippetPathstays empty, so block thumbnails keep working. Applied to the editor frame and the global-component frame. -
The release build was deleting
example.mp4from every package. It was on a hardcoded "verified orphan" list, added because grepping the package for the basename found no reference — which it never could, since the path is assembled at runtime fromsnippetPath. The asset only looked unreferenced because of the bug above: the same defect both broke the reference and hid the evidence. Removed from the list, with a note that a basename grep cannot prove a file unreferenced when paths are built by concatenation. -
An empty
ORPHANS=()array would have broken the build on macOS. Bash 3.2 errors on"${ARR[@]}"for an empty array underset -u; the expansion is now guarded.
Known remaining
- Two built-in row templates insert
snippetPath + "images/img-2400x1350.png"and are still broken for the same reason. ContentBox exposes no option for those, so the only fixes are duplicating a vendor asset to the theme root or forking the bundle — neither worth it without the case actually coming up.
[2.0.3] — 2026-09-13
Added
-
An "Apply to: This section / Whole page" switch on the Typography panel.
ContentBox could always apply a style page-wide —
applyTypographyStyle()branches onbuilder.typographyStyleScope === "all"and walks every.is-sectioninstead of just the active one. What it never had was a way to set that.setTypographyStyleScope()is defined once incontentbox.min.jsand called by nothing — not the vendor's own UI, not PageCraft — so the value stayedundefined, fell back to"section", and the"all"branch was dead code in every install. Choosing a font "for the page" quietly styled one section.So this is the missing control, not a new capability. Injected into the vendor's panel rather than forked into it — the same technique as the Form Delivery button — so
assets/stays overwritable on upgrade.It resets to "This section" every time the panel opens, deliberately. A sticky page-wide scope is destructive by surprise: set it once for a global font, come back later to restyle one section, and every other section's typography is silently overwritten. Page-wide is a deliberate act each time.
Nothing changed on the render side, which was checked before concluding: both scopes emit identical markup (
type-*on.is-section; the wrapper never receives one), the existing regex already emits the right<link>tags, and all 174assets/styles/type-*.cssfiles are present. Section-level typography was never broken.
Documentation
docs/02-editing-sections.mdgains a Typography section covering the switch, why it resets, and the fact that "whole page" means this field — Global Header and Footer are separate components and keep their own typography.
Known scope
- The switch reaches sections in the current field only. Site chrome must be styled in its own component.
[2.0.2] — 2026-09-12
Fixed
-
A page with no plugin blocks loaded the ContentBox runtime and never started it, so
data-fx-*motion,section-pin,data-cb-hover, marquees, split text and horizontal scroll were all dead — and the page rendered invisible, not merely unanimated.getRuntimeJs()emittednew ContentBoxRuntime(...).init()only when the content contained at least onedata-cb-typeplugin block. The runtime has noDOMContentLoadedlistener of its own, so nothing else ever constructs it: the script tag was served and then sat inert.It renders invisible rather than static because the editor bakes each animated element's first keyframe into its inline style. Without the runtime to advance them,
opacity:0,opacity:0.2,transform:translate3d(...)andstroke-dashoffsetstay exactly as written.Found on an AI-generated page at gobison.digital that rendered blank while every hand-built demo beside it was fine — those happened to contain a plugin block, which is the only reason their runtime ever started. AI-generated pages are disproportionately exposed: they compose from raw markup and motion attributes rather than from the block picker.
Fixed on both render paths (
ft.page_craft.phpandmod.page_craft.php): the runtime is now constructed whenever it has just been loaded, plugins or not. Verified that only this case changes — a page with a plugin block, a second field registering a new plugin, and a second field with no new plugins all emit exactly what they did before.
[2.0.1] — 2026-09-11
Added
-
Forms documentation (
docs/08-forms.md) — PageCraft had none, for a feature with a global setting, a per-form override, reCAPTCHA and two different blocks.It leads with the thing that actually costs people time: Notification Email and Redirect URL are on the Form Delivery button on the section toolbar, not in the form's own Settings tab. That is a deliberate design consequence — it is what keeps PageCraft's additions outside the vendor plugin's files so the plugin can be replaced wholesale on every upgrade — but nothing said so outside a commit message, and the settings were looked for in the Settings tab first, which is exactly where they are not.
Also covers the recipient resolution order (per-form → global default →
webmaster_email), what a redirect actually does to the success message, both spam layers and which key goes where, the two form blocks and where each keeps its settings, and running the converter.Registered in the CP docs list and the docs index.
Fixed
README.mdstill said ContentBox 5.x is bundled. It has been 6.x since a44.
[2.0.0] — 2026-09-11
First stable release on the ContentBox 6 line. Supersedes 1.1.25; the 2.0.0-a1
through 2.0.0-a49 entries below are the development history of this release and
are kept for reference rather than repeated here.
Headline changes since 1.1.25
- ContentBox.js 5.9.5 → 6.0.4. Vendor assets resynced, all seven local forks preserved and re-verified, the module cache-buster reapplied. 21 new plugins registered that the hardcoded allowlist would otherwise have left inert.
- Nav Builder rebuilt on ContentBox 6 — logo variants, mobile menu, theming that supplies values rather than properties, undo checkpoints.
- Framework profiles. Selecting Bootstrap/Tailwind now serves a de-importantised profile stylesheet and puts ContentBox in its non-destructive grid mode, instead of arming grid normalisation. Reverses the old "set it to native for imported templates" rule.
- Template Ingest hardened and, for the first time, measurable —
scripts/measure-ingest.phpscores a real pack and gates on marker violations. Section names now come from the filename, closing a silent data-loss path that destroyed 42% of one 43-section pack. - AI Code Chat works. The proxy request/response contract, the CSRF gate,
max_tokens, image attachments, vision and the image-generation protocol were each separately broken. - Forms. ContentBox 6.0.4's
formblock is registered and extended — per-form notification email and success redirect — as an extension around an untouched vendor folder rather than a fork.scripts/convert-classic-forms.phpmigrates classic Form Builder blocks onto it. - Authenticated editor frames are never cached, and the Unauthorized page now names its own cause instead of telling a logged-in user to log in.
Upgrade notes
upd.page_craft.php::update()is idempotent and does not gate on the previous version, so 1.1.25 → 2.0.0 applies in one pass. EE runs it when it notices the version change — visit each site's CP once.- Copy both
system/andthemes/, but never blanket-copy the theme tree over a live install: excludepagecraft-sections/,imported/and*/blocks-index.json, which are generated per install. See docs/00-installation.md. - Sites behind a CDN should purge their pull-zone once after deploying.
[2.0.0-a49] — 2026-09-11
Fixed
-
The converter now also removes flattened classic-form script text — the long-running "form renders its own JavaScript down the page" report, finally diagnosed from real stored markup.
It is a separate problem from the conversion, which is why a48 left it behind: an earlier save committed a canvas in which the module's
<script>had been broken open, so part of its body was parsed as markup and persisted as real content beside the block. Converting the block does not touch it — it lives outside the block — so a converted entry renders a perfect new form with the old script's text still spilling down the page underneath.- Signature:
</div>';— a div close immediately followed by a JavaScript string terminator. No legitimate HTML produces that. - The trap: the same sequence occurs inside the intact
<script>, where it is correct. Script bodies are masked before matching, offsets preserved. - Boundaries are structural, never textual. Start is found by walking back
with depth counting to the element the corrupt close belongs to; end is the
first unbalanced
</div>, stopping before it — that one is the row's own close, and swallowing it would unbalance the document while "cleaning" it. Anchoring on the message text would have been wrong: both messages are per-form settings, so a site with custom wording would be missed.
The row filter now also matches
statusInfo, because an entry converted by a48 no longer containsform-builderwhile still carrying the damage — a filter on the old marker alone would silently skip exactly the entries that still need cleaning.Verified against a fixture built from real katiesway markup: remnant removed, intact
<script>preserved, form block and map column preserved, div balance 9/9. And against the realdata-settingspayload: both wrapper attributes written,submissionTypecorrectly forced tostandardby the redirect, all four fields carried, theme pruned to its one non-empty value. - Signature:
Verified on real content
-
katiesway staging, 2026-09-11 — 10 forms in 10 entries, 1 flattened remnant, 0 warnings, applied. A second dry run afterwards matched zero rows, and the converted forms render correctly in the editor with their per-form delivery settings carried across.
A live submission through a converted form has not been run separately; the new block's delivery path was proven on a hand-built form in a45.
[2.0.0-a48] — 2026-09-11
Added
-
scripts/convert-classic-forms.php— migrates classic Form Builder blocks to ContentBox 6.0.4'sformplugin, so the permanently-forkedassets/modules/form-builder.htmlcan eventually be deleted. The fork cannot go while entries still contain classic forms, because the module IS their editor.What makes it safe to automate: both blocks render through the same FormViewer, so the form definition — fields, labels, types, validation, order — is the same schema on both sides and moves across verbatim. Nothing is re-derived or guessed. Only the storage location and the settings key names differ:
classic data-settingsnew cb-form-defjsonformjsonTheme/jsonWorkflowtheme/workflow(pruned)formActionsettings.actionsubmissionTypesettings.submissionTypethankYouMessagesettings.successMessage(HTML-unescaped)errorMessagesettings.errorMessage(HTML-unescaped)siteKeysettings.recaptchaKeynotifyEmaildata-pc-notify-email(wrapper attribute)redirectUrldata-pc-redirect-url(wrapper attribute)The last two are PageCraft's own per-form features, and they map exactly onto the two wrapper attributes a45 built. That is why the conversion loses nothing.
Dry run by default;
--applywrites every original field value to a timestamped backup first and refuses to run if the backup directory cannot be created. The enclosing.columnis preserved — only the module attributes and the block's contents are replaced, so rows and sibling columns are untouched.Verified against real content (ee-pb, 2 forms in 2 entries): 0 classic attributes left, valid
cb-form-defJSON, all 3 fields carried with names intact, theme preserved.
Known limitation
- The pre-JavaScript snapshot is not carried. The new block stores a copy of
FormViewer's rendered output inside
.cb-form-fieldsso visitors see the form before scripts run; producing it means running FormViewer in a browser, which a PHP script cannot do, so the container is written empty.mount()re-renders from the definition, so the form is correct for every real visitor — what is missing is only the no-JS paint. Open each converted entry in the CP once and save it to regenerate the snapshot permanently.
Fixed
- Two defects found by running the converter against real data rather than
trusting it:
- The row filter matched
data-module="form-builder"in SQL, which returns zero rows — field data is stored as JSON, so the HTML inside has its quotes backslash-escaped. SQL now narrows loosely and the converter decides precisely, after decoding. ?? 'json'did not catch the classic module's empty-string settings, and an emptysubmissionTypeis not harmless: the plugin'sDEFAULT_SETTINGSonly fills keys that are ABSENT, so an explicit''overrides the default and the form submits in no mode at all. A real form converted withsubmissionType: ''before this was fixed.
- The row filter matched
[2.0.0-a47] — 2026-09-11
Changed
-
Retiring the classic Form Builder block — which turns out to be mostly already done, upstream.
The ask was to remove the old form in favour of 6.0.4's
formplugin. What measurement found:- The picker file PageCraft serves is
minimalist-blocks/content-plugins.js, and 6.0.4 already retired the classic block there, commented out with LINE comments — which is why a block-comment scan reports it as live. It has not been in the block panel since the 6.0.4 sync landed in a44. - The quick-add "+" menu independently prefers the new plugin: the bundle
branches on
t.win.builderRuntime && !t.opts.formTemplate.trim(), andblank.htmlalways setswindow.builderRuntimewhile PageCraft never setsformTemplate. So the+→ FORM button insertsdata-cb-type="form". - Consequently a45's "Form Builder (classic)" rename never had any visible effect — it renamed a block that is not served. Removed here, and the a45 entry corrected.
A content-matched guard is kept in
Actions/BlocksJs.php: it drops any snippet whose html containsdata-module="form-builder". Measured as a no-op today (267 snippets in, 267 out) and kept deliberately — the upstream retirement is a commented-out block in a vendor file re-synced wholesale on every upgrade, and the siblingcontent.jsstill carries a live classic entry. Matching on content rather than block index means it survives the index shifts every vendor sync causes. - The picker file PageCraft serves is
Not removed, deliberately
-
assets/modules/form-builder.htmlstill ships and still loads. It is the editor for every classic form already living in an entry — deleting it makes those forms uneditable, so it cannot go until existing content is migrated. Same forrewriteFormActions()andFormSubmit's_pc_hphoneypot branch.Census across the three running local sites: 3 classic forms, 0 new-style (ee-pb field 1 ×1 and field 58 ×1, jontoney field 25 ×1, northstar-energy 0). katiesway was not running and holds at least one more. At that scale hand-rebuilding the forms in the new block is cheaper than writing and testing a
data-settings→cb-form-defconverter, and it is the recommended path.
[2.0.0-a46] — 2026-09-10
Fixed
-
An authenticated frame could be stored by a shared cache. Found while investigating an "Unauthorized" report on staging, and not its cause — see Root cause of the report that prompted this below. A latent defect on its own terms, fixed on its own terms.
Every ACT endpoint behind the
member_id+access_cpgate serves per-user content, but only the editor frame said so. The canvas document, the global-component frame, the FilePicker bridge and all three error pages were emitted with no cache directives at all, so any shared cache in front of the site — Varnish on Cloudways, a CDN pull-zone — was free to store one response and replay it to everyone.Two details made it stick rather than flicker:
- The error page returned 200 OK. To a cache that is a successful response, not a failure, so a single anonymous miss pins "Unauthorized" onto the URL for every logged-in editor. Logging in again cannot clear it, because the request never reaches PHP again.
- The canvas URL's cache-buster was the literal string
0.6.7— frozen since that release while everything the canvas emits (base tag, canvas assets, library shims, Grid Builder JS, framework-profile CSS) changed underneath it. Every release from 0.6.7 to a45 shared one cache key.
That combination is also why the symptom appeared inside the canvas while the editor chrome around it worked: the chrome has sent
no-storesince it was written, and the canvas never has.- All of the above now send
Cache-Control: no-store, no-cache, must-revalidate, max-age=0andPragma: no-cache, via oneThemeAssets::sendNoStoreHeaders(). - The error pages return 403, not 200.
- The canvas cache-buster is the add-on version, in step with
PC_ASSET_V.
Because the canvas URL changes with the version, deploying this release bypasses any already-poisoned cache entry without a manual purge.
Changed
-
The Unauthorized page now diagnoses itself instead of saying "please log in" to someone who is already logged in.
The frames are addressed from
fetch_site_index()— that is, from thesite_urlsetting — not from the host the CP is being browsed on. When those disagree the frame is a request to a different EE install, where your session does not exist, and the gate fails while you are perfectly well logged in. A cloned site is the usual way they come to disagree:site_urllives in the database and travels with the clone, so a new staging site addresses its editor frames at production until that setting is corrected.The page now names the host that served it, the host of the CP that framed it (from the Referer, when sent), and where to fix it. Hostnames only — the page is reachable without a session by design, so it must not become a way to read configuration. Applies to the editor frame, the global-component frame and the FilePicker bridge.
Root cause of the report that prompted this
-
It was neither of the above.
staging.katiesway.comhad been deleted and re-cloned, and the domain — though present in the Cloudways domain setup — was not set as primary. Setting it primary fixed the site immediately.The family was right and the lever was one level up from where this release looked: the frame was being served by a host the CP session did not belong to, but the control was Cloudways' vhost, not EE's
site_urlfield. Check both, and check the<iframe src>host in view-source first — it settles the whole question in seconds and needs no deploy.The caching defect fixed here was never reproduced on that site and a fresh clone has a cold cache, so it is hardening, not a fix for that report. It stands because an authenticated per-user response with no cache directives is wrong regardless of whether a cache happened to act on it.
[2.0.0-a45] — 2026-09-10
Added
-
ContentBox 6.0.4's
formblock, with PageCraft's per-form Notification Email and success Redirect URL — as an extension, not a fork.Nothing of ours lives inside
assets/plugins/form/. That folder can be overwritten wholesale by every future ContentBox release, which is precisely whatmodules/form-builder.htmlcannot do.- Storage —
data-pc-notify-email/data-pc-redirect-urlon the block wrapper. The plugin'swriteDefinition()rebuilds its definition from a fixed key list, so anything stored in its JSON is dropped on the next save; wrapper attributes it never touches survive. - UI — a Form Delivery button injected onto the section toolbar of any
section containing a form, following the Global Header lock/unlock pattern.
The vendor's Settings tab and
editor.htmlare untouched. - Render —
ThemeAssets::rewriteContentBoxForms()rewrites the block'scb-form-defJSON, not the<form>tag: the plugin'smount()re-appliessettings.actionfrom that JSON on every run, front end included, so a tag rewrite would be undone the moment scripts ran and the form would go back to POSTing at the vendor's/formsubmissionplaceholder — a 404 on an EE site. - Server —
FormSubmitlearns the vendor's control fields and answers a browser POST with a 303.
The endpoint lookup shared by both form rewrites is now
ThemeAssets::formSubmitEndpoint()rather than duplicated. - Storage —
Fixed
- The new form would have shipped with no spam protection at all.
FormSubmitchecked_pc_hp, the old FormBuilder's honeypot. The 6.0.4 form rendersreference_codeinstead, so every new-style form would have accepted every bot — silently, since the field is always present and the form keeps working. Both are now enforced.
Security
- The success redirect is validated server-side: site-relative paths or this
site's own host only.
_pc_redirectis injected by us but a crafted POST can set anything, and without the check the endpoint would be an open redirect. Protocol-relative URLs are rejected before parsing.
Changed
-
With two form blocks now in the picker, the classic one is relabelled "Form Builder (classic)" — done in
Actions/BlocksJs.php, which already rewrites the served snippet JS. The obvious place,assets/minimalist-blocks/content.js, is a vendor file that changed between 6.0.0 and 6.0.4; editing it would have forked a moving file.Correction (a47): the premise was wrong and this rename never did anything. There are not two form blocks in the picker. The served file is
content-plugins.js, notcontent.js, and 6.0.4 already retired the classic block there by commenting it out — with line comments, which is why a block-comment scan reports it live. The rename was removed in a47. -
form-panelandcode-viewremain on disk and unregistered.
Verified
-
End to end on staging.katiesway.com, 2026-09-11: a real submission, mail delivered, and both per-form overrides applied from the Form Delivery button. (This entry shipped saying it was unverified; it no longer is.)
The one friction worth recording: the settings were looked for in the form's own Settings tab, which is where the classic block keeps them and the one place this design deliberately does not touch. The button is appended to the section toolbar and appears only on a section containing a new-style form.
[2.0.0-a44] — 2026-09-10
Changed
-
ContentBox.js 6.0.0 → 6.0.4. The cleanest vendor bump so far: all seven of our forked files are byte-identical between 6.0.0 and 6.0.4 upstream, so there was nothing to merge. They were restored from git after the asset sync rather than hand-merged, and both local patches — the nav-background fix (a43) and the single-nav prune (a42) — verified intact afterwards.
The cache-buster re-applied exactly as the recipe predicts: 3
modulePathsites, +81 bytes.ContentBox,ContentBuilderandContentBoxRuntimeall still export, and every minified bundle passesnode --check.Upstream fixes worth noting, both in areas we have fought:
- 6.0.2 — a resized column could store its width in pixels instead of a percentage, which is the grid-math area a38 worked around.
- 6.0.4 — adding a row (or moving a column) next to a plugin block stopped formatting from working inside that block until reload.
-
Regenerated both derived artifacts.
runtime.cssgrew 4.7KB but added no new utility classes — the vocabulary reference still reports 826, with zero added and zero removed, so the growth is all component rules. The framework profiles did move materially:contentbox-runtime.framework.cssnow weakens 90 rules where 6.0.0 needed 26, so 6.0.4 marks considerably more bare utilities!important.
Added (on disk, deliberately NOT registered)
code-view,form,form-panel, plusscripts/formbuilderai/config.js. Unregistered means insertable in the editor but inert on the page, so none of them are reachable yet — this is a decision, not an oversight:form/form-panelare two variants of the same block, and the vendor says to register only one.form"replaces the form module" — and PageCraft'smodules/form-builder.htmlis a fork of exactly that module. PageCraft already owns the server half the plugin requires: aform_submitaction, the submissions table, notification email (1.1.8) and success redirect (1.1.12). Adopting it means re-implementing all of that, which is its own piece of work. No pressure to:form-builder.htmlstill ships in 6.0.4 unchanged, and no module was removed.code-viewis self-contained (no server, no dependencies) and is the one worth registering; awaiting the go-ahead.
[2.0.0-a43] — 2026-09-10
Fixed
-
Nav editor froze the page when Bar Background was ticked. A MutationObserver feeding itself.
_applyNavBg()writesstyleandclasson nodes inside the section. Its observer watches that same section withsubtree: trueandattributeFilter: ['style', 'class', …]. So every write it made re-triggered the observer that called it.It stayed quiet only by accident. With no bar background
sectionBgis empty, so the pass calledremovePropertyon absent properties andclassList.toggle(x, false)on an absent class — both queue no mutation record, so the loop never started. Ticking Bar Background madewrap.style.setProperty('background', barBg, 'important')write a real value on every pass, each write feeding the observer. MutationObserver callbacks are microtasks, so the queue never drained and the tab hung outright.Fixed at the source:
setStyleIfChanged()compares value and priority before writing, so a settled value produces no mutation and the observer goes quiet on its own._applyNavBg()additionally detaches while it writes and callstakeRecords()before re-attaching, so its own mutations can never be delivered back to it even if a future write is added without the guard.The same sweep was applied to every other unconditional
element.stylewrite in the file, because fixing only the one the stack named would have left the bug a scroll event away from returning.applyNavVars'ssetVarwrote ~40 custom properties per call, andsyncPanelTopwrote one on every scroll event and every ResizeObserver tick — each of those queued a mutation record the nav-background observer then woke on. Nothing in this file writeselement.styleunconditionally any more.Found by instrumenting the running editor rather than by reading: a trip-wire on
style.setProperty/setAttribute/classList.addthat threw after 150k calls turned the hang into a stack, and the repeating frame namedMutationObserver._applyNavBgdirectly. Three earlier hypotheses — an orphaned modal overlay, theapplyStructureItemssnapshot, unbounded<style>growth — were all wrong, and all three were disproved in minutes once the loop could be caught in the act.
Known, not fixed
- Each nav mount still leaks one capture-phase
clicklistener on the outer document; the two beside it are torn down explicitly and that one was missed. Left alone pending the Nav Builder 2.x rebuild.
[2.0.0-a42] — 2026-09-08
Fixed
-
a41's prune only reached ee-pb. Every site keeps its own copy of the theme, so ee-bones, ee-pagebuilder, jontoney and northstar-energy still offered all eight nav sections. They have each been pruned in place.
A copy would have been wrong: the four files had drifted from ee-pb's and from each other, so overwriting them would have discarded whatever else was in them.
scripts/prune-nav-sections.pyinstead locates entries structurally — brace matching that respects'',"", backticks and comments — keeps the single Navigation/left-naventry, and drops the rest. It refuses to run if it cannot find exactly one entry to keep.
Removed
- The Legacy navbar (category 6,
'type': 'navbar',data-module="navbar-builder"). ContentBox's own sticky navbar, a different system from the Nav Builder rather than a duplicate of the seven. Jon's call, asked and answered: one nav section, in Navigation. Pages already using it keep their markup; it can no longer be inserted. Category 6 still holds 19 other designs, so it stays declared.
Note
- a41 reported "73 designs -> 66". That count came from grepping
'thumbnail':, which also matched three entries commented out inside/* */. The live counts were 70 -> 63, and are now 62 with the Legacy navbar gone. The seven removals a41 described were correct; only the totals were inflated.
[2.0.0-a41] — 2026-09-07
Removed
-
Seven of the eight shipped nav sections.
templates-simplecarried one section per nav variant —left-nav,right-nav,center-nav,one-page,hamburger,logo-center,side-nav— plus an eighth in Basic/Plugins. They differed only bydata-cb-variant; everything else was identical.The Nav Builder's LAYOUT tab now sets that variant, and the Nav Items modal owns every other setting — behaviour, theme, height, spacing, colours, dropdowns. So the seven were seven ways to insert the same thing, and choosing between them in the picker implied a decision that is actually made afterwards in settings.
One nav section remains, in the Navigation category, defaulting to
left-nav. Add it and pick the variant.73 designs → 66; the file loses ~26KB.
PackIndexerkeys its cache on the JS file's mtime, so the block index regenerates on the next read with no action needed.Note for vendor upgrades:
assets/templates-simple/templates.jswas already on the locally-patched list, and this deepens that patch.
[2.0.0-a40] — 2026-09-07
Changed
-
Ingest no longer registers canvas assets. It reports them and you decide.
It used to append every
<link>/<script>it found in an imported template to the globalcanvas_css_assets/canvas_js_assetssettings. Three problems, all structural rather than bugs, and none fixable by tightening the dedupe:- A global side effect of a per-section action. One import changed the editor for every field on the site.
- Unbounded, with no removal path. Every ingest appended; nothing ever cleaned up, and deleting the sections did not undo it. One install reached 24 canvas scripts including three copies of jQuery — each load discards the plugins registered against the previous one, which broke the editor outright (a33).
- Invisible. Nothing surfaced that it had happened until something broke. That is why it took days to find.
Finding the assets is still worth doing, since a marketplace pack buries its stylesheets several directories down. So the same detection runs, the same hygiene is applied — one jQuery rather than one per pack, no
{site_url}tags, noYOUR_API_KEYplaceholders — and the result is shown in the ingest modal with a copy-pasteable list and a note saying nothing was added.Add what you want under Advanced Settings → Canvas Assets, use the existing Custom CSS / Custom JS fields, or link externally.
Measured against the list that broke that install: 17 CSS + 24 JS in, 8 CSS + 14 JS reported, nothing written.
a33's dedupe helpers are kept but demoted to report hygiene — they no longer stand between a user and a broken editor.
mergeCanvasAssets()is deleted.Existing installs are untouched. What is already registered stays; the Canvas Assets UI has per-row delete.
[2.0.0-a39] — 2026-09-07
Fixed
-
A framework-profile field had no grid settings at all. a29's structure lock hid
.is-tool.is-row-tool— and that tool carries the Grid Editor button, the only way to set column widths without hand-editing classes. It also hid the row-add tool, which was only useless because a29'srowFormatwas broken; a38 fixed that and adding a row works now.The reach was worse than the intent. A profile is field-wide while the reasoning behind the lock — "an imported template's grid is a code job" — is per-section, so a field set to
bootstraplost grid tooling on its native and newly inserted sections too.The lock now hides only what is genuinely inert under format mode: the column tool (a new column would arrive unclassed, since
cellFormatmust stay empty for row insertion to work) and the column resize handles (withcolsizesempty, a drag writes an inline width that ContentBox's ownfixLayoutclears).The guarantee that a profile cannot rewrite an imported grid was never this CSS — it is
frameworkOptsJs()'s emptyrow/cols, which is untouched. The lock is only about not offering a control that does nothing.
[2.0.0-a38] — 2026-09-07
Fixed
-
Under a framework profile, adding a block or element silently inserted nothing. a29's
rowFormatwas an empty<div class="row"></div>, and ContentBox's insertion algorithm cannot use one:let l = elementChildren(rowEl); // an ARRAY for (; l.length > 0 && (l = l[0], …); ) … // never runs when empty l.innerHTML = cellFormat-with-content-spliced-in; // writes to an ArrayThe loop is the only thing that converts
lfrom that array into an element, and it needs the row to have at least one child. With none,l.innerHTML = …set a property on an array and vanished — every insert produced an empty row and dropped the block. The block picker appeared to reject the section.The cell now lives inside
rowFormatandcellFormatis empty. That reads backwards but is what the algorithm wants, verified against a faithful replay:<div class="row"></div> -> empty row, content lost <div class="row"><div></div></div> -> row > div > col (extra wrapper) <div class="row"><div class="col-md-6"></div></div> -> row > col > content ✓An empty
cellFormatis safe —''.indexOf('</')is-1, so the splice is a no-op and content passes through — and it cannot re-arm the native grid, since the constructor's fallback requires both formats empty.Known limit recorded in the code: the add-column path builds its cell from
cellFormat, so a new column would arrive unclassed. Under a profile the column tool is hidden byframeworkStructureLockCss(), so that path is unreachable — but the two must be revisited together if the structure lock is ever relaxed.a29 shipped this untested. The failure is invisible from PHP: the options are valid JS and the editor loads normally; only the insert does nothing.
[2.0.0-a37] — 2026-09-06
Fixed
-
A card grid built as a
<ul>was marked as one editable region, and editing it flattened the cards. Ingest marked any list containing text as a singleis-subblock editregion. That is right for a list of text items and destructive for a list of components: ContentBox treats a marked element as a rich-text container and normalises its contents into paragraphs, so<ul><li><img><h3><p></li>…</ul>loses its images, headings and wrappers the first time anyone edits any part of it. One marker, the whole grid gone.Both real corpora do this constantly —
ul.blog-grid(×3) andul.blog-commentin a 43-section Crafto pack,ul.layout-457__row,ul.layout-254__col(×2),ul.layout-251__rowandul.layout-53__listacross 19 Figma-derived layouts.A list is now marked only when
holdsOnlyTextLevel()passes — the same guard the<p>promotion already uses. A list of components is left alone so its headings, images and paragraphs get their own finer markers instead.Known cost, measured rather than estimated. On the Crafto pack markers went 309 → 351 (finer), coarse markers 5 → 0, and coverage 90% → 76%. The lost coverage was never real — it was text inside a marker that would have destroyed it — but some of it is now not editable at all: a
div.card-bodyholding a headline, a paragraph and a nesteddiv.authorfails the text-level guard, so neither the headline nor the paragraph is promoted. Whether that guard can be relaxed depends on whether ContentBox actually flattens a nested block inside a marked region or only wraps loose inline content, which needs checking in a browser rather than reasoning about.
Added
measure-ingest.phpnow reports coarse markers, and fails on them. Coverage alone could not see this class of problem: one marker spanning an entire card grid scores as good coverage while being the most destructive shape there is. The scorer would have passed every section this release fixes.
[2.0.0-a36] — 2026-09-06
Fixed
-
Ingest named sections from the first heading, so files sharing a heading overwrote each other. Ingest upserts by
(category_id, name), which makes a name a KEY — and a heading is not one. Two files with the same<h1>were the same section as far as the upsert was concerned, so the second silently replaced the first (overwrite=1) or was skipped (overwrite=0). Either way one of the pair did not survive, with no error either time.Not an edge case. On the 43-section demo-corporate pack, 18 of 43 sections collided — 42% destroyed on import. Across a 619-page Crafto corpus it was 510 collisions in 2554 sections, the worst heading repeating 29 times. A template family that reuses one hero heading across its pages collides on nearly every file.
Names now come from the filename, which is unique within a zip by construction, stable across copy edits, and already what
previewFor()pairs thumbnails on — so name and preview key on the same thing.The heading is not discarded: it becomes the section's description, which is what the Sections list shows beneath the name. Readability moves to the field built for it and the name goes back to being an identifier. Descriptions are refreshed on overwrite, so a re-ingest updates them.
Note for existing libraries: sections imported before this keep their heading-derived names. Re-ingesting the same pack will create new, filename-named rows alongside them rather than updating them, so the old ones want deleting once.
[2.0.0-a35] — 2026-09-06
Removed
-
The CSS Cascade Layer setting (a27) — it broke native grid layouts.
It wrapped ContentBox's base stylesheets in
@layer pagecraftso a site's own CSS would outrank them without depending on load order. The flaw is in the mechanism, not the configuration: an unlayered rule beats any layered rule, so it did not only demote the ContentBox utilities that collide with a framework — it demoted the rules ContentBox's own layout depends on.On a site that has imported a template, that template's CSS is registered as a canvas asset and is unlayered. So Bootstrap's
.row { flex-wrap: wrap }and.row > * { flex-shrink: 0; width: 100% }beat ContentBox's.is-container .row { flex-wrap: initial }protections, native columns could no longer shrink, and two-column sections stacked into one.Diagnosed on a real install by enumerating the canvas's stylesheets and finding ContentBox's runtime CSS was not among them, then bisected by toggling the setting: with it on,
flex-wrap: wrap/flex-shrink: 0and the columns stacked; with it off,nowrap/1and they sat side by side at 401px + 639px.a27's own docblock predicted this — "it deprioritises ContentBox against the host theme for native PageCraft blocks as well… that is the regression surface to check on a real site" — which is why it shipped default-off. What the prediction missed is that the feature is most tempting in exactly the situation where it is most harmful: you enable it because template CSS is fighting ContentBox, and that is precisely when template CSS also beats ContentBox's layout.
Superseded by the a29 framework profiles, which remove
!importantfrom ~148 specific colliding rules instead of demoting ContentBox wholesale — surgical rather than blanket, and with no effect on layout rules.The setting row is deleted on update rather than left at
n, so an install that had it on does not keep a dead setting that once broke its layouts.contentBoxBaseCssTags()keeps its other job: one helper for both surfaces, so the canvas and the front end cannot drift apart again.
[2.0.0-a34] — 2026-09-06
Removed
[pc-template-trace]debug instrumentation. It was logging to the browser console on every autosave — once every 1.5s for as long as an editor was open — serialising the live DOM of everytemplate-embedelement each time, plus twologger->developer()writes on every field save. It was added to chase a template-embed attribute loss, that investigation is closed, and it has been drowning the console since: it was the only thing left in the log while diagnosing the a33 canvas-asset failure.
[2.0.0-a33] — 2026-09-06
Fixed
-
Canvas asset registration was accumulating duplicate copies of jQuery, and that is what made the editor look broken. Found by opening the editor and reading the console rather than reasoning about it: a real install's canvas was loading 24 scripts — jQuery three times,
vendors.min.jsthree times,main.jsthree times, Google Maps four times — and throwingfullScreenObj.parents(...).imagesLoaded is not a function.Every jQuery load replaces
window.jQueryand discards the plugins registered against the previous instance. So a second pack's jQuery silently unregisteredimagesLoaded, and the template's ownmain.jsthen died on an uncaught exception that abandoned the rest of its initialisation. That is why blocks added to the canvas — the Nav Builder among them — rendered nothing.Three defects, all in
registerCanvasAssets():- The dedupe never matched. Incoming URLs are raw, stored ones are
htmlspecialchars-encoded, and it compared one against the other. So re-ingesting a template appended everything again, every time. - No cross-pack dedupe. Two packs cut from the same marketplace theme ship byte-identical vendor files under different pack paths, and both were registered.
- No sanity filter. Unresolved EE tags (
{site_url}assets/js/main.js) and placeholder keys (...key=<YOUR_API_KEY>) were stored verbatim, 404ing or throwing on every canvas load.
Dedupe is now by basename + file size rather than URL — basename alone would drop a second template's genuinely different
style.css, while size still collapses the identical vendor copies that cause the jQuery problem. URLs that cannot resolve are dropped. The merge is idempotent: re-ingesting the same pack now adds nothing.Verified against the list from the affected install: 24 tags → 14, and a re-ingest of the same pack leaves it at 14. The
imagesLoadedexceptions are gone from the editor console.Existing installs need their list pruned once — this fixes registration, not data already stored. The setting is
canvas_js_assets/canvas_css_assetsunder Advanced Settings. - The dedupe never matched. Incoming URLs are raw, stored ones are
[2.0.0-a32] — 2026-09-06
Fixed
-
Content saved before a31 is now repaired on load, not just prevented. a31 stopped ingest creating markers ContentBox cannot hold, but did nothing for content that already had them — and re-ingesting does not reach it: re-ingest rewrites the section library, while a section already placed in an entry keeps its own saved copy and goes on ejecting text on every save.
Services/MarkerRepairstripsis-subblock editfrom any element that is a<p>, sits inside one, or is inline. It runs on the load path (ft.page_craft.php::display_field), which is what makes it a repair rather than a record of the damage: the marker is gone before ContentBox can act on it, so the session cannot eject any more text. Nothing is written until the entry is saved. It also runs on save as a net for content that arrives by paste or programmatic write, and on the global header/footer editor, which a re-ingest never touches either.It deliberately does not try to undo damage already done — no moving ejected text back, no deleting
<p><br></p>husks. Telling a husk from a paragraph someone left blank for spacing is guesswork, and this runs unattended over real content. Stripping a marker can only cost editability on one element; guessing at cleanup can destroy authored work. Ejected text stays where it landed: visible, editable through its cell, and no longer multiplying.Safety property worth knowing: when there is nothing to repair the input is returned byte-identical — the DOM round trip is discarded rather than serialised back — and a parse failure returns the input unchanged. Verified against the real reported section: 3 markers removed, zero unsafe remaining.
[2.0.0-a31] — 2026-09-04
Fixed
-
a28's rule was not strong enough: an inline element must never be marked at all. a28 stopped marking anything that had a
<p>ancestor at ingest time and recorded that "marking an inline element inside a<div>is unaffected and still supported". A real Crafto import disproved that.ContentBox normalises a cell's loose inline content into a paragraph first, so it wraps the span in a
<p>and only then injects a<p>into the span it is treating as a rich-text container. The colliding ancestor is one ContentBox created — which ingest cannot see, so no ingest-time guard can catch it:<div class="col"><span class="… edit">Join the 10,000+…</span></div>-> <p><span class="… edit"></span></p><p>Join the 10,000+…</p><p></p>
span,label,strong,em,b,iandsmallare now routed through their nearest block cell instead of being marked, using the same promotion the<p>branch uses (extracted aspromoteToCell()). Where no legal cell exists the element is left uneditable rather than marked, unchanged from a28.This matches ContentBox's own convention exactly: all 22
is-subblockoccurrences in the shipped block library sit on a<div>, none on an inline element. Editing gets coarser — one region per cell — and in practice better: the reported hero's accordion title now marksdiv.accordion-titlerather than the span inside it.Re-ingest to clear markers already placed on inline elements.
[2.0.0-a30] — 2026-09-03
Fixed
-
Clicking near the bottom-right of the editor canvas resized the field instead.
.pc-fieldwrapcarriesresize: verticalto give the field its drag-to-resize handle. The browser paints that handle in the bottom-right corner of the element's border box, on top of whatever is there — which was the editor iframe — and the handle also swallows the pointer, so a click landing in that corner never reached the canvas at all. Any click carrying a pixel or two of drag silently rewrote the wrapper's inline height, overwriting the configured Editor Height.Reproduced in a standalone harness of the same markup: a 16px drag on the corner over the iframe left the canvas receiving nothing and the wrapper resized 302px → 344px, with
height: 342pxwritten to its style attribute.padding-bottom: 16pxnow moves the content box up so the handle sits in a reserved strip below the iframe rather than over it. Verified in the same harness against the real chrome CSS: a drag at the iframe's own bottom-right corner reaches the canvas and leaves the height untouched, while the handle still resizes normally from the strip. The affordance is kept — it just no longer overlaps the thing being edited.box-sizing: border-boxis set explicitly so the strip comes out of the configured height rather than being added to it, and so the result does not depend on what the CP's global reset happens to say. The wrapper's background now shows through that strip, so the handle sits on chrome matching the toolbar above it.Note this was never a ContentBox or PageCraft script behaviour — no height ever crosses the postMessage bridge. It was one CSS declaration and where the browser chose to draw its handle.
[2.0.0-a29] — 2026-09-03
Changed
-
The Grid Framework setting is now the CSS Framework setting, and it no longer hands ContentBox permission to rewrite your markup. It used to weld together two unrelated things — who owns the grid, and which CSS vocabulary applies — so every value was wrong for somebody. Native was correct but left ContentBox's CSS fighting the template; Bootstrap and Tailwind fixed nothing about CSS and damaged the markup, which is why a23 had to tell people to leave imported templates on Native and give up the CSS half.
Selecting Bootstrap or Tailwind now switches the field to a framework profile, which is three things together:
- ContentBox stops managing the grid. It moves to the mode where new rows
and cells are built from
rowFormat/cellFormattemplates and existing markup is never touched.framework:is deliberately passed empty — passing the preset name is precisely what repopulatesrow/cols, and those two options are the gate on the normalisation loop that iterates every child of anything classed.rowwith no.columncheck. Withrow,cols,colequalandcolsizesall empty,fixLayout()falls through both branches, so the rewrite is structurally impossible rather than merely discouraged. ContentBox's own shippeduikitpreset uses this mode, so it is a supported path and not a trick. - Structural tools are hidden — row add/remove, the column tool, and the
resize handle. Grid changes belong in code. This is a UI restriction in the
same spirit as
lock_colors; the engine-level guarantee is (1). Deliberately notdata-protected, which would suppress the same tools but also makebuttonTarget()return null for everything inside it, taking the button label and URL panels with it. - A tailored stylesheet is served (below).
Native is unchanged — same tools, same CSS, same insertion behaviour.
Existing
bootstrap/tailwindvalues keep working and simply mean something better, so there is no migration. Switching a field converts nothing in either direction, and imported sections do not need re-ingesting.Known trade, stated plainly: under a profile, column drag-resize no longer swaps
col-md-6→col-md-4. In ContentBox, resizing and the layout rewriting are the same mechanism, gated on the same options — you cannot keep one without the other. Resizing is done by editing classes. - ContentBox stops managing the grid. It moves to the mode where new rows
and cells are built from
Added
-
Framework-profile stylesheets, generated by
scripts/build-css-profiles.pyand committed alongside the stock sheets.ContentBox's utility classes are Tailwind: its CSS defines
gap-4:1rem,mb-3:.75rem,p-4:1rem,border-2:2px,w-full:100%,flex-col:column, and one rule still emits--tw-bg-opacity.content.csscarries a compiled Tailwind subset. On a Bootstrap site those class names collide and the values differ — Bootstrap'spx-4is 1.5rem, ContentBox's is 1rem. That is the same root cause as a27's button bug, where ingest'srole="button"stamp activated ContentBox's Tailwind spacing on Bootstrap-classed anchors.Most of the collision resolves itself: of 420 bare single-class utility rules, 313 carry no
!importantand Bootstrap's own utilities are!importantby design, so the host already wins. The profile sheets therefore apply exactly one operation — remove!importantfrom the ~148 rules whose class names belong to the host framework. Nothing is deleted and no value is rewritten, so ContentBox's value still applies wherever the host defines nothing, and the failure mode of any mistake is a style losing rather than a style being wrong. The generated sheets differ from stock by 180 removed tokens and nothing else, verified by stripping every!importantfrom both and comparing byte-for-byte.Grid-vocabulary collisions (
.row,.container) are deliberately not handled this way — they need scoping rather than weakening, andgridCompatCss()already does that with:has()detection on both surfaces.
Fixed
-
The framework value was read in four places that disagreed. EditorFrame's chrome resolved per-field over global;
EditorFrame::resolveFramework()did the same for the canvas but the canvas URL never carriedfield_id, so it silently fell back to the global setting — a field overriding to Tailwind got the Tailwind builder and native CSS.mod.page_craft.phpread the global value only, so the front end could disagree with the editor about the same field. AndGlobalComponentFramepassed no framework at all while its canvas (which reuseseditor_frame&canvas=1) did get the framework stylesheet, so the builder ran native against a Tailwind-styled canvas.All four now call
ThemeAssets::resolveFrameworkProfile(), and the canvas URL carriesfield_id. This is the "one value living in several places" shape that produced most of the Nav Builder's bugs. -
pcFixGridMathis gated to native. It exists to repair the rounding ContentBox's framework conversion produces; under a profile that conversion never runs, so it had nothing to repair and rewriting a template's owncol-*classes would be the exact damage the profile prevents.
Documentation
07-grid-framework.mdrewritten again — it was corrected earlier the same day for semantics this release replaces.11-importing-templates.mdnow says to set the framework to match the import, and says plainly that older advice to stay on Native was correct for the old behaviour.
[2.0.0-a28] — 2026-09-03
Fixed
-
Imported sections were still accumulating empty
<p><br></p>pairs — a26 fixed the smaller half of the bug. a26 established that anis-subblock editelement is a ContentBox rich-text CONTAINER, so CB injects a<p>into whatever is marked, and marking a<p>is therefore illegal. What it did not follow through: the same auto-close happens whenever the marked element merely sits inside a<p>. The parser closes the open ancestor at the injected tag, ejects the text as a sibling, and leaves a<br>husk — and the marker survives, so it repeats on every save.<p><span class="… edit">Beauty salon focus on</span></p>-> <p><span class="… edit"></span></p><p><br></p><p>Beauty salon focus on</p>
Marking an inline element inside a
<div>is unaffected and still supported: a<p>inside a<span>is invalid nesting, but with no open<p>there is nothing for the parser to close, so it round-trips. It is specifically the<p>ancestor that does the damage. ContentBox's own block library agrees on the shape — everyis-subblockin it sits on a<div>, and not one appears inside a<p>. -
BUTTON_CELL_TAGSstill contained'p'. a26 removed it fromTEXT_CELL_TAGSfor exactly the p-inside-p reason and missed this list, so a button sitting in a<p>— the ordinary shape for a CTA in a marketplace template — had that<p>marked as a rich-text cell and produced the same accumulating husk (<p><a class="btn"><br></a></p>). -
a26's promote-the-paragraph's-parent rule could swallow a whole column. The guard against promoting a layout element was
isStructural(), which tests foris-section/is-container/row/column/is-overlay. An imported Bootstrap cell carriescol-lg-6, and only gainscolumnif the adoption pass has run — which it does not, being switched off. So a single loose<p>anywhere in a column promoted the entire column to one editable region and collapsed every finer marker inside it: a hero column holding a heading, an accordion and a CTA became one rich-text blob, and CB would flatten the accordion's markup into paragraphs.The fix is not to treat every Bootstrap cell as structural — a cell holding only copy is a perfectly good editable region, and Crafto's
process-content … colis one whose marking is what makes that section's text editable at all. The question the rule needed to ask is what the cell contains, so promotion now requiresholdsOnlyTextLevel(): inline formatting, paragraphs, headings, lists and images only, with any layout class or[data-cb-type]plugin disqualifying the cell.Known cost, stated plainly. Where a loose
<p>has no legal cell — its parent also holds structure — the paragraph is now left uneditable rather than marked. In the reported hero that means the eyebrow line and the CTA label are not editable after re-ingest. Making them editable requires wrapping the paragraph in adiv, which this pass still deliberately does not do; that is a separate change with its own DOM-shape risk, to be decided and verified on its own.Re-ingest a section to clear pairs already accumulated.
Notes
- Marker safety is now expressible as one invariant, and it is the thing to test
against after any change to
markEditable()or the cell passes: no element carryingis-subblockmay be a<p>, or have a<p>ancestor.
[2.0.0-a27] — 2026-09-03
Fixed
-
Ingest no longer stamps
role="button"on imported buttons — it was silently repadding every one of them. ContentBox'sbuttonTarget()never readsrole. It takesclosest("button, a"), rejects anything inside[data-html]/[data-cb-type]/[data-noedit]/[data-protected], returns a<button>outright, drops an image-only link, and otherwise decides purely on computeddisplaybeing block, inline-block, flex or inline-flex. The attribute did nothing for editability — a comment in the button-cell pass had said as much for some time; it is now verified against the 6.0.0 bundle.It was not merely inert.
assets/minimalist-blocks/content.csscarries 32 rules shapeda[role="button"].px-4 { padding-left:1em !important }, coveringpx-0–px-20andpy-0–py-20.px-0–px-5andpy-0–py-5are also Bootstrap 5 spacing utilities, and Bootstrap's are!importanttoo — so on<a class="btn px-4 py-2">both applied and ContentBox's (0,2,1) beat Bootstrap's (0,1,0). Stamping the attribute is what made the selector match, so ingest was overriding the template's own button padding with ContentBox's values on every import.The failure was invisible in the editor, which is why it lasted: the canvas loads
contentbox-runtime.cssonly, and those 32 rules live incontent.css, which only the front end loads. Buttons looked right in the editor and were repadded on the page.Button detection is unchanged —
isButtonLike()computes it from tag and class tokens before anything is written, so the editable button cells are found exactly as before. Arole="button"the template author wrote is left alone and still honoured as a detection signal. Removing our own stamp is also correct for accessibility:role="button"on an<a>with anhrefannounces a link as a button while keeping link semantics and no Space activation.Re-ingest to clear the attribute from sections already imported.
Added
-
CSS Cascade Layer (Advanced Settings, default off). Loads ContentBox's two base stylesheets inside a CSS
@layer. An unlayered author rule beats any layered one regardless of specificity, so the site's own CSS — and an imported template's — wins by construction rather than by whichever stylesheet happens to load last.It addresses a genuine inconsistency rather than a preference. PageCraft injects ContentBox's CSS at the fieldtype's output position on the front end, i.e. after the theme's
<head>, but the editor canvas links it fromblank.html's head with the template's CSS appended after. Where a rule ties on specificity —.column{width:100%}at (0,1,0) against Bootstrap'scol-lg-6, also (0,1,0) — source order settles it, and source order is opposite on the two surfaces. The same markup can therefore lay out one way in the editor and another on the page.Off by default, and worth testing before enabling. A layer is document-global; it cannot be scoped to imported sections. So it also deprioritises ContentBox against the host theme for native PageCraft blocks, and a theme with broad
h2/p/.btnrules will override block styling it currently loses to. That regression surface is the reason this is a setting rather than the new behaviour.On the
!importantinversion inside layers (a layered!importantbeats an unlayered one): of the 277!importantrules incontentbox-runtime.csswhose selector touches.row/.column/.is-container/.is-section, 270 are scoped to ContentBox's own class vocabulary (.padding-30,.list,.quote,.xs-items-6) that a marketplace template never uses. Seven can match arbitrary markup, and in the one that matters most themin-widthis not!important— only the adjacentmin-height. The inversion is real and small, and it does not cover the rules this setting exists to fix.Requires Chrome/Edge 99, Firefox 97 or Safari 15.4 (all March 2022). An older browser drops the
@importentirely rather than falling back, taking ContentBox's CSS with it — a further reason for the default.
Changed
- Both surfaces now emit ContentBox's base stylesheet tags through one helper
(
ThemeAssets::contentBoxBaseCssTags()) instead of writing the tags in three places. Writing them separately is how the two came to disagree. With the setting off the output is byte-identical to a26.
Documentation
- The Grid Framework docs still told people to break their imports. a23
corrected the setting's own help text in the CP but not
docs/, which the CP's Documentation page renders — so Settings said "leave imported templates on Native" while Documentation, two clicks away, said to set the framework to match the template, and gave that instruction its own heading in the import guide. Both files predated the finding.07-grid-framework.mdnow leads with what the setting decides (who owns the grid, not which CSS the site loads) and shows the failure concretely;11-importing-templates.mdis inverted to match. - Corrected a claim in the same page that selecting a matching framework means
PageCraft "no longer has to inject compatibility CSS". It does regardless —
gridCompatCss()answers a.rowclass-name collision that exists independently of the setting, and is injected on both the front end and the canvas. - Three code comments claimed the editor canvas does not load
contentbox-runtime.css. It does, viablank.html. In two of them that was the stated reason the canvas-only.columndance is safe; the conclusion survives on different reasoning, now recorded. The rule those notes called unanswerable —.is-container .column{min-width:100%}at (0,2,0) — is ContentBox's mobile stacking rule, scoped to@media (max-width:760px). 00-installation.mdstill advertised the ContentBox 5.x core.
[2.0.0-a26] — 2026-09-02
Fixed
-
Imported paragraphs no longer accumulate empty
<p><br></p>pairs on every save. Ingest marked<p>elements asis-subblock edit, but ContentBox treats such an element as a rich-text container and normalises its contents into paragraphs — so it put a<p>inside a<p>. That is illegal; the parser auto-closes the outer one, leaving the marked paragraph empty with its text ejected as a sibling and a<br>placeholder in the husk. The marker survived, so the cycle repeated on every save; sections were found carrying eight empty pairs and growing.A
<p>is now marked through its block parent instead, which can legally hold paragraphs. Headings are unchanged and still mark themselves — only a<p>auto-closes a<p>, so<h3><p>…</p></h3>round-trips intact, which is why headings never showed the problem.Two deliberate consequences. Where there is no legal cell — an inline or structural parent — the paragraph is left alone rather than marked or wrapped, because this pass does not create wrapper elements and an accumulating paragraph is worse than an uneditable one. And promoting a parent collapses any marker already sitting on a descendant, since the guard that prevents nested editable regions cannot see a parent that is marked later in the walk. Editing is therefore one region per cell rather than one per element: coarser, and the same shape ContentBox's own blocks use.
Re-ingesting a section clears any pairs already accumulated.
[2.0.0-a25] — 2026-09-02
Fixed
-
The a24 canvas shim relaxed
.h-100far too broadly..h-100is a Bootstrap utility used throughout ordinary layouts, not just by JS-sized full-height sliders — Crafto's interactive banners putimage-content h-100 w-100over a slide image to hold its caption, and collapsing that detaches the overlay from the picture. The rule was carried over from per-site shims where it only ever applied tosection-fullheight. It is now scoped to.h-100inside a full-height or fullscreen slider context, which is the case that actually depends on JS sizing.a24 shipped this and should not be deployed.
[2.0.0-a24] — 2026-09-02
Added
-
Sliders and reveal animations now render in the editor canvas. Ingest registers a page's
<script src>tags as canvas assets, so a slider's library loads — but it skips inline<script>, which is where templates callnew Swiper(...), and bundled init code runs onDOMContentLoaded, long before ContentBox injects the section vialoadHtml(). The library was therefore present and never initialised, and an uninitialised slider is a flex track whose slides have no width and whose wrapper collapses to zero height: the section rendered as an empty band that could not be clicked into. Reveal libraries failed from the other direction, their CSS hiding the element until a class arrived that never did.ThemeAssets::canvasLibraryShimCss()lays these out statically rather than trying to run the JS — deliberately, because a working carousel in the editor moves content under the cursor mid-edit and leaves every slide but the first unreachable. Covers Swiper, Slick, Owl, the reveal libraries (Crafto'sdata-anime, plus.wow,[data-aos],.animate__animated), full-height wrappers that size themselves from the viewport, andpointer-eventsrestoration on parallax/mask/hover-zoom wrappers, which templates disable during animation and which otherwise makes their images impossible to select and replace.Scoped to
.is-edit— added to the wrapper by the builder at init, so the front end never carries it — and injected into the canvas document only. Slide width is exposed as--pc-canvas-slide-w(default 300px) so a site can retune it from custom_css without a patch.This bundles the library-generic half of shims that previously existed only as a per-site
custom_cssdatabase row, where they were neither versioned nor discoverable. The Arts/Kinsey-specific selectors stay per-site.
[2.0.0-a23] — 2026-09-02
Fixed
-
Imported Bootstrap templates keep their responsive grid. With Grid Framework set to
bootstrap, ContentBox normalises every.rowit finds — the loop iterates the row's element children and skips only its own tool elements, with no.columncheck — so every child of anything classedrowwas assigned a width class. Bootstrap's own.rowis the trigger, so this fired on every Crafto import. A six-breakpoint ladder came back with a conflictingcol-md-*appended, resolved by Bootstrap's source order rather than the design, and the same pass restructured cell contents, hoisting the<p>out of anis-subblock edit<span>so labels stopped being editable.The fix is a setting, not code: imported templates need Grid Framework = native. The setting's own help text had been recommending the opposite ("Match this to the framework your section templates use"), which is what put the test site on bootstrap; it now leads with what the setting actually decides — who owns the grid, not which CSS the site uses — and shows the failure concretely. Also mentions the per-field override, which it never did.
Added
-
Per-section thumbnails read from the ingest ZIP. Previews were never read from the ZIP at all: the only slot was a single image posted alongside it, applied to the first section, with everything else getting a generated placeholder. Ingest now pairs an image to each section by the HTML file's basename —
pricing-table.webpforpricing-table.html— looking in apreview/directory beside the HTML, then at any ancestor up to the ZIP root, then as a plain sibling. Format preference is webp, png, jpg, jpeg, gif, svg.Pairing is on the filename rather than the section name because the name comes from the first heading and moves whenever the copy does. Ancestors are walked rather than only checking the root because compressing a folder (rather than its contents) puts the package one level down, where a root-only rule finds nothing and silently substitutes placeholders.
No extraction code was needed — every image extension is already an ingest asset, so the file is written under the same relative path and the thumbnail is just its URL. SVG previews inherit the existing
isSafeSvg()check. Precedence is ZIP preview, then the paired upload, then the generated SVG, so anything imported previously is unaffected.
Changed
- Bootstrap column adoption (
$adoptBootstrapCols) stays off but is no longer described as blocked. The canvas-only machinery it needs is in place and inert; under native Grid Framework the width rewriting is gated off, so it is plausible rather than doomed. It was never required for editability — imported content edits fine without it — and only buys column selection tooling.
[2.0.0-a22] — 2026-08-31
Fixed
-
Structure-driven navs no longer hardcode
index.phpinto every link.Services/StructureNav::buildHref()composed each href as{base_url}/index.php/{uri}unconditionally, to match Structure's "View Page" button. That button is a CP convenience which has to resolve whether or not URL rewriting is configured, soindex.phpis right for it; a public site nav is the opposite case and has to match the URL form the site actually serves. It now defers tofetch_site_index(), so a default install keepsindex.phpand a site with$config['site_index']blanked gets clean URLs — both correct without the method knowing which case it is in.The home page is fixed as a side effect: its URI is stored as
/, which left the path segment empty and produced{base_url}/index.php/— the site root dressed up as a path. The existing guard only caught entries with no Pages URI assigned, never the root itself. -
A nav in an entry's PageCraft field is re-derived at render time. The injection step was a private method on the module class, and that class only renders global components — so the global header/footer got current nav hrefs while a nav placed in an entry field shipped whatever was baked into the saved markup when it was authored. The editor canvas fetches the nav live from the preview endpoint, so it showed correct URLs the whole time and the published page showed stale ones.
maybeInjectStructureNavand its three helpers moved toServices/StructureNav::injectInto(), beside thegetNavItems()they already depended on. All three render paths now share it, which makes the "editor preview and front-end nav can never drift" claim in that file's docblock true rather than aspirational. -
Mobile nav: a dark nav with both an alt-logo and a mobile-logo showed two logos.
:has()takes the specificity of its argument, so the rule hiding the alt-logo is only (0,4,0) and lost to the dark theme'sdisplay: blockat (0,6,0). The fix restates the hide at dark's own weight. This regressed once before: the dark-theme conversion in a20 treated it as a no-op because its value matched the base rule's, without noticing it existed to out-rank a third rule rather than its own base. The rule now carries a note saying so. -
Mobile nav: hover styling. Two causes. The same no-op sweep removed
.dark .nav-link:hover's background, which was the only rule out-ranking.active-pill .nav-link:hoverand its#f5f5f5fallback — so dark navs picked up a light-grey hover. That is restored as a--nav-link-hover-bg-themetoken rather than a property rule, matching how the rest of the dark theme works.Separately, thirteen hover/focus rules were unscoped, so every desktop pointer affordance also applied inside the mobile panel. The worst was
.nav-item:hover .submenu: on a touch device a tap latches:hover, so it opened dropdowns while the panel's own.activetoggle was also driving them. All thirteen now sit inside@media (min-width: 769px). Wrapping changes only where a rule applies, not its specificity or source order, so desktop rendering is unchanged — verified by diffing the declarations that apply at 1200px before and after. The three:focus-visibleoutlines stay unscoped, so keyboard navigation on mobile is unaffected. -
The editor canvas and the published page now render embedded templates the same way.
Services/TemplatePreview.phpis shared by both paths and its docblock said sharing it "guarantees the canvas preview can never drift from what the published page renders." That was true of the code and false of the inputs: the front end passed a parent-entry context, the canvas passed none, and unknown{pagecraft_*}keys resolve to an empty string. So an embed targetingentry_id="{pagecraft_entry_id}"rendered correctly on the page and showed nothing in the editor — the one thing a preview exists to prevent.The entry now travels the chain the plugin already uses: the fieldtype puts it on the editor frame URL, the frame appends it to the template-render URL it injects into the canvas, and the preview endpoint builds the same two-key context the front end builds. A new unsaved entry and the playground scratchpad have no entry, so the context is empty there and behaviour is unchanged.
Changed
-
Imported images inside links are editable. Ingest skipped any
<img>with an<a>ancestor, so a linked image arrived with no way to replace it — and that is a common shape rather than an exotic one: portfolio and blog cards, logo grids and product tiles are all a link wrapping an image. For scale, 24% of the images in the shipped Simple Start pack sit inside a link.ContentBox's "only ever edit an
<a>as a button" rule is about the anchor, not about a child of it, so the image is now marked like any other. The surrounding link is left intact rather than unwrapped: unwrapping works but destroys markup in saved content and cannot be undone by re-importing. -
Content width is a setting, not a constant.
is-content-1200was a literal in two places, forcing a 1200px content width on every import whatever the source design intended. Imported Content Width now sits on Advanced Settings, defaulting to the old value so an install that never touches it imports exactly as before. Both the DOM and regex paths resolve it through one method, so they cannot drift.Only a width ContentBox actually defines a rule for is accepted — the vendor CSS carries
is-content-noneplus every 20px step from 300 to 2700, andis-content-970as a one-off. Validated on save and again on read, because a value outside that set would be written onto every imported section and do nothing at all, and a silent no-op is worse than a rejected save. -
Lazy-loaded images are resolved at import. Imported markup kept whatever lazy scheme the source theme used, and the canvas compensated with a MutationObserver sweep — which fixed the view, not the content: the section saved to the library still had no
src. Import now promotesdata-src/data-original/data-lazytosrc,data-srcsettosrcset, anddata-bgand friends to an inlinebackground-image, using the same attribute list the canvas shim sweeps. A real attribute always wins, so a theme shipping a deliberate placeholder keeps it. The shim stays for content imported before this.
[2.0.0-a21] — 2026-08-31
Added
-
A mobile menu with a design behind it. The mobile nav was previously whatever the desktop stylesheet happened to do below 768px. It is now a deliberate full-screen overlay, built from the Figma "EE-mock" frames: a centred column of left-aligned links,
+/−disclosure indicators in place of the chevron, a rule under an expanded parent at 25% of the link colour, and a submenu that sits flat against the overlay rather than in a panel of its own.Four treatments were built and three removed. Sheet, drawer and panel each restyled the same shared elements from a different direction, and keeping them all switchable is what made every correction collide with something else. The overlay is the one that works, so it is the one that ships — there is no Mobile Layout setting, because there is no longer a choice to make.
-
Mobile-specific typography and colour. A MOBILE tab on the Nav Items modal: Menu Background, Text Color, Text Size, Text Weight, Divider Color and Divider Opacity. Each falls back to its desktop counterpart, so leaving a field alone means "follow desktop" rather than "reset to a default" — you set only what should differ.
-
The page no longer scrolls behind an open menu. Derived from document state rather than one nav's own, so a page carrying two nav sections cannot unfreeze itself by closing the wrong one, and set inline as well as by class so a host theme's own
overflowonhtml/bodycannot defeat it. -
Auto-fit for a crowded bar.
.nav-actionsisflex-shrink: 0and the links keepmin-width: auto, so nothing in the bar compressed — once the contents exceeded the width they simply ran off the right edge. The bar now degrades in order: tighten spacing, drop social icons, drop the CTA, and only then step the link type down. Every evaluation re-derives from a clean slate rather than measuring its own degraded state, which is what stops the hide/show oscillation that approach otherwise produces.
Changed
-
The dark theme supplies values, not properties. Every dark default was a property rule at (0,5,0)–(0,6,1) and unscoped, which meant it outranked anything a variant, a breakpoint or a setting wanted to say about the same element — silently, and regardless of intent. That one pattern produced six separate bugs in a single sitting: two logos on a dark nav, the overlay's dividers and banded rows, the submenu bleeding a panel background through the mobile menu, an invisible close button, a barely-visible ✕, and a toggle colour that could not be overridden.
Thirty-three such declarations are now seven. Twenty-four dark defaults moved into
--nav-*-themetokens declared once, four were deleted as exact restatements of the base rule, and nineteen emptied rules went with them. Dark can still change what something looks like; it can no longer decide who else is allowed to. A rule wanting to override a dark default now only has to be more specific than the BASE rule.The seven that remain are genuinely dark-only — the submenu's backdrop filter, the logo-variant swaps, a drawer border — with no light counterpart to be the default of.
Fixed
-
A parent item is no longer a link. Tapping a nav item with a submenu navigated to its page instead of revealing its children, which on a phone made the children unreachable unless you happened to hit the indicator. The href is kept for desktop, the keyboard path and crawlers; only the mobile tap is redirected into the disclosure.
-
The mobile menu meets the bar. Its offset assumed the bar's bottom edge sat exactly
--nav-bar-hfrom the top of the viewport, which is untrue whenever anything offsets the bar. The anchor is measured now. Relatedly, the bar'sbackdrop-filterwas creating a containing block forposition: fixeddescendants, so the menu and its scrim resolved against the 60px bar rather than the viewport; the filter is suspended while a menu is open. -
A dark nav no longer shows two logos. With both an
alt-logoand amobile-logodefined, the rule hiding the alt at:has()-weight lost to the dark rule showing it, and both rendered. -
Several rules that read correctly and lost. The mobile bar height set a property on one consumer while three others kept the desktop value; the submenu chevron was positioned against an element that grows when the submenu opens; the toggle had no containing block, so the collapsed
+landed in the middle of the row while the expanded−was correct by accident.
[2.0.0-a20] — 2026-08-29
Changed
-
Nav Builder settings now live in one place. The Nav Builder's controls were split across two surfaces — ContentBox's slide-out panel held layout and appearance, while the Nav Items modal held every colour and spacing control. Which half a given setting lived in was not predictable from the setting.
All eleven style controls move into the Nav Items modal, which grows a LAYOUT tab to hold them:
Tab Now also holds GENERAL Active Style, Menu Item Radius TEXT Font DROPDOWN Dropdown Radius LAYOUT Layout, Behaviour, Nav Height, Horizontal Padding BAR Theme, Shadow, Bar Width The slide-out keeps Source (Manual / Structure), which belongs with the item editor beside it rather than with styling.
Existing navs need no migration. The moved controls still persist to the same
data-cb-*attributes ContentBox was already using — the storage did not change, only where the control is drawn. A nav saved before this release reads back identically.The eleven settings stay declared in the plugin's schema, marked
hidden, rather than being deleted. ContentBox'sgetCurrentValues()ignoreshidden, so it still reads the attributes and still hands them tomount(); and because itsgetFormValues()only harvests rendered inputs, a hidden field can never be overwritten by a panel save. The schema also stays the written record of each setting's type, default and options.
Added
-
Content Size for the nav bar. The nav's boxed width was a hardcoded
max-width: 1400pxwith only a Boxed / Full Width toggle beside it. ContentBox has a Content Size control for sections, but it targets.is-containerand the nav has none — so it could never reach the nav bar.The BAR tab gains a Content Size slider (960–1920px). It drives a new
--nav-max-w, and--nav-bar-max-w— declared in the stylesheet since the floating-bar work but never actually set from JavaScript — now derives from it, so a floating pill and the content inside it size together instead of drifting apart.Unset falls back to the same 1400px the rule used to hardcode, so existing navs are unchanged. Bar Width = Full Width still removes the constraint entirely, and below 768px the bar stays edge-to-edge regardless — both noted under the control.
-
A Default link on the new sliders. Once a range input has been dragged there is otherwise no way back to "not set", and not-set is what lets a stylesheet fallback apply rather than a value being pinned. Content Size, Nav Height, Horizontal Padding, Menu Item Radius and Dropdown Radius each carry one.
Fixed
- Two different controls were both labelled "Width" in the Nav Items modal. GENERAL has a per-item Width (Auto / Full); the bar-level one added here is now Bar Width.
[2.0.0-a19] — 2026-08-28
Added
-
A real image library in the public demo. Every "choose an image" in the demo used to fall through to an upload, and an upload there has no server to go to — it is inlined as a base64 data URI. On the live demo one photo had become a 2.1 MB blob: the HTML tab measured 2,162,785 characters, 99.7% of it base64, with roughly 6,400 characters of actual markup buried underneath. That is the one panel whose entire job is to show that PageCraft stores plain, portable HTML, and it was demonstrating the opposite of both claims printed beneath it ("the exact markup PageCraft stores", "images kept as EE's portable file references").
demo/src/library.htmlis now a curated picker of 24 real image files, wired in through ContentBox's ownfilePickeroption — which propagates toimageSelect,videoSelect,audioSelect,mediaSelectandfileSelect, so all 16 bundled plugins that callopenFilePickerare covered by one setting. It uses the sameparent.selectAsset(url)contract as the real install'sActions/FilepickerBridge.php. Upload survives as a button inside the picker, since seeing your own photo land in the page is worth keeping.Measured after the change, same flow: 2,638 characters, 0% base64, one ordinary
url(...)reference.This replaces the
on*SelectClickhooks rather than joining them. They cannot coexist —openAsset()checks those hooks beforefilePicker, so leaving even one would silently keep routing that asset type to an upload.
Fixed
-
Demo build no longer inflates the images it ships. Two compounding traps, both found by measuring the output rather than trusting the tool:
sips -Zresizes to fit a box and so happily scales a small image up, which turned the 2.3 MB source set into 5.0 MB; and re-encoding an already well-compressed JPEG makes it bigger (one 59 KB file came back at 103 KB), which still left 3.0 MB after the upscaling was fixed. The build now converts PNGs, resizes only genuinely oversized images, and copies everything else untouched — 24 images, 2.3 MB in, 2.1 MB out, none exceeding 1600px.Images are sourced from the full-resolution originals in the repo, never from a release package or deployed theme: the release build downscales and de-duplicates block images, collapsing 194 files to 33 distinct with one placeholder repeated 54 times. Seeding from there would have produced a library of near-identical stubs.
[2.0.0-a18] — 2026-08-27
Added
-
Scroll-aware nav theming. A new Theme option, Match section, makes the bar re-read whichever section sits under it as you scroll and switch its own light/dark treatment to suit. Because it toggles the same
darkclass the other themes use, the logo variants (alt-logo) swap over with it for free — a dark logo over a light section, a light one over a dark section, with no extra configuration.Resolution runs in precedence order:
.pc-nav-dark/.pc-nav-lighton a section — an explicit instruction. Markers only, with no styles of their own, so adding one can never change how the section itself looks. Thepc-prefix keeps them clear of Bootstrap, Tailwind and site CSS.- ContentBox's own Text Color classes,
.is-light-text/.is-dark-text. These are not decoration we're borrowing: the editor's Text Color control writes them onto a section, box or column as you pick, so anywhere the Text Color has been set, the nav already knows what it's over with no extra markup. The shipped template packs also bake them into 71 sections (templates-simple 41, templates-quick 20, templates-animated 10). The block packs barely use them — a block gets its Text Color from the user in the editor rather than from the pack — so on a page built from blocks this tier is only as good as the Text Color choices actually made, and the markers in tier 1 are how you fill the gaps. - No match — hold the current treatment rather than snapping back to light, so an unmarked gap between two marked sections doesn't flicker.
Note the fallback's mapping is inverted from how it reads: the classes describe the text, the nav responds to the background behind it. Light text implies a dark background, so
.is-light-textasks for a dark nav.The section is sampled at the bar's bottom edge — the boundary a reader perceives the nav as sitting against — so the switch lands as a section's top edge passes under the bar, not a nav-height early. The nav's own section, its ancestors, and anything inside the bar are excluded from the search: a fixed bar overlaps its own section, and that section carries a Text Color control like any other, so without the exclusion the nav resolves against itself and the theme locks on whatever it started as.
[2.0.0-a17] — 2026-08-27
Changed
- An unlocked global header or footer now says so.
{exp:page_craft:global_header}renders only a locked component — locking is the publish switch, not just an editor guard — and returned an empty string otherwise. A configured header that produces a blank page is indistinguishable from a broken tag, and "lock it" is not guessable from that symptom. Both tags now emit an HTML comment saying whether the component is unlocked or has not been created. - The two tags share one implementation.
global_footer()was a near-copy ofglobal_header()differing only in the component key, and had already drifted — it never received the unlocked-state handling. Both now call onerenderGlobalComponent(), so they cannot disagree about what publishing means.
[2.0.0-a16] — 2026-08-27
Nav Builder rebuild, phase 4: undo.
Added
- Nav edits are undoable. Opening the CTA-button editor or the nav-link
styling modal now registers an undo checkpoint, so Ctrl/Cmd-Z returns the nav to
its state before you opened the dialog.
- Checkpointed on open, not per change: those modals' update handlers fire on every keystroke and slider drag, so checkpointing there would bury the undo stack in hundreds of single-character steps.
- Only the modals opened from
mount()needed it. Edits routed throughopenContentEditor'sonChangeare already checkpointed by ContentBox, which callssaveForUndo()inside the callback it hands the plugin — adding our own would produce two undo steps for one change.
[2.0.0-a15] — 2026-08-27
Fixed
-
Uploaded images were rejected as "not an image" in the demo — including SVGs. ContentBox validates a chosen asset by looking for
svgorbase64in the URL, or a known image extension on the end.URL.createObjectURLproduces neither, so every upload failed that check regardless of file type; SVG was simply where it got noticed. Uploads are now read as data URLs, which carrybase64(andsvgfor SVGs) and pass.- Data URLs also survive the localStorage restore. Object URLs are per-session and dangle after a reload, so images added to a demo page used to disappear on refresh — that limitation is gone rather than merely documented.
- Because the bytes are inlined into the page HTML, uploads are capped at 2 MB with an explanatory notice; an oversized image would otherwise blow the storage quota and lose the visitor's work on save.
-
Every "choose an image" control in the playground now uploads. 16 of the bundled plugins call
openFilePicker— swiper-slider alone has 8 call sites — and with nofilePicker,assetManagerBasePathoron*SelectClickconfigured, ContentBox'sopenAsset()falls through to nothing. All of those buttons did nothing on the demo, not just the nav's.- Fixed centrally: the demo supplies the
on*SelectClickhooks, whichopenAsset()checks before the file picker, so all 16 plugins are redirected at once. Fixing each plugin instead would have meant 26 edits and a second selection mechanism to keep in step — the duplication that caused most of this release's bugs. - a14's plugin-local upload fallback is removed in favour of that. The nav now always defers to ContentBox's asset flow and lets the host decide what choosing means; button wording still reflects which it will be.
- Object URLs are per-session, so an image added in the demo survives editing but not a reload. Same limitation drag-and-drop already had there.
- Fixed centrally: the demo supplies the
[2.0.0-a14] — 2026-08-27
Fixed
- Image fields fall back to an upload where there is no asset library. The
nav's logo fields called
openFilePickerunconditionally. The editor configuresfilePicker, so it gets the EE file manager — but the public playground deliberately omits it, and ContentBox'sopenAsset()falls through to nothing when nofilePicker,assetManagerBasePathoron*SelectClickhandler is set. The Browse buttons there simply did nothing.- Selection now goes through one helper: the asset library when one is
configured, otherwise an upload from the visitor's machine. The upload path
prefers the host's own
uploadhandler, so the result matches what drag-and-drop produces in that context — an object URL in the playground, a real upload on an install. - Buttons and placeholders read "Browse" or "Upload" to match what will actually happen.
- Selection now goes through one helper: the asset library when one is
configured, otherwise an upload from the visitor's machine. The upload path
prefers the host's own
[2.0.0-a13] — 2026-08-27
Fixed
- The public playground never registered ContentBox plugins, so anything
built on one rendered as unstyled markup.
build-demo.shcopiedblank.htmland injected only a<base>tag, leaving the barenew ContentBoxRuntime()it ships with — and with nopluginsmap the runtime loads no plugin JS or CSS at all.Actions/EditorFrame.phppatches that call for the real editor; the demo build did not.- Most visible on navs: every nav in
templates-simpleis anav-menuplugin (23 of them), so picking a template with a nav produced a nav that appeared not to render. - The demo canvas now registers all 54 plugins, derived from the source theme's
assets/plugins/*/rather than a second hardcoded list. The build warns if a futureblank.htmlno longer contains the call it patches.
- Most visible on navs: every nav in
Fixed
- The Mobile Logo Size setting now does something. At 768px and below the
logo height was hardcoded to
32px(and42pxfor the rounded crop), overriding both the shared Logo Size and the new mobile one — so the field added in a12 was inert. Both now read--nav-logo-h-mobile.- Blank still means 32px, exactly as before, so navs that never set a mobile size are unchanged. The difference is only that setting one now takes effect.
- The rounded variant is a square crop, so its width tracks the same value.
- Tablet (769–1024px) still hardcodes
36px/46px. Left alone deliberately: that width shows the standard logo and has no field of its own, so changing it would alter existing sites with nothing to gain.
[2.0.0-a12] — 2026-08-27
Added
- Light, dark and mobile logo variants. A nav can now carry up to three
renditions — the standard logo, one for dark backgrounds, and a compact mark for
narrow screens. ContentBox has no mechanism for this: stock
nav-menusupports text or a single image, and there is noprefers-color-schemeor dark-image handling anywhere in the bundle. Bootstrap has none either; the three-image swap is a theme convention.- Every supplied rendition ships in the markup and CSS picks one, following
the
default-logo/alt-logo/mobile-logoconvention. Doing it in CSS rather than JS means the swap follows thedarkclass however it arrives — including thedark-on-starttheme, which toggles that class on scroll. - Missing variants fall back rather than blanking the logo.
:has()only hides the standard logo when a replacement actually exists, so light-only navs behave exactly as before in dark mode and on mobile. Mobile outranks theme when both apply. - Existing navs are unaffected. They carry a bare
<img class="logo-img">with no variant class, which nothing hides; it gainsdefault-logoon the next save. - Light and dark share the Logo Size — they are one lockup in two colourways. The mobile mark gets its own optional size, falling back to the shared one.
- Alt text is shared: the renditions are the same logo, and only one is ever visible, so a screen reader announces it once.
- Framework-neutral. The nav plugin emits its own class names and doesn't branch
on framework; the bundled Tailwind build has no bare
imgrules, and these rules outrank a Preflightimgreset (0,3,0) and (0,6,1) vs (0,0,1).
- Every supplied rendition ships in the markup and CSS picks one, following
the
[2.0.0-a11] — 2026-08-26
Fixed
- A floating nav bar stayed a pill on mobile. No rule below 768px touched
.nav-wrapper, so the margin, radius and Width constraint applied all the way down — stranding the hamburger in a wide empty bar and wasting vertical space. A floating bar now goes edge-to-edge at 768px and below. This is a layout reset rather than a style override: colours, height and logo sizing still apply. - The mobile menu panel dropped from a hardcoded
top: 50px, unrelated to the real bar height — so it overlapped the bar at the 70px default and drifted further with a taller logo. Both the mobile and hamburger panels now track--nav-bar-h.
Notes
- There are no per-breakpoint settings today: all 12 settings apply at every width, and mobile appearance is governed by the stylesheet's media queries. Adding mobile-specific controls is a phase 2 decision.
Removed
contentbuilder.min.js(2.3 MB) andcontentbuilder-runtime.*(430 KB) no longer ship. PageCraft loadscontentbox.min.js, which already contains ContentBuilder; nothing loads the standalone bundle. The three mentions of it insidecontentbox.min.jsare exclusion filters (keeping editor scripts out of preview/export) and acurrentScriptPath()probe that returns undefined when the tag is absent — none of them fetch it.contentbuilder.cssis loaded and is kept. Thecontentbuilder-runtime.*pair are strays from a ContentBuilder package, never part of the ContentBox distribution.- Excluded at build time rather than deleted, so the repo stays a faithful vendor mirror. Re-verify on each ContentBox upgrade — if a future release starts loading it, this exclusion would break the editor.
- Install drops 42 → 40 MB. The zip moves only 20.0 → 19.2 MB: minified JS compresses about 5:1, so the win is on disk rather than in the download.
Notes
- For the record, since it comes up: the zip is 70% picker thumbnails
(
.png7.7 MB / 40%,.webp5.7 MB / 30% compressed). Demo content images are 1.8% — 1.1.22 already replaced them with flat placeholders that compress to nearly nothing, so swapping those for remote placeholder URLs would save around 0.3 MB and would make customer pages depend on a third-party service.
[2.0.0-a10] — 2026-08-26
Nav Builder rebuild, phase 3 (first pass): theming by value, not by rule.
Fixed
- Dropdown Background was ignored in dark mode, and on mobile and hamburger in
both themes. Six rules set the submenu's background and only one of them
consulted
--nav-dd-bg; the other five hardcoded a value at higher specificity, so the setting was written correctly, shown as applied, and had no effect.- The base rule now reads
var(--nav-dd-bg, var(--nav-dd-bg-theme, #fff)), and every themed or variant rule sets--nav-dd-bg-themeas a value instead of settingbackgroundas a property. A value cannot outrank the user's inline--nav-dd-bg, so the setting always wins — the divergence stops being expressible rather than merely being corrected. - This is the shape the rest of phase 3 will follow. v1.1.23 fixed five of these by hand; the remaining hardcoded rules are theme chrome with no user setting behind them yet, and become relevant when phase 2 makes them settable.
- The base rule now reads
Notes
.variant-one-page .nav-link.activestill hardcodes its active colours in both themes. Left as-is: that is arguably the variant's own active state rather than the base link colour, and is worth a deliberate decision rather than a sweep.
[2.0.0-a9] — 2026-08-26
Changed
- Removed Delete from the nav item hover toolbar. Removing a menu item already belongs to the slideout's item list, and a second delete sitting on a hover toolbar over live content was easy to hit by accident. The toolbar now offers Edit and, for CTA buttons, Edit URL. The Structure-mode special case that hid the delete for read-only menu sets goes with it.
- The toolbar is now a fully rounded pill with circular buttons.
[2.0.0-a8] — 2026-08-26
Fixed
- "Distance from Nav" was measured from the link, not the nav bar.
.nav-itemcarried onlyposition: relative, so it was as tall as its link and sat vertically centred in the bar. The submenu'stop: 100%therefore started somewhere mid-bar, and the configured distance was added to whatever arbitrary gap the link's padding and the bar height happened to leave — so the same setting produced a different gap at different bar heights..nav-itemnow spans the bar height (align-self: stretch) and centres its link, sotop: 100%is the bottom edge of the bar and the distance means what it says. The link keeps its own padding, so nothing moves except the dropdown's origin.- Scoped to horizontal navs: in the mobile and hamburger variants the submenu is
position: staticand sits in normal flow, where making the item a flex row would put it beside the link rather than under it. Both reset to block flow.
[2.0.0-a7] — 2026-08-26
Fixed
- Setting a bar margin silently disabled every nav dropdown. A floating bar
carried
overflow: hidden, and submenus areposition: absoluteinside.nav-item, whose containing block sits inside that wrapper — so the clip removed them entirely. The rule existed to keep content inside the rounded pill, but.nav-containerand.nav-listhave no background of their own, and the wrapper's own background and backdrop-filter are already bounded by itsborder-radius, so nothing needed clipping. (overflow-x: hiddenis not an alternative: with one axis clipped the other computes toautorather than staying visible.)- Pre-existing rather than new, but only reachable once a bar margin is set — which the previous release made worth doing.
[2.0.0-a6] — 2026-08-26
Fixed
- The Width setting didn't resize a floating nav bar.
fullWidthonly setmax-widthon the inner<nav>, so with a bar margin set — where the bar is a visible pill — toggling Boxed/Full Width moved the contents while the pill stayed edge-to-edge. A floating bar now takes--nav-bar-max-w(1400px, the same constraint the content uses) when Boxed, and spans the section minus its margin when Full Width. Only applied while floating: an edge-to-edge bar stays edge-to-edge and lets Width govern its contents, as before. - Bar margins were not symmetric.
margin: var(--nav-bar-margin, 0)applied the value to all four sides and the width was separately reduced by twice the horizontal margin, so the left and right insets were doubled relative to top and bottom. Vertical inset now comes from the margin and horizontal from the width reduction, withautoside margins centring the result — one value, four equal gaps.- Vertical margins could also collapse through the section overlay (which sets
overflow: unset), making the gap above the bar differ from the one below. The plugin root establishes a block formatting context while floating, which contains them without clipping dropdowns.
- Vertical margins could also collapse through the section overlay (which sets
[2.0.0-a5] — 2026-08-26
Fixed
- A logo taller than the nav bar overflowed instead of the bar growing around
it.
.nav-wrapperalready auto-grew tomax(nav-height, logo-height + 20px), but.nav-container,.nav-listand the boxed active link stayed pinned to the raw--nav-height. The bar grew while its contents did not, so a 100px logo in a 70px bar sat flush against the top and bottom edges with no padding.- The computed height is now a single
--nav-bar-hdefined on the plugin root and used by all four rules, so they cannot diverge again. Padding is--nav-logo-gutter(20px total, 10px each side), keeping the logo centred. - The mobile dropdown's
max-height: calc(100vh - 70px)hardcoded the default bar height in two places, so the panel was mis-sized whenever the bar wasn't 70px. Both now track--nav-bar-h.
- The computed height is now a single
[2.0.0-a3] — 2026-08-26
Changed
- Nav colour controls now use ContentBox's own colour picker. The nav modal
used a bare
<input type=color>, so it had none of the picker used everywhere else in the editor. It now callsbuilder.openColorPicker, the same control as the slide-out's Background Color: hex/rgb/hsl entry, hue and transparency sliders, eyedropper, the site's brand palette, saved colours, and "No color".- The old comment explained the workaround: CB 5.x's picker (Pickr) "didn't reliably mount from plugin context". ContentBox 6 replaced Pickr with its own picker — the class is gone from the bundle entirely — so the workaround no longer applied, while the native input's missing alpha, palette and saved colours very much did.
- "No color" now clears the override, which is what the paired checkbox means.
- The two colour-field helpers were byte-identical copies; they are now one implementation with two local names. 12 call sites, unchanged.
Fixed
- "Lock colors" silently stopped working in the 6.0.0 upgrade. It hid the
free-pick controls via
.pcr-selection/.pcr-result/.pcr-swatches— Pickr classes, all of which have zero occurrences in ContentBox 6. The setting appeared to be on and locked nothing. Now targets the current picker's classes (.kelir-area,.kelir-sliders,.kelir-io,.kelir-saved), leaving the brand palette and "No color" reachable as before.
[2.0.0-a2] — 2026-08-26
Nav Builder rebuild, phase 1 of 4: one apply path.
Changed
- The nav's CSS-variable mapping existed twice. One copy read
element.dataseton mount, the other read the settings modal's state live, and a comment asked maintainers to keep the two in sync by hand. They had not drifted — but a setting added to one and missed in the other would apply live and vanish on reload (or the reverse), silently, since nothing checks. That is the same class of duplication that caused this release's plugin-registry and model-allowlist bugs.- Both are replaced by a single module-level
applyNavVars(element)that reads onlyelement.dataset. The modal now persists its state todata-*first and then calls it, so it only has to know how its fields map to data keys — not how those become CSS variables. 66setVarcalls become 33. applyFloatingBar()is deliberately left out of it: it must run after the section-background paint so a floating bar's own colour survives being overpainted with!important. Both callers still invoke it themselves.- Verified equivalent rather than assumed: running the old and new mappings
over a fully-populated dataset produces byte-identical output across all 33
variables, and all 33
data-*persistence keys are preserved.
- Both are replaced by a single module-level
Notes
- No behaviour change is intended in this phase. Phases 2–4 consolidate all
styling into one settings surface, remove the
.dark-scoped property rules that silently override user settings, and register nav edits withsaveForUndo().
[2.0.0-a1] — 2026-08-26
Development build on the ContentBox 6 line. main remains on 1.1.x for
hotfixes. The version carries a prerelease suffix deliberately: it exists so
PC_ASSET_V changes and browsers/CDNs refetch plugin and module assets during
development. The plain 2.0.0 is reserved for the actual release.
Version strings are capped at 10 characters. EE stores the add-on version in
exp_extensions.version, which is varchar(10); anything longer throws
SQLSTATE[22001] Data too long part-way through the update — after the
add-on's own update steps have run, leaving the install in a half-updated state
that looks like a failure but isn't. 2.0.0-a1 leaves room through -a99.
-
Image attachments / vision in AI Code Chat. You can now attach a screenshot or reference image and ask the AI to build from it, rather than describing a layout in words.
chatAttachmentsis enabled and bothvisionCapableCodeModelsandvisionCapableChatModelslist the full model set — every model in the allowlist accepts image input, verified against OpenRouter'sarchitecture.input_modalitiesrather than assumed.- The proxy translates ContentBox's
attachmentsarray into OpenAI-style multimodal content parts. Document attachments never reach it: ContentBox extracts their text client-side and folds it into the prompt, so only images need translating. - Only inline
data:image/URLs are forwarded — a client cannot name an arbitrary remote URL for the server to fetch on the site's shared key. - Images are budgeted separately from text (8 MB total, 4 images max). Counting base64 image bytes against the 256 KB text cap would have rejected every vision request outright.
- Note the AI still has no web access. "Look at example.com and copy it" cannot work; attaching a screenshot of that page is the supported route.
- The proxy translates ContentBox's
-
AI-generated pages no longer ship broken Unsplash images. The chat drives image generation through a three-call async protocol (
generateMediaUrl→checkRequestStatusUrl→getResultUrl), not thetextToImageUrlused by the insert-image flow. With those unset, ContentBox told the model "AI IMAGE GENERATION IS CURRENTLY DISABLED — but users can still use external image URLs (Unsplash, Pexels, etc.)", so it invented stock-photo URLs whose ids 404 — while a different part of the same prompt warns never to do exactly that. All three legs are now served by theai_imageACT.- OpenRouter is synchronous, so the work happens on the generate leg; the result is stashed against a request id (EE cache, 1 hour) and the status and result legs report it.
- ContentBox sends a fal.run
endpointfor the server to call. It is deliberately ignored — fetching a client-supplied URL with the site's shared key would be an SSRF hole. - Five image models offered, all validated against OpenRouter's live catalogue and all covered by the endpoint's own allowlist.
Changed
- ContentBox.js upgraded 5.9.5 → 6.0.0. New
execCommand-free text editing engine, markdown-style typing shortcuts, redesigned colour picker and button editor. InnovaStudio state that options, methods and events are unchanged and that content saved with earlier versions stays compatible, so this is an asset swap rather than an API migration.- All seven locally patched files were preserved.
swiper-slider/index.js, bothtemplates.jspacks andmodules/form-builder.htmlwere merged three-way against the 5.9.5 baseline; the only real conflict was 6.0.0 renamingitemsContainertoitemsStack, resolved to the new name while keeping PageCraft's slide-to-newest behaviour. - The
?v=module cache-buster was re-applied to the newcontentbox.min.jsat its threemodulePathfetch sites. nav-menu(Nav Builder) was not taken from 6.0.0. It is a PageCraft fork that has diverged too far to merge; the vendor's rewritten plugin is preserved underreference/nav-builder-2.0/as the baseline for rebuilding it, which is the headline work still to come on this line.
- All seven locally patched files were preserved.
Fixed
- 21 ContentBox 6 plugins were insertable but inert.
ThemeAssets::contentBoxPlugins()is a hardcoded allowlist, and a plugin folder present on disk but missing from it is never registered with the runtime — so its blocks drop into the page as dead markup. Registry goes 33 → 54, matching the on-disk set exactly. Affectsaudio-player,chart,contact-form,countdown-timer,flip-card,floating-showcase,map-embed,marquee,marquee-wall,pricing-table,process-steps,progress-bars,section-divider,star-rating,table-of-contents,tabs,team-members,testimonials,text-slider,typewriterandyoutube-embed. - The editor and the front end could disagree about which plugins exist.
Actions/EditorFrame.phpcarried its own duplicate copy of the plugin list rather than calling the shared registry, and had already drifted from it. It now callscontentBoxPlugins(), so there is one source of truth again. - The AI model picker silently downgraded Claude Sonnet. The allowlist
carried
anthropic/claude-sonnet-4-5; OpenRouter spells itclaude-sonnet-4.5, so selecting it fell back to the default model with no error. All model ids are now validated against OpenRouter's live catalogue.
Added
- AI Code Chat is reachable. ContentBox ships no sidebar button for the AI
panel — it is exposed only through the public
openAIAssistant()API, so settingsendCommandUrlalone wires up the backend and leaves the feature invisible. An AI Assistant button now sits alongside Animation, Timeline and Clear, shown only when theenable_aisetting is on.- Model lists refreshed to current OpenRouter offerings (Claude Opus 5 /
Sonnet 5, GPT-5.6 Sol / Luna, Gemini 3.x).
AiProxyGuard::ALLOWED_MODELSand the editor's picker are a matched pair and must also coversystemModelanddefaultChatSettings; both now agree exactly.
- Model lists refreshed to current OpenRouter offerings (Claude Opus 5 /
Sonnet 5, GPT-5.6 Sol / Luna, Gemini 3.x).
Fixed
- The AI endpoints could never have worked.
ai_proxyandai_proxy_streamwere registered withcsrf_exempt = 0, but ContentBox issues those requests itself with only aContent-Typeheader and no EE XID. EE rejected them with "This form has expired." before PageCraft ran at all — so the first AI prompt would have failed with an HTML error page rather than a response. All three AI ACTs are nowcsrf_exempt = 1, with an Origin/Referer check (AiProxyGuard::isSameOrigin()) standing in for CSRF, exactly as theuploadandform_submitendpoints already do. Each also still requires a logged-in member withaccess_cp, so a forged cross-site request cannot spend the site's API credits.
Added
- AI image generation now works.
defaultChatSettingspreviously advertisedimageModel: 'fal-ai/nano-banana'while no image provider was wired at all, so the control appeared and silently failed. A newai_imageACT (Actions/AiImage.php) proxies text-to-image to OpenRouter's/api/v1/imagesendpoint using the same key as chat, and is wired to ContentBox's synchronoustextToImageUrlpath.- The generated image is written into the configured EE upload destination and
registered in
exp_files, so AI images appear in CP > Files and behave like any other uploaded asset. - Image models are allowlisted the same way chat models are, so a tampered
request cannot bill an arbitrary model. Default is
google/gemini-2.5-flash-image(Nano Banana), the cheapest option. imageAutoUpscaleis set tofalse: OpenRouter has no upscale endpoint, and leaving it on would make ContentBox chain a second call to a URL we do not serve.- Known limitation: OpenRouter's images endpoint takes no width/height, so
ContentBox's requested dimensions become an aspect-ratio hint appended to the
prompt. Its Stable-Diffusion-era parameters (
negative_prompt,steps,guidance,scheduler) have no equivalent and are ignored.
- The generated image is written into the configured EE upload destination and
registered in
Changed
- Sidebar Animation/Timeline buttons now call ContentBox 6's Motion API
directly (
openMotionCascade()/openMotionDock()) and are labelled Motion Cascade and Motion Dock to match. The previous calls went throughopenAnimationPanel()/openAnimationTimeline(), which 6.0 keeps only as one-line legacy shims — if a future release drops them the buttons would fail silently. getApiKey()now lives inAiProxyGuardinstead of being duplicated verbatim inAiProxyandAiProxyStream, so the key-resolution order cannot drift between endpoints.
Known issues
toggleandtooltipship nostyle.cssfrom the vendor (true in 5.9.5 as well), so they 404 on the stylesheet for any page using them.
Notes
PC_ASSET_Vis read from the installed version in the database, not fromaddon.setup.php. Bumping the file alone is not enough — the add-on update has to run before asset URLs change.- The add-on's own update steps (action registration, CSRF exemptions, column
widening) all run before
parent::update(), so they land even if EE's own bookkeeping fails afterwards. Idempotent throughout, so re-running is safe.
[1.1.25] — 2026-08-21
Fixed
- Three block images that were referenced but never shipped.
office2.png,person2.pngandai-sFtJP2.jpgare referenced by blocks inminimalist-blocks(and, for the last one, by a Simple template) but were absent from the theme, so those blocks rendered broken images. Recovered from the ContentBox vendor distribution and added toassets/minimalist-blocks/images/.
Notes
- A sweep of every asset reference in the block library and the three template packs found 110 references with no corresponding file, of which only these 3 exist anywhere in the vendor distribution. The remaining 107 — 70
-edit*variants inminimalist-blocks, 29img-0NN.jpgintemplates-animated, and a handful elsewhere — were never shipped by InnovaStudio and cannot be recovered. Blocks and templates depending on them will show a missing image regardless of PageCraft version.
[1.1.24] — 2026-08-20
Added
{exp:page_craft:playground}— a private scratchpad: the full PageCraft editor on a front-end template, detached from any entry, for building and trying out layouts without creating a throwaway entry to hold them.- Super admin only. Any other member, and every logged-out visitor, gets an empty string — so dropping the tag on a public template exposes nothing. The check lives in the tag rather than being left to template logic, because a tag that renders an editor to the public when someone forgets an
{if}is the wrong default.editor_frameperforms its own auth check as well, so this is the second lock rather than the only one. - It embeds the real
editor_frameendpoint, not a stripped copy, so uploads go to the EE file manager, the file picker works, and AI is available if enabled. - Content is not saved to an entry. It round-trips through
localStoragevia the samepostMessageprotocol the publish form uses (pagecraft-ready/pagecraft-init/pagecraft-save), so work survives a reload. Copy HTML lifts the markup and CSS out when a layout is worth keeping; Reset clears it. - Optional
heightparameter, in px, clamped 400–2000 (default 800).
- Super admin only. Any other member, and every logged-out visitor, gets an empty string — so dropping the tag on a public template exposes nothing. The check lives in the tag rather than being left to template logic, because a tag that renders an editor to the public when someone forgets an
[1.1.23] — 2026-08-18
Fixed
- Nav item hover colour and dropdown hover background work again. Both settings were being written correctly; the dark-theme block in
nav-menu/style.csswas overriding them with hardcoded values at far higher specificity. Its selectors are(0,6,1)—div.is-section.nav-menu.dark [data-cb-type="nav-menu"] .nav-link:hover— while the variable-driven rules that read your settings are(0,3,0), so a literal there silently beat anything set in the Nav Items modal. Worse, dark's non-hover.nav-link { color: #f5f5f5 }outranked the hover rule entirely, which is why hover colour did nothing at all. Every colour in the dark block is now expressed asvar(--nav-*, <dark default>), so a set value wins and the dark default applies otherwise. Only ever affected navs using the dark theme. - Hover background is no longer discarded by the active style. The Boxed, Line and Caret styles hardcoded their hover background (
background: transparent, or a separate--active-bg-color), throwing away--nav-link-hover-bg. They now read the user's value with the stock colour as fallback. This one affected light navs too.
Added
- Highlight colour. A single control driving the Line style's underline bar, the Boxed style's bottom border, and the dropdown item's hover indicator — one value, three consumers, so they cannot drift apart. These were previously fixed defaults in the stylesheet with no control at all.
- Logo size, 40–100 px.
.logo-imgand its rounded variant both track--nav-logo-heightrather than the hardcoded40px/49×49. The bar auto-grows to fit: its height ismax(nav height, logo + 20px), computed in CSS so the slideout's Nav height slider and this control stay independent. - Bar margin and corner radius, for a floating nav bar. The bar insets from the section edges and its width shrinks by the horizontal margin so it can't cause a horizontal scrollbar.
- Bar background, used when the bar floats. A floating bar can't inherit the section background — it would be an invisible pill in the colour behind it — so a margin plus this colour gives the floating look. With no margin the nav still inherits the section background exactly as before, preserving the behaviour locked in v0.9.40/v0.9.45.
- All five controls live in a new BAR tab in the Nav Items modal, and round-trip through
data-nav-*attributes like the rest of the nav settings.
Notes
- This release changes theme assets. Unlike 1.1.14–1.1.22, installs must copy
themes/user/pagecraft/again (and CDN-fronted sites should purge the pull-zone) or the nav changes won't appear.
[1.1.22] — 2026-08-18
Changed
- Demo photos and videos ship as local placeholders. ContentBox's stock demo media — ~48 MB of photos and video whose only job is to make a freshly dragged-in block look finished — is replaced at build time with flat grey placeholders of the same aspect ratio, and a blank clip for video. 534 images and 8 videos, 48.4 MB down to 3.0 MB.
- Filenames and formats are unchanged. Nothing is renamed or deleted, so no reference needs rewriting anywhere — not in PageCraft's code, not in ContentBox's — and pages already built on an existing install keep resolving their images, rendering a grey box rather than a broken one.
- Aspect ratio is preserved per image (read with
sips, 45 distinct ratios in this build), so a portrait photo is replaced by a portrait placeholder and block layouts don't shift. Placeholders are generated at 640px on the long edge; being a flat fill, they are visually identical to full-size ones once scaled by the block's CSS. - The editor's existing
pc-imgtreatment still applies, so an unset image reads as a placeholder zone rather than a missing asset. - Excluded: the top-level
assets/images/, which holds the animation preview GIFs used by the editor UI, not demo content. - The build degrades gracefully — without
sips(non-macOS) it warns and ships the full-size media.
Notes
- Package is now 20 MB zipped / 42 MB unpacked, down from 90 MB / 112 MB at 1.1.19 — a 78% reduction across 1.1.20–1.1.22.
- This removes the need for the video re-encoding step considered in 1.1.21: the demo videos are replaced outright rather than compressed.
[1.1.21] — 2026-08-18
Changed
- Picker thumbnails ship as WebP.
build-release.shconverts every*/preview/image to WebP at quality 82 and rewrites the references — 412 thumbnails, 10 MB down to 5 MB. Verified to introduce no broken references: the count of unresolved image references in each template pack is identical before and after conversion.- Only
*/preview/is converted.*/images/is deliberately left alone — those photos are inserted into user page content, so a customer's saved HTML points at.../images/foo.jpgand changing the extension would 404 every page already built on an existing install.styles/andfonts/are also skipped; their paths are constructed inside ContentBox's own minified JS. - A thumbnail is only converted when its basename is unique across the package, so the reference rewrite cannot touch an unrelated file of the same name. 151 were skipped on that basis.
- The build degrades gracefully: without
cwebpon PATH it warns and ships the original PNG/JPG.
- Only
Removed
minimalist-blocks/example.mp4(240 KB), referenced by nothing in the package.
Notes
- Package is now 67 MB zipped / 87 MB unpacked, down from 90 MB / 112 MB at 1.1.19.
- Video re-encoding was attempted and abandoned for now: macOS's
avconvertuses fixed-bitrate presets, so re-encoding these already-compressed sources made them larger at 540p and 720p, and only 480p saved space — unusable for full-width background video. Doing this properly needsffmpegwith CRF-based encoding.
[1.1.20] — 2026-08-18
Removed
- Monochrome Blocks is no longer bundled or shipped. It is a separately licensed ContentBox.js add-on and is not covered by the redistribution rights PageCraft ships under, so it must not travel in the package. The pack is now gitignored, untracked, and excluded by
build-release.sh; the files stay on disk for local development. No code change was needed — packs are auto-discovered frompack.json, so nothing referenced it by name. - Package size drops from 90 MB to 75 MB zipped (112 MB to 95 MB unpacked).
[1.1.19] — 2026-08-16
Changed
-
The release package now mirrors ExpressionEngine's own folder structure.
build-release.shused to emit a singlepage_craft/folder with the theme tree buried inside it, leaving the customer to find it and copy it out by hand. The package is now:PageCraft-<version>/ INSTALL.md system/user/addons/page_craft/ themes/user/pagecraft/Copy both folders into the site root and install from the control panel — the manual
cp -Rstep is gone. Hoisting is safe because nothing reads the add-on's bundled copy at runtime:ThemeAssets::getThemePath()resolves the site's owntheme_folder_path, and the install-time auto-sync that once read the bundled tree was removed in 1.1.11.
Added
INSTALL.md, shipped at the package root: requirements, install and upgrade steps, verification, and troubleshooting for the two failure modes that actually happen — a missing theme tree, and an upgrade that didn't replace it (including the CDN pull-zone note for Cloudways-hosted sites).
Notes
README.mdnow documents both paths: installing from a release package, and working from the repo (where the theme tree still lives inside the add-on and still needs copying to the site's theme folder after any editor-asset change).
[1.1.18] — 2026-08-13
Fixed
- ContentBox's tool-rail icons are legible in dark mode. 1.1.17 turned the rail dark but left the icons near-black on it. ContentBox's UI icons are sprite symbols (
<svg class="svg-icon"><use href="#icon-…">) and every symbol is definedstroke="currentColor" fill="none"— so they are painted by the CSScolorproperty. ContentBox's own dark rule setsfill(.dark #_cbhtml .is-sidebar.is-area button svg { fill: #d3d3d3 !important }), which those paths ignore, and it ships no dark override forcolor. PageCraft now drivescolorinstead, which fixes every sprite icon in the chrome at once. Scoped to:root.dark, so light mode is untouched.
[1.1.17] — 2026-08-12
Added
- The editor and global-component frames follow the CP theme. Both are standalone documents that can't inherit the control panel's
body[data-theme], but they are same-origin with the CP, so they now read the samelocalStorage.themekey EE's account-menu switcher writes. A short<head>script applies it todocumentElementbefore first paint — the same anti-flash approach EE uses inheader.php.- Setting
darkon<html>also switches on ContentBox's own dark chrome: 96 rules incontentbox.cssand 17 incontentbuilder.cssare scoped to a.darkancestor, covering the left tool rail and the section/box settings panels. PageCraft only themes the UI it injects itself. - Toggling the CP theme updates an already-open editor, no reload — the
storageevent fires in every same-origin document except the one that changed the value. - The Save as Section modal is themed (converted from inline styles to classes).
- The canvas document is deliberately excluded: it renders real page content and must keep showing the design as visitors will see it.
- Setting
Changed
- The theme bootstrap and PageCraft's mirror of EE's design tokens live in
Traits/ThemeAssets(cpThemeBootstrap(),cpThemeTokensCss()) so the two frames can't drift apart. The mirror exists only because a standalone frame doesn't load EE's control-panel stylesheet; anything rendering inside the CP body uses EE's tokens directly. - The publish-form toolbar now uses
--ee-gray-5rather than--ee-gray-blank. In dark mode pure black made the toolbar the darkest element on screen, below even the CP page behind it.
Known gaps
- The MCP control-panel pages (Settings, Sections, Library, Docs) still carry hardcoded colours and stay light under a dark CP theme.
- Within the editor frame, the right-click context menu, the lock/unlock buttons and the toast are not themed yet.
[1.1.16] — 2026-08-12
Added
- The publish-form chrome follows the CP theme. The PageCraft field's wrapper, toolbar and canvas surround now take their colours from ExpressionEngine's own control-panel design tokens (
--ee-gray-*,--ee-text-*) instead of hardcoded hex. Switch the CP theme from the account menu — Dark, Snow, Slate, Pink — and the field follows, with no PageCraft setting to configure and no JavaScript involved: EE defines the tokens on:rootand re-defines them per theme onbody[data-theme=*], and the field renders inside that body, sovar()resolves on its own.- The editor canvas is deliberately untouched. It renders real page content in its own iframe document and must keep showing the design as visitors will see it. Only the chrome around it is themed.
- Each token carries the previous hardcoded value as its
var()fallback, so the chrome still renders sanely if EE renames a token.
Changed
- The field's toolbar, buttons and canvas surround are styled from a stylesheet (emitted once per request, however many PageCraft fields are on the page) rather than inline
styleattributes, and the active-device button is tracked with anis-activeclass rather than JavaScript writingstyle.background/style.color. Inline styles can't be overridden by a themed rule, so this was a prerequisite for theming. Light-mode appearance is unchanged apart from the toolbar icons, which now use EE's--ee-text-tertiary(slightly darker and cooler than the previous#999, and better contrast in both themes).
[1.1.15] — 2026-08-05
Fixed
- Buttons in ingested templates are editable again. ContentBox only edits an
<a>as a button when the anchor sits inside a cell carryingis-subblock editwhose computed display is block, inline-block or flex. The ingest pass setrole="button"on button-like elements — which ContentBox ignores — and then excluded those elements from the loose-text pass that hands out editable markers. The combination froze every CTA in an imported template: label uneditable, URL unchangeable.- Ingest now marks the button's parent as the editable cell (
prepareSectionDom()step 4b), which is the shape ContentBox actually looks for. The anchor itself is never marked — doing so makes ContentBox treat it as a text block and drops the button settings panel. - The cell is only claimed when it holds nothing but button-like children (whitespace, comments and
<br>ignored), so a mixed block — heading + copy + button — is left alone rather than handed to ContentBox whole. Inline parents (span,label) are skipped because they can't satisfy the display requirement, as are structural nodes (section / container / column), which would need a real wrapper element that this pass deliberately does not create. <button>elements are still left alone. ContentBox will only ever edit an<a>, so the only fix would be converting<button>→<a>, which breaks form submits; FormBuilder is the supported path for forms.- Note: this changes ingest-time output. Existing sections must be re-ingested to pick it up; a code deploy alone won't alter sections already in the library.
- Ingest now marks the button's parent as the editable cell (
[1.1.14] — 2026-08-05
Fixed
- Imported sections no longer lose their thumbnail on save. Sections created by Pack Import or Template Ingest store their thumbnail as a plain URL, not an EE file reference. EE's drag-and-drop file field can't render a bare URL — it showed a broken red X — and it posts back empty, so simply opening a section and clicking Save silently wiped the thumbnail. The section-edit screen now detects a URL-shaped thumbnail, renders it as a direct
<img>preview ("Imported preview. Upload below to replace."), and carries the value through a hidden field thatsave_section()falls back to when the picker is empty. The picker is still offered for replacement. The hidden field is client-supplied, so its URL shape is re-validated server-side before it's accepted. - The section picker shows section names again. The generated sections file emitted
thumbnail,categoryandhtmlfor each design but noname, so ContentBox's picker rendered unlabeled thumbnails. The name is now emitted, encoded withjson_encode()so names containing quotes, backslashes or line breaks still produce a valid JS string literal.- Note: this changes generated output. Existing installs must regenerate the sections file (PageCraft → Sections → Regenerate sections file) before titles appear; a code deploy alone won't do it.
[1.1.13] — 2026-07-14
Fixed
- Editor module fetches are now cache-busted by add-on version. ContentBox loads the FormBuilder settings panel (and other modules) by fetching
assets/modules/<name>.htmlfrom a bare, cacheable URL. On hosts with a CDN/Varnish in front of the theme (e.g. Cloudways with CloudwaysCDN), that file could be served stale to the editor even when the origin was updated — so new editor fields (like 1.1.12's Redirect URL) didn't appear until the CDN pull-zone was purged, which is easy to miss behind the usual Varnish/browser purges. The three ContentBox module fetches now append?v=<add-on version>(window.PC_ASSET_V, injected by the editor and global-component frames). A new query string is a new URL to browser, Varnish, and CDN, so every version bump forces a fresh pull automatically.- One-time note: the browser/CDN must load this patched
contentbox.min.jsonce for the buster to take effect. On a CDN-fronted site, purge the CDN pull-zone after deploying 1.1.13; from then on, module updates propagate without manual purges.
- One-time note: the browser/CDN must load this patched
Changed
- Editor and global-component frames now expose
window.PC_ASSET_V(the add-on code version) for the module cache-buster.
[1.1.12] — 2026-07-14
Added
- FormBuilder: optional "Redirect URL (on success)". A new field in the FormBuilder Settings tab. When set, a successful submission sends the visitor to that URL (
/thank-you, a full URL, etc.) instead of showing the inline Thank You Message. Leave it blank to keep the current behavior (the message is shown). The value is stored per form in the block'sdata-settings(redirectUrl) and escaped for the generated form script. Applies to the default JSON submission type.
Notes
- The generated form still passes a block of unused InnovaStudio FormViewer options (AI media generation:
model, Fal/OpenAI endpoints, and the disabled Workflow tab). These render as empty strings and are harmless; they were left in place to avoid altering vendor FormViewer expectations. No functional config beyond the fields exposed in the Settings tab is active.
[1.1.11] — 2026-07-13
Changed
- Reverted the automatic theme-asset sync (1.1.9–1.1.10). It proved unreliable across hosting setups. PageCraft's theme assets are again installed/updated by manually copying the bundled theme into the active theme, on install and after any upgrade that changes editor/runtime assets:
See the README for the full step.cp -R system/user/addons/page_craft/themes/user/pagecraft/* themes/user/pagecraft/
[1.1.10] — 2026-07-13
Fixed
- Editor assets self-heal — the theme sync no longer depends on running the CP "update". 1.1.9 copied the bundled theme into the active theme only during
update(), which was still fragile (the update had to actually run, with the bundled theme deployed). PageCraft now checks and repairs the active theme (themes/user/pagecraft/) wherever the editor is about to load — the fieldtype's publish-form render, the settings page, and the updater — viaThemeAssets::ensureThemeAssets(). It's a cheap version-stamp comparison (.pc-assets-version) on the happy path and copies only when the stamp is missing/old or the ContentBox core asset is absent; the per-installpagecraft-sections/andimported/trees are skipped and nothing is deleted. The stamp uses the add-on's code version (fromaddon.setup.php), so simply dropping a newer build on disk triggers the re-sync on the next editor load — no CP update required. If the copy can't run, the exact reason (e.g. "themes/user/pagecraft/ is not writable") is now shown in the CP instead of failing silently.
[1.1.9] — 2026-07-13
Fixed
- Theme assets now sync automatically on install/update — no more manual
cp. The ContentBox editor loads its module/runtime files from the site's active theme (themes/user/pagecraft/), a separate copy from the add-on's bundled theme that agit pull/ CP update never touched. So an upgrade that changed an editor asset (e.g. the 1.1.8 FormBuilder settings panel) silently didn't take effect until someone re-ran the README'scp -R. The updater now copies the bundled theme into the active theme on install and update. Add-on-owned files are overwritten (they must match the installed version); nothing is deleted and the per-installpagecraft-sections/(generated) andimported/(user packs) trees are skipped. Best-effort — a copy failure is logged, never fatal.
[1.1.8] — 2026-07-13
Added
- Per-form notification recipient. Each FormBuilder form can now send its submissions to its own email address instead of one site-wide recipient. Set it in Form Builder → Settings tab → "Notification Email". The global setting (Add-Ons → PageCraft → Global Settings) is retained as the default/fallback — resolution order is per-form → global default → the site's
webmaster_email.- The recipient is encrypted server-side at render (
ee('Encrypt'), injected as a hidden_pc_to_encfield byThemeAssets::rewriteFormActions()), so it never appears in page source and cannot be forged — a crafted direct POST can't redirect a site's form mail to an arbitrary address. A plaintext value is never trusted. No database migration is required; the recipient travels with the form markup.
- The recipient is encrypted server-side at render (
[1.1.7] — 2026-07-05
Fixed
- Full pages no longer fail to save with "Data too long for column". PageCraft's field stored into a
TEXTcolumn (64KB max) — itsinstall()declaredmediumtext, but that key only sets a fieldtype default and is never applied to the per-field data column, so EE kept building/reverting it toTEXT. A page with many (or large) sections overflowed it on save. The fieldtype now implementssettings_modify_column()to pin the storage column toMEDIUMTEXT(16MB), and the updater widens existing PageCraft field columns on upgrade. - Import Pack (.zip) no longer fails with "Invalid server response" (403). The Import-Pack modal read its CSRF token from a global (
EE_CSRF_TOKEN) that isn't defined on the Sections page, so it POSTed an empty token and EE'sStrict_XIDrejected the request with a 403 (HTML, not JSON). The token is now embedded server-side viaCSRF_TOKEN, matching the Ingest Template modal.
Added
- Placed sections are identifiable in the markup. Each section's HTML now begins with an
<!-- PageCraft Section: {name} -->comment (injected as the root's first child), so a section can be recognized in the page/canvas source.
[1.1.6] — 2026-06-30
Fixed
- Imported packs' lazy-loaded images now render in the editor canvas. Packs that lazy-load images (vanilla-LazyLoad, Arts/Kinsey, etc.) keep the real URL in a
data-*attribute and rely on a front-end script to swap it intosrc/backgroundon scroll. That script never runs inside the ContentBox iframe, so images stayed on their#/empty placeholder and rendered blank while editing. The canvas now force-loads them on load (and via aMutationObserver, so sections inserted while editing also resolve), coveringdata-src/data-srcset/data-original/data-lazy(imgs) anddata-bg/data-background[-image](CSS backgrounds). Canvas-only — the front end is untouched. - JS-driven masonry grids no longer collapse to a stacked column in the canvas. Grids laid out by a front-end library (Isotope/Masonry, the Arts framework's
.grid.js-grid) absolutely-position their items via JS that doesn't run in the canvas, so the items — which carry only flex-basis/max-width in a non-flex container — stacked. The canvas now applies a flex-wrap fallback to.grid.js-grid/.isotope/.masonry/[data-masonry]so items flow by their column widths into a faithful, editable grid (rows align to the tallest item; not true masonry). Canvas-only; the front end's real layout JS is unaffected.
Both fixes live in Actions/EditorFrame.php (the canvas=1 branch), alongside the existing anime.js and Bootstrap grid-compat canvas shims.
[1.1.5] — 2026-06-22
Fixed
- No more full-height empty band before the footer on pages with imported sections. ContentBox gives every
.is-sectionmin-height:100vhand only resets it for auto-height sections via a DIV-scoped rule (.is-wrapper div.is-section-auto{min-height:unset}). Sections authored or imported as the semantic<section>tag (ContentBox marks themdata-new="true") never matched that reset, so a short<section class="is-section is-section-auto">was stretched to a full viewport height — producing a tall blank gap before the next block or the footer (seen across the location pages). PageCraft now emits a front-end compatibility rule (ThemeAssets::sectionAutoHeightCss()) that broadens the reset to any element carryingis-section-auto, regardless of tag. It only generalises ContentBox's own intent ("auto" = auto height), so<div>sections andis-section-100(which should stay 100vh) are unaffected. Emitted on the published render paths; the editor canvas keeps ContentBox's native behaviour.
[1.1.4] — 2026-06-20
Fixed
- FormBuilder forms now submit to PageCraft automatically — no endpoint to paste. A saved form stores a literal
action="…"from its "Form Action" setting, whose InnovaStudio default is the placeholder/formsubmission— not a real URL. Left on the default (or pointed at anACT=id from another environment), the form POSTed to a 404 whose HTML body maderesponse.json()throwUnexpected token '<': no storage, no email. This was the real cause behind the 1.1.1–1.1.3 saga; those releases fixed adjacent issues but the form was never reaching theform_submitendpoint. PageCraft now rewrites a FormBuilder form'sactionto this install's ownform_submitACT URL at render time (all front-end paths: field tag,{exp:page_craft:render}, and global header/footer). Editors can leave "Form Action" on the default and it Just Works on every environment.- Scope is tight: only
<form id="form_…" method="POST">tags on a page that contains a FormViewer form are touched; search/comment forms are left alone. A form whose action points at an absolute off-site URL is also preserved, so posting to a third-party service on purpose still works.
- Scope is tight: only
form_submitno longer 500s on its own logging.ee()->loggeris auto-loaded in the Control Panel but not in a bare public front-end ACT request, whereee()->logger->developer()throws "No such property: 'logger'" on the Legacy Facade. Every diagnostic log call in the endpoint (missing table, no recipient, send failed, and the top-levelcatchitself) therefore turned into an HTML 500 — which made the form'sresponse.json()choke onUnexpected token '<'. Logging now goes through a best-effortlogDev()helper that loads theloggerlibrary first and swallows any failure, so a log write can never error the visitor's form. (This is what surfaced once 1.1.4's rewrite finally routed submissions to the endpoint.)
[1.1.3] — 2026-06-18
Fixed
- Form submissions no longer 500 when the submissions table is missing. If the
pagecraft_form_submissionstable doesn't exist on an environment (e.g. the add-on update registered theform_submitaction but hasn't created the table yet), EE's database layer callsshow_error()and returns an HTML 500 before the endpoint's try/catch can produce JSON — which makes the form'sresponse.json()throwUnexpected token '<'. The endpoint now checkstable_exists()first: when the table is missing it still emails the submission and returns a clean JSON success, and logs that the update needs to be re-run, instead of crashing the visitor's form.
[1.1.2] — 2026-06-18
Fixed
- FormBuilder forms now actually render — load the viewer build, not the builder. 1.1.1 loaded
formbuilderai.min.json the front end, but that bundle definesFormBuilderAI(the editor) and contains noFormViewer— so the published form'snew FormViewer(...)still threwFormViewer is not defined. The globalFormVieweris defined by the separate viewer build (assets/scripts/formviewer/formviewer.min.js). The front-end loader now emitsformviewer.min.js+formviewer.cssinstead. (Both builds ship in the theme; only the viewer is needed on published pages.)
[1.1.1] — 2026-06-18
Fixed
- FormBuilder forms now render on the front end. A saved form's inline script calls
new FormViewer(...)to build its fields, butFormViewerlives informbuilderai.min.js— an editor asset that was never loaded on the published page, so forms threwFormViewer is not definedand showed nothing. The front-end runtime now loadsformbuilderai.min.js+.csswhenever the rendered content contains a FormBuilder module (both the field-tag and module render paths, via a sharedThemeAssets::formBuilderAssetTags(), loaded once per request). - The endpoint URL in Forms settings no longer shows
ACT=0before the action is registered. Whenform_submitisn't registered yet (e.g., the add-on update hasn't run on a given environment), the settings page now shows a "re-run the update" notice instead of a broken…ACT=0URL that would silently fail when pasted into a form.
[1.1.0] — 2026-06-18
Added
- Native form submissions for the FormBuilder. PageCraft's bundled FormBuilder (InnovaStudio FormBuilder AI) could already build forms in the editor, but had nowhere to submit to on a live site. A new public endpoint (
form_submitACT, registered csrf-exempt) now receives submissions, honoring FormBuilder's JSON contract (POSTFormData→ JSON, success = noerrorkey). Each submission is:- Stored in a new
pagecraft_form_submissionstable (fields as JSON + source URL, IP, user-agent, timestamp). - Emailed to a configurable recipient via ExpressionEngine's native Email library — so it uses the site's own Outgoing Email settings (PHP mail / Sendmail / SMTP). From is the site address, Reply-To is the submitter's email when present.
- Spam-guarded with a same-origin check, per-IP rate limit (10/min), optional reCAPTCHA v2 server-side verification, and a honeypot hook.
- Stored in a new
- Forms settings (Add-Ons → PageCraft → Global Settings): notification recipient email, reCAPTCHA v2 secret key (stored encrypted), and a copy-ready display of the endpoint URL to paste into each form's Form Action (Form Builder → Settings tab).
Notes
- v1 covers text fields; file-upload fields and an in-CP submissions viewer (the table already stores everything) are planned follow-ups. FormBuilder AI is a commercial InnovaStudio library — a developer license is required.
[1.0.0] — 2026-06-12
First stable release. Consolidates a round of security hardening, correctness fixes, and editor-UX work (versions 0.9.61–0.9.66 plus the additions below). Known limitation: the element-delete fix (0.9.66) is a runtime guard around a ContentBox behavior, not a change to how editable text is marked up.
Added
- Grid Editor (row & column editor) is now exposed in the canvas. ContentBox ships ContentBuilder's row-level Grid Editor — Insert/Delete Column, Columns per Line, Wrap/Reverse Columns, Row/Column IDs, Hide on Mobile — but hides its row-toolbar button by default (
.is-tool.is-row-tool .row-grideditor { display:none }; only itsminimal/cleanmodes reveal it). PageCraft now un-hides just that one button (in both the editor chrome and the canvas iframe), so selecting a row surfaces a grid icon that opens the full Grid Editor panel — without switching the whole editor into minimal mode. Cleanest on native.row > .columnblocks; works on template-ingested Bootstrap rows but interacts with the grid-framework conversion. - Toolbar Style setting (Colored / Monochrome). A new global setting (Add-Ons → PageCraft → Global Settings) renders the in-editor section/column/element toolbars in neutral gray instead of ContentBox's multi-color set, for a calmer canvas. Rather than ContentBox's native gray mode (which banded the tools, left icons white, and never reached the section-level tool), PageCraft drives it from a
pc-mono-toolsbody class + its own CSS across the canvas and editor chrome: neutral pills, dark icons, no background band, with the "Save as Section" button kept a distinct mid-gray. Default is Colored, so existing installs are unchanged.
[0.9.66] — 2026-06-12
Fixed
- Deleting an element no longer wipes text across the canvas. ContentBox's element-delete runs a sweep that walks every
.is-subblockand, for any whoseelementChildren()is empty (it counts element children only — text nodes don't qualify), replaces itsinnerHTMLwith aspacer height-40placeholder. PageCraft marks leaf text elements (h2/span/p) asis-subblock edit, so they hold a text node but no element child — ContentBox judged them "empty" and erased their text on any delete, canvas-wide (onlyis-subblockelements were affected; nav/hero/plain sections were untouched). A new subblock-content guard in the editor canvas (Actions/EditorFrame.php, behindwindow.pcSubblockGuardActive) remembers each text subblock's last non-empty content and restores it the instant ContentBox wipes it — before the debounced save fires, so real content is what persists. No vendor-code changes. Note: this prevents future wipes; content already saved with spacer placeholders must be re-entered or restored from a backup.
[0.9.65] — 2026-06-12
Added
- Editor Permissions are now editable (super-admin only). The Add-Ons → PageCraft → Permissions page was display-only — it showed each role's editing level but nothing could ever write the
editor_permissionssetting, so every role defaulted to Full with no way to change it (the limited "Content" level was effectively unreachable). The page now renders a Full/Content selector per role and saves via a newsave_permissionshandler. Setting a role to Content gives that role the limited editor (text editing, file uploads, adding blocks; per-element settings panels hidden). Super Admin (role 1) is always Full and the Banned/Guests/Pending roles are never shown. Non-super-admins see the read-only badges. Only the non-defaultcontentlevel is persisted, so unset roles continue to default to Full.
[0.9.64] — 2026-06-12
Security
- Template Ingest is now super-admin only. It extracts
js/css/svgassets and registers<script>/<link>tags into the editor canvas that load for all users — executable content that can't be meaningfully sanitized — so it's restricted to fully-trusted admins (defense-in-depth above the CP-access gate the other actions use). The "Ingest Template (.zip)" button is hidden for non-super-admins. Pack Import is unchanged (CP-access): it serves CSS only, never JS, and doesn't register site-wide canvas assets. - Uploaded/extracted SVGs are screened for active content. A new shared
Traits/SvgSafety::isSafeSvg()rejects SVGs containing<script>,<foreignObject>, DOCTYPE/ENTITY declarations, inline event handlers (onload=…),javascript:URLs, or external<use>/<image>references. Applied to the Template Ingest preview image (replacing the old bare<svgsubstring check that read only the first 1 KB) and to SVG assets extracted from both Template Ingest and Pack Import zips.
Fixed
- Plugin assets no longer cache-bust on every request. The front-end runtime appended
?v=<timestamp>to every ContentBox plugin JS/CSS URL, defeating browser/CDN caching on each page load. It now uses the add-on version (?v=0.9.64), so assets cache between releases and refetch after an update. The field-tag render path (ft.page_craft.php), which previously had no cache-buster at all, now uses the same version stamp.
Changed
- The bundled-plugin list is now a single source of truth.
ft.page_craft.phpandmod.page_craft.phpeach carried their own copy of the ContentBox plugin list and had already drifted (the field-tag copy was missingtemplate-embed). Both now readThemeAssets::contentBoxPlugins(), so the registerable-plugin set can't diverge between the two render paths.
[0.9.63] — 2026-06-11
Changed
- Section thumbnails now self-heal at render time; the manual "Fix Missing Thumbnails" button is gone. Previously a missing/cross-install thumbnail showed a broken image (or a
—) until you clicked Fix Missing Thumbnails, which wrote SVG files to disk and rewrote DB rows — and it silently skipped sections with an empty thumbnail and could clobber a valid{file:…}reference that was momentarily unresolvable. NowServices/ThumbnailPlaceholder::src()resolves each thumbnail when it renders: it returns the real image URL when the file exists on this install, otherwise an inlinedata:image/svg+xmlplaceholder labeled with the section name + category. This is applied in the canvas picker JS (SectionFileWriter) and both CP section lists (mcp.page_craft.php), so placeholders appear automatically — no button, no disk writes, no DB mutation, and the empty-thumbnail case is covered too. - Removed the
reconcile_thumbnailsACT endpoint and itsActions/ReconcileThumbnails.phphandler.update()deletes the retired action row fromexp_actionson existing installs. Section import no longer generates on-disk SVG placeholders (the renderer handles it); export still bundles real preview images.
Security
- Folded the earlier thumbnail path-traversal guard into a single
themeRel()helper shared byresolveDiskPath()(export) and the new URL resolver, so the..-rejection is enforced in one place.
[0.9.62] — 2026-06-11
Security
- AI proxy cost/abuse guardrails. Both AI endpoints (
ai_proxy,ai_proxy_stream) forward to OpenRouter on the server's shared API key; they now bound what a single CP user can spend. A new sharedTraits/AiProxyGuardadds: a model allowlist (clamped to the models the editor's picker offers — anything else falls back togoogle/gemini-2.5-flash, so a tampered client can't bill an arbitrary/expensive model; extend per-site via$config['pagecraft_ai_allowed_models']), an input cap (max 80 messages and 256 KB of combined content per request → HTTP 413), and a per-member rate limit (40 requests / 60 s, fixed-window via EE cache → HTTP 429). The streaming endpoint no longer echoes the raw cURL error string to the client (logged server-side instead).
[0.9.61] — 2026-06-11
Security
- Control-panel access is now required for every editor, upload, and import action. All state-changing/editor ACT endpoints (
upload,filepicker_bridge,ai_proxy,ai_proxy_stream,editor_frame,template_ingest,pack_import,sections_import,sections_export,reconcile_thumbnails,save_section_from_editor,template_render_preview,structure_nav_preview,template_list) now requirecan_access_cp, not merely a logged-in member. Previously a front-end-only registered member could reach them — most importantly Template Ingest, which writes JS/CSS/SVG assets that are later served on every page. CP editors are unaffected (they always have CP access). The public asset endpoints (custom_css/custom_js/blocks_js) remain intentionally open, and the global-component actions remain super-admin only. - Path-traversal hardening in section-thumbnail resolution.
ThumbnailPlaceholder::resolveDiskPath()now rejects..segments and stays confined to the theme directory. A crafted stored thumbnail URL (e.g.…/themes/user/pagecraft/../../../../etc/passwd) could otherwise be resolved to a file outside the theme root and bundled into the sections export.zip.
Fixed
- "Save as Section" no longer fails on installs that haven't opened the CP Sections page. The
pagecraft_sections.enabledcolumn is now declared in the install schema and backfilled by an idempotentensureSectionEnabledColumn()step inupdate(). It was previously created lazily only when the CP Sections page was first opened, so saving a section straight from the editor (save_section_from_editor) on a fresh install threw "Unknown column 'enabled'". - Canvas-asset upgrade no longer drops a legacy editor stylesheet. The 1.4.0
canvas_assetscreation step now runs before the 1.5.0 split intocanvas_css_assets/canvas_js_assets. On an upgrade that crossed both versions in one pass, the split readcanvas_assetsbefore the legacyeditor_stylesheet_urlwas migrated into it, silently losing the stylesheet.
[0.9.60] — 2026-06-10
Added
- Template Ingest pairs preview images with zips. When ingesting raw-HTML template
.zips (Add-Ons → PageCraft → Sections → Ingest Template), every section previously got an auto-generated SVG placeholder thumbnail. Now you can include a preview image named the same as a zip in the same drop/selection (e.g.hero.zip+hero.png) and PageCraft uses it as that section's thumbnail. Same modal, same flow — just add the images.- Client (
mcp.page_craft.php): the ingest file input accepts images too; dropped images are held in a base-name map and paired to like-named zips. Each zip's upload carries its matched image aspreview_file. The queue shows a "✓ preview" badge on zips that have a match. Images with no matching zip are ignored. - Server (
Actions/TemplateIngest.php::savePreviewImage()): validates the optionalpreview_file(uploaded, image extension, ≤ 5 MB, real-image content sniff including an<svg>check), saves it into the per-slugimported/{slug}/directory, and uses it as the primary (first) section's thumbnail — additional sections from a multi-HTML zip keep the generated SVG. Stored as an absolute pack URL (survives Regenerate File, mirroring Pack Import). Any validation failure silently falls back to the SVG placeholder — a bad preview never blocks the ingest. Preflight is unaffected (the preview is only sent on the real ingest).
- Client (
[0.9.59] — 2026-06-08
Fixed
- Tailwind grid sections now render in the canvas and on the front end. With Grid Framework set to Tailwind, ContentBox emits Tailwind grid classes (
md:w-*/12,flex, …), but nothing loaded a Tailwind stylesheet — the editor canvas loaded only the site's own (Bootstrap/Crafto) CSS, so the Tailwind classes had nothing to style them and grids collapsed. The addon already ships a complete Tailwind build (themes/user/pagecraft/assets/frameworks/tailwindcss/styles.css, with every grid utility CB generates) — it was simply never loaded. Now:- Canvas (
Actions/EditorFrame.php): newframeworkGridCss()/resolveFramework()inject the Tailwind build into the editor<head>(loaded last so its utilities win) when the resolved framework — per-field override falling back to global — istailwind. - Front end (
mod.page_craft.php::enqueueRuntime()): the Tailwind build is added topagecraft_required_csswhen the global Grid Framework istailwind. - The bundled build defines no
.row/.column/.container, so it's purely additive — no collision with ContentBox-native or Bootstrap grids. Bootstrap needs no equivalent (the site's own Bootstrap CSS is already a canvas asset / loaded by the wrapper). - Known scope: the front-end load reads the global framework setting; per-field Tailwind on the front end would need additional entry/field resolution. The full ~260 KB build ships on every Tailwind front-end page (a purged subset is a possible later optimization).
- Canvas (
[0.9.58] — 2026-06-05
Added
- Grid Framework setting (global + per-field). A new setting tells ContentBox which CSS-framework grid vocabulary to drive in the editor canvas: Native (ContentBox's own
.columngrid, the default), Bootstrap (col-md-*), or Tailwind (md:w-*/12). When set, CB operates select/move/resize natively on the framework's own column classes, so imported templates built in that framework get real column tooling instead of a class-name collision. Global default with a per-field override (reuses the existingfield ?: globalfallback pattern). Defaults to Native, so existing installs are unchanged. Wired inmcp.page_craft.php(global),ft.page_craft.php(per-field), andActions/EditorFrame.php(canvas init). - Grid-conversion repair pass (
pcFixGridMath). ContentBox's framework conversion measures each column's width and rounds to the nearest grid unit, which can over-assign on auto-fill (equal, no explicit width) columns — e.g. four flex columns each becomingcol-md-4(16/12) and overflowing the row. A canvas post-process detects rows whose columns' widths sum past 100% and rewrites them to the framework's auto-equal class (colfor Bootstrap,md:flex-1for Tailwind), which never overflows regardless of count. Legitimate grids (sums ≤ 100%, including Tailwind'sw-full md:w-N/12mobile+desktop pairs) are left untouched. Runs on canvas start and before each save.
Documentation
- New "Grid Framework" guide (
docs/07-grid-framework.md, registered in the in-CP docs index). Explains the three options, what "driving the grid" means, and the important caveats: the framework is canvas-wide (not per-section), native sections get converted (lossily for non-12-column layouts), avoid mixing native + framework sections on one page, and the Tailwind purge gotcha. Cross-referenced from "Importing Custom Templates" since that's where a framework user lands after an import.
Tooling
build-release.sh— produces a clean, shippable package: exports the working tree (tracked + new files, honouring.gitignore), forces thepage_craft/addon folder name wrapped inPageCraft-<version>/, strips dev-only files (** contentbox_files **,.git,PAGECRAFT_STATE.md,.claude, OS cruft), and resets the section library to seeded defaults so a developer's test sections/categories/thumbnails never ship. Outputsdist/PageCraft-<version>.zip.dist/is gitignored.
Note
- The framework conversion is inherently lossy for layouts not authored in the target framework's grid; the repair pass is a safety net, not a perfect translator. The intended long-term model is per-framework block libraries (blocks authored natively in each supported framework) with the conversion repair as fallback — see project notes.
[0.9.57] — 2026-06-04
Fixed
- Imported Bootstrap/Crafto grids no longer collapse on the front end or canvas. ContentBox's runtime CSS claims the
.rowclass and, via higher-specificity rules (.is-container .row > *{flex-shrink:initial},.is-container .row{flex-wrap:initial},.row{gap:2rem;margin:0 -1rem}), overrode the theme's Bootstrap grid — collapsingcol-*cells, jammingrow-cols-*cards into a single nowrap row, and applying wrong gutters.ThemeAssets::gridCompatCss()now restores Bootstrap's intendedflex-wrap:wrap/flex-shrink:0/ gutter behaviour, scoped via:has()to rows that actually contain Bootstrap columns (col,col-*, or arow-cols*row), so ContentBox-native.row > .columnlayouts are untouched. - Grid-compat scoping no longer clobbers native ContentBox sections. The column detection matched real Bootstrap tokens via anchored attribute selectors (
[class^="col-"],[class*=" col-"],[class="col"], etc.) instead of a substring[class*="col-"], which wrongly matched theflex-colutility that stock CB columns carry (column flex flex-col …) and broke out-of-the-box layouts.
Changed
- PageCraft field columns auto-upgrade to MEDIUMTEXT. The fieldtype declares
mediumtextininstall(), but EE only applies that at field-creation time — fields created earlier kept a 64KBTEXTcolumn and threw "Data too long for column" (SQLSTATE 22001) when saving a large page. The updater (upd.page_craft.php::ensureFieldColumnsAreMediumtext()) now detects anypage_craftfield whose data column is stillTEXTandALTERs it toMEDIUMTEXT. Idempotent; handles EE 7 per-field tables and the legacy shared table. Mirrors the existingensureAllActionsRegistered()self-healing pattern.
Internal
- Groundwork for adopting imported Bootstrap
col-*cells into ContentBox's column tooling (selection/settings via.column+data-protected) is present inTemplateIngestbehind a disabled$adoptBootstrapColsflag, parked until the grid-layout work above is proven stable.
[0.9.56] — 2026-06-03
Fixed
- Grid-compat CSS now ships on the
{exp:page_craft:render}module render path. The Bootstrap.row/.columncollision fix (ThemeAssets::gridCompatCss(), added in 0.9.54) was emitted by the canvas (EditorFrame.php) and the field tag (ft.page_craft.php), but not by the module tag inmod.page_craft.php— so pages rendered with{exp:page_craft:render …}got ContentBox's.row{flex-wrap:initial}+.row>*{flex-shrink:initial}with no counter, crushing imported Bootstrap columns (col-lg-6, etc.) into a single nowrap row with one-or-two-words-per-line text on the front end while the canvas looked correct.enqueueRuntime()now injectsgridCompatCss()once on first runtime enqueue — the same first-run gate that loads the collidingcontentbox-runtime.css— so the counter-CSS always ships when the runtime does, and never bloats pages that don't load it. Fixesrender(),global_header(), andglobal_footer()in one place. Requiresruntime="yes"on the render tag (the default).
Added
- Self-healing section thumbnails. New
Services/ThumbnailPlaceholdercentralises the labeled-SVG placeholder generator (extracted from the Template Ingest flow) plus host-agnostic broken-thumbnail detection: a thumbnail is "broken" when the file it points to is missing on this install, whether stored as a bare filename or an absolute URL baked to another install's domain (matched on the/themes/user/pagecraft/path marker, not the host).reconcile_thumbnailsaction + "Fix Missing Thumbnails" button (CP → PageCraft → Sections). Scans every section, regenerates a placeholder only for the broken ones, updates the rows, and resyncspagecraft-sections.js. Idempotent and install-agnostic — run it wherever the broken tiles are.- Section import self-heals.
SectionsImportnow accepts a.zip(manifest + bundledpreview/files) or legacy raw JSON, copies bundled previews into place, and auto-generates a placeholder for any section whose image is still missing — so an import never leaves broken tiles. Reportsplaceholders_createdin the result. - Section export bundles images.
SectionsExportnow produces a self-contained.zip(manifest.json + realpreview/files) so thumbnails survive the round-trip; falls back to plain JSON whenZipArchiveis unavailable.
Documentation
- Recommended EE session settings.
docs/00-installation.mdnow explains the "This form has expired" error editors can hit when the publish form sits open during a long canvas edit, and recommends EE's Session type → "Cookies and session ID" (and, only if needed, loosening "Require IP for posting"). The addon does not change these settings itself — they're documented as the site owner's call.
Changed
- Section-import form reports inline instead of dumping JSON. The import
<form>previously did a native POST and left the browser on the raw JSON action response. It now submits via XHR and shows "N sections imported, N categories created, N placeholder thumbnails generated" inline, then reloads — matching the.zipPack Import UX. The file input accepts.zipand.json. - Documentation: template examples + render tag reference. Added
docs/14-template-examples.md(minimal → URL-routed → mixed → full-site → multi-field templates) and documented the previously-undocumented{exp:page_craft:render}tag indocs/13-template-tags-reference.md, including the diagnostic-comment table and the.is-wrapper/wrapper="yes"requirement. Both registered in the in-CP docs index. CP doc code blocks now wrap and grow to content height instead of clipping to one horizontal-scrolling line.
[0.9.55] — 2026-05-31
Fixed
- Multi-column Bootstrap rows now wrap instead of overflowing. 0.9.54's grid-compat fix stopped the column crush but exposed a second collision:
assets/minimalist-blocks/content.csssets.row{flex-wrap:initial}(= nowrap), so a row of fourcol-md-6form fields laid out in one horizontal strip and overflowed the canvas rather than forming a 2×2 grid.ThemeAssets::gridCompatCss()now also forcesflex-wrap:wrapon rows that contain Bootstrap columns, restoring the intended multi-row wrapping. Still scoped via:has()to rows withcol/col-*children, so ContentBox-native.row > .columnlayouts are untouched.
[0.9.54] — 2026-05-31
Fixed
- Imported Bootstrap columns no longer collapse in the canvas or front-end. The real cause of the "one character per line" column crush (not the
.columninjection removed in 0.9.53) is a class-name collision: ContentBox's runtime CSS claims the.row/.columnnames that Bootstrap themes also use, and its.row>*{flex-shrink:initial}overrides Bootstrap's deliberate.row>*{flex-shrink:0}. Next to a fixed-width sibling (e.g. the green-energy 418×550 image, or the contact-form field grid) the text columns shrank toward zero; CB's added.row{gap:2rem}also pushed columns past 100% so they wrapped. A newThemeAssets::gridCompatCss()emits a small compatibility stylesheet —flex-shrink:0andgap:0for rows that actually contain Bootstrap columns (.row > [class*="col-"]/[class~="col"], via:has()), leaving ContentBox-native.row > .columnlayouts untouched. It's injected into the editor canvas (Actions/EditorFrame.php) and the front-end runtime (ft.page_craft.php). Because this is pure CSS keyed on the existing markup, sections ingested earlier are fixed in place — no re-ingest required for the layout (the 0.9.53 re-ingest note applies only to stripping the stale.columnclass).
[0.9.53] — 2026-05-30
Fixed
- Ingest no longer butchers Bootstrap grid layouts. v0.9.51's column recognition added ContentBox's
.columnclass onto Bootstrapcol-*elements, but CB's runtime CSS gives.columnwidth:100%+ horizontal padding while.row{display:flex}drops Bootstrap'sflex-wrap. That overrode the theme'sflex: 0 0 N%and collapsed multi-column sub-grids to content width — contact-form fields and stat columns rendered as one-character-per-line vertical strips. The column-injection step is removed entirely: imported Bootstrap grids are left exactly as the theme authored them (they lay out correctly from the theme CSS registered as a canvas asset, and their content stays editable via theis-subblock editmarkers). The trade-off is that ContentBox's native column-drag handles don't appear on imported grids — correct rendering is the priority. Section,w-100, container, loose-text, and button injection are unchanged. Note: sections ingested under v0.9.51–0.9.52 already have the bad.columnbaked into their stored HTML (and into any page where they were placed); re-ingest them, or run a cleanup, to recover the layout.
[0.9.52] — 2026-05-30
Added
- Bulk actions on the Sections list (CP → PageCraft → Sections). Each row now has a checkbox, with a "select all" checkbox in the table header (including an indeterminate state for partial selections). A toolbar above the table shows the live selected count and offers two group actions: Delete Selected (with a confirmation naming the count) and Assign Category — a "Move to category…" dropdown of existing categories that re-files every selected section in one shot. Both submit to a new
bulk_sections()settings controller that constrains operations to the current site's sections, regeneratespagecraft-sections.jsviaSectionFileWriteronce per batch, and shows a result banner. The bulk Delete Selected button reuses the existing red.pc-delete-btnstyling; the per-row delete handler was scoped to.pc-delete-btn[data-url]so it no longer binds the bulk button. Assign is disabled until both a category is chosen and at least one row is selected; delete is disabled until at least one row is selected.
[0.9.51] — 2026-05-30
Changed
- Template ingest now injects ContentBox classes with a DOM tree pass instead of single-shot regexes.
Actions/TemplateIngest.php::prepareSection()was a chain of regexes (injectSectionClasses,insertOverlay,injectContainerClasses,addEditableMarkers) that each only touched the first matching tag — so real ThemeForest/Crafto markup came through half-wired. It now parses each section fragment into aDOMDocument(loaded under a singledata-pc-rootwrapper withLIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTDand a UTF-8 hint) and injects by traversal. The original regex pipeline is preserved verbatim asprepareSectionRegex()and runs automatically as a fallback whenever a fragment can't be parsed or the DOM pass yields nothing, so hard-to-parse files are never worse off than before. Inline<script>/<style>bodies and complex attributes (e.g.data-anime='{…}') survive the round-trip intact.
Added
- Grouped sections. A file containing multiple top-level
<section>elements now gets every section wired up — each receivesis-section is-box is-section-auto w-100and its own<div class="is-overlay">first child — not just the first. Files with no<section>tags are treated as one section per top-level block element (a single wrapping<div>, or sibling block divs); flat snippets (loose<h2>/<p>/inline content) defer to the regex fallback rather than being wrapped in bogus sections. w-100on every section alongside the existingis-section is-box is-section-auto.- Bootstrap container recognition. Elements classed
container,container-fluid, orcontainer-{sm,md,lg,xl,xxl}(and the legacypc-containermarker) getis-container v2 is-content-1200 is-builder+data-sort="true"appended, keeping their originalcontainer*classes. A section with no recognised container still falls back to promoting its first non-overlay child, as before. - Column recognition. Bootstrap column classes (
col,col-6,col-md-4,col-lg-12,col-auto, responsive barecol-md, …) get ContentBox'scolumnclass appended (originals kept), and their parent gainsrowif missing — so multi-column layouts are sortable/editable as CB columns. - Loose-text editability. Visible text living outside
<p>/<h1>–<h6>is now made editable:<ul>/<ol>containing text become a single editable region (the whole list, not per-<li>), and text-holdingdiv/span/li/figcaption/blockquote/dd/dt/td/th/labelelements getis-subblock edit. A nesting guard prevents marking any element already inside an editable region; structural nodes (is-section/is-container/row/column/is-overlay) are never marked. - Button recognition.
<a>/<button>elements with button-ish classes (btn,button,*-btn,btn-*) or an existingrole="button"getrole="button"set (ContentBox's content-button form), so the button tool wires up on the canvas. Theme classes andhrefare left intact; plain text links are not touched.
[0.9.50] — 2026-05-30
Added
- Target category is now chosen at ingest time. The Ingest Templates modal (CP → PageCraft → Sections → Ingest Template) now has a required Target category dropdown listing existing categories. The Ingest button stays disabled until a category is selected, and every section from every ZIP in the batch is filed under that one category. This replaces the previous behaviour where
Actions/TemplateIngest.phpsilently derived a category from each ZIP's folder structure / filename and auto-created categories on the fly — which scattered an imported theme across a dozen machine-named categories. If no categories exist yet, the modal shows an inline notice linking to the categories page instead of an empty dropdown, since ingest now requires picking an existing one.
Changed
- Ingest is non-destructive except by name collision, and warns first. Existing sections are left untouched unless an incoming section has the same name within the chosen category, in which case the existing row is overwritten (HTML + thumbnail) rather than duplicated. Before any write, clicking Ingest runs a preflight pass — each ZIP is parsed server-side (
mode=preflight, no disk or DB writes) to compute the section names it would produce and which collide with the target category. If any collide, a single consolidated confirmation lists every section that will be overwritten (with its source file) and the user can cancel the whole batch, leaving everything unchanged. On confirm, the real ingest runs withoverwrite=1and upserts by(category_id, name). Server contract: withoutoverwrite=1, a colliding section is skipped (reported inerrors) rather than overwritten, so direct API callers don't clobber data without opting in. Response JSON gainsoverwritten,skipped, andcategory;categories_createdis removed (no categories are created during ingest anymore).
[0.9.49] — 2026-05-30
Added
- Multi-file template ingest. The Ingest Templates modal (CP → PageCraft → Sections → Ingest Template) now accepts multiple
.zipfiles in a single drop or file-pick. Each ZIP is queued, processed sequentially as its own pack (one request per file), and reports per-row success/error inline. Sequential rather than parallel becauseSectionFileWriter::write()rewritespagecraft-sections.jsafter every ingest — concurrent writes would race on the same file and onsort_orderallocation inexp_pagecraft_sections. Failures are isolated per row; a batch with mixed outcomes leaves the modal open so editors can review what failed before navigating away (all-success keeps the existing auto-redirect). Files can be removed from the queue before submit; duplicate adds (same name + size) are de-duped automatically. Non-.zipfiles dropped into the zone are silently ignored with a one-line notice. Server-sideActions/TemplateIngest.phpis unchanged — it still expects onetemplate_fileper request, which is exactly what each row sends.
Fixed
- Editor frame no longer crashes when a
template_packssetting slug points to a missing on-disk pack. Previously, the file-not-found branch inActions/EditorFrame.php(added so a missing pack wouldn't cascade-break the templates panel) calledee()->logger->developer()without first loading theloggerlibrary —__get('logger')then threwInvalidArgumentExceptionand the whole editor frame failed to render. The library is now loaded immediately before the call, and the entry is flagged "always log" so it appears in Tools → Logs → Developer Log regardless of debug level. Exposed by deleting the bundledcrafto-corporate,crafto-elements,crafto-premiumtemplate-pack directories without first un-checking them in the Template Packs settings.
[0.9.48] — 2026-05-30
Added
- Typography panel toggle. New General-settings switch (
Enable Typography Panel, default on) that hides ContentBox.js's sidebar Typography panel and its toolbar button when disabled. The Typography panel is section-scoped by design — editors picking different presets per section is a common source of inconsistent typography across blocks. When the toggle is off, the existingCustom CSSsetting is the intended driver (loaded into the canvas via?ACT=custom_cssand into the front-end via the runtime enqueue /{pagecraft_css}placeholder), giving sites a single source of truth for fonts, sizes, and headings. ContentBox does not expose a clean disable API for the panel, so the implementation injects adisplay: none !importantrule for#divSidebarTypographyand[data-command="typography"]into the outer editor frame's<style>block. Existing installs pick up the default on upgrade via an idempotent migration inupd.page_craft.php; this change does not affect the canvas iframe, the rendered front-end output, or any other setting.
[0.9.47] — 2026-05-20
Added
- Parent-entry context tokens for Dynamic Content embeds. Embedded EE templates can now reference the PageCraft entry being rendered via
{pagecraft_entry_id}and{pagecraft_url_title}tokens. Use them in place ofdynamic="yes"(which doesn't resolve reliably inside a fragment parse — symptom:{exp:channel:entries dynamic="yes"}returning all entries instead of the current one). Example:
Tokens for unset keys substitute to empty string, so a literal{exp:channel:entries channel="locations" entry_id="{pagecraft_entry_id}"} ... {/exp:channel:entries}entry_id=""is harmless. Wired through both render paths:ft.page_craft.php::replace_tag()(the in-channel-loop case) andmod.page_craft.php::resolveTemplateEmbeds()(the{exp:page_craft:render}standalone case). Implemented asTemplatePreview::substituteContext()— a static helper both paths share so they can't drift.
[0.9.46] — 2026-05-17
Added
- Dropdown "Distance from Nav" control. New field in the Nav Items modal's DROPDOWN tab, sets the gap between the nav and the submenu when a parent menu item is hovered/focused. Drives
--nav-dd-mtconsumed by.submenu { margin-top: var(--nav-dd-mt, 0.5rem) }. Range 0–5 (same scale as the other margin controls), stored asdata-nav-dd-mton the plugin element.
Changed
- Color swatch + override-checkbox order swapped. v0.9.45 had
[checkbox][swatch]which made the empty checkbox the most prominent element and the swatch easy to miss (especially when the value was white-on-white). Now[swatch][checkbox]— swatch is the primary visual + click target, checkbox is the secondary override toggle on the right. Border bumped from#ccc→#999so the swatch is always findable even on white values.
[0.9.45] — 2026-05-17
Fixed
- Section Background Color now actually paints the nav bar. Root cause exposed by the v0.9.44 diagnostic: stale
data-cb-bg-color="rgba(255, 255, 255, .95)"attributes left over from v0.9.39-and-earlier entries were winning over the section bg via thelegacy || sectionBgpriority. The user could see the section bg detection working perfectly in the console (tracking fromrgb(174, 96, 96)torgb(149, 93, 93)as the picker dragged) but the nav stayed translucent-white because legacy always won. Fix: removed the legacy priority entirely (the nav-specific bg picker is gone from the UI as of v0.9.40, so there's no longer a reason to honour the old attribute) and stripdata-cb-bg-colorfrom the element on first mount under v0.9.45+ so the stale value doesn't keep leaking back.
Changed
- Color swatches now render as 40×40 px squares matching CB's existing section box swatch size — was a 52×34 rect. Added
position:relative; z-index:1so the swatch sits above any modal-overlay click capture (related to the user's report that the Background Color swatch was harder to click than the Text Color swatch — both should now be equally hittable).
[0.9.44] — 2026-05-17
Changed
- Toolbar reverted to light pill (white background, dark icons, soft border + shadow) matching existing CB UI patterns. v0.9.43's dark pill was a misread of the body content toolbar's actual styling.
- Color swatches reverted to native HTML5
<input type="color">at a fixed 52px width. v0.9.43's CB-openColorPicker-backed button rendered as a thin sliver because the integration from plugin context didn't reliably mount the Pickr popover. Native picker is reliable across all browsers; brand-color swatch support is deferred to a separate follow-up. Swatch is now visibly clickable (52×34 px with a 1px border and 2px inner padding so the colour swatch reads).
Fixed (in progress)
- Section Background Color reaching the nav — still being debugged. v0.9.44 widens detection to probe the section itself AND its
.is-overlay/.is-overlay-content/.is-boxdescendants for inlinestyle.backgroundColorand the various data-attr keys CB might use, and tightens the MutationObserver to watch attribute changes on the section's full subtree (was section-only). Adds a[pc-nav] applyNavBgconsole.debugentry to the canvas console so the inputs to the picker decision are visible — please open canvas DevTools → Console and paste a sample log line after picking a section bg colour so we can identify the exact CB persistence path on this install.
[0.9.43] — 2026-05-17
Changed
- Per-item toolbar restyled to match CB's body content edit toolbar — dark pill shape with white icons (was light rounded-rect with dark icons). Border-radius bumped to fully round; background
#1a1a1a; icon hover is a subtle white-alpha highlight. - Color swatches now render at proper width. v0.9.42's
flex:1color input collapsed to a thin vertical line inside the row2 grid becausemin-widthdefaulted to "auto" content size. Addedflex:1 1 auto; min-width:0; width:100%;on the swatch andwidth:100%; box-sizing:border-box;on the row wrapper so the swatch fills its grid cell. - Color pickers now use ContentBox's
openColorPicker(Pickr) — shows the configured brand-color swatches + hue + alpha + rgba text input, matching the section box settings picker the user referenced. Native<input type="color">remains as a fallback if the CB API is unavailable. Both the Nav Items modal and the nav-button modal use the same widget. - Nav CTA button modal now tabbed (GENERAL / HOVER / TEXT) matching the Nav Items modal pattern. Label / URL / Style / New Tab stay at the top above the tab bar — they're button-specific, not styling. HOVER tab adds Background Color, Text Color (Dark / Light / Current), Border Style. TEXT tab adds Font Size, Upper/Lower (B / Aa / U), Letter Spacing. Hover styling persists via a
<style class="pc-nav-btn-hover-styles">element inside the nav plugin, with each button getting a stabledata-btn-idand a per-button:hoverrule scoped to that ID. - New DROPDOWN tab on the Nav Items modal — controls for the submenu panel: Background Color, Text Color, Hover Background, Hover Text Color, Dropdown Radius, Item Padding L/R + T/B. Wires through
--nav-dd-*CSS variables consumed by.submenuand.submenu-linkrules instyle.css.
Fixed
- Section's Background Color picker now reliably paints the nav bar. v0.9.41's section-bg read checked
style.backgroundColoranddata-cb-coloronly; if CB writes the section's bg under a different attribute name the nav never picked it up. Added fallbacks fordata-bg-color,data-bg,data-color, and a finalgetComputedStyle(section).backgroundColorcatch-all that handles any CSS-rule-driven background. Widened the MutationObserver to watch ALL section attribute changes (was filtered tostyle+data-cb-color) so any picker write triggers a repaint.
Internal
- New
buildBtnHoverRule(b)+refreshBtnHoverStyles()helpers inopenContentEditor. Hover CSS rules are emitted as[data-cb-type="nav-menu"] .nav-btn[data-btn-id="..."]:hover { ... }so they're scoped per-button and survive<style>-element HTML round-trip. readNavLinkGlobal/applyNavLinkGlobalextended with eight new dropdown keys:ddBg,ddColor,ddHoverBg,ddHoverColor,ddRadius,ddPaddingX,ddPaddingTop,ddPaddingBottom. Stored asdata-nav-dd-*attributes on the plugin element; CSS variables--nav-dd-*consumed by.submenu/.submenu-linkinstyle.css. mount() re-applies on every canvas init so values persist across reloads.
[0.9.42] — 2026-05-17
Changed
- Nav-link edit modal redesigned to match CB Button modal pattern + scoped GLOBALLY. Per user direction: clicking any
.nav-linkor.submenu-linkin the canvas → toolbar → Edit now opens a tabbedNav Itemsmodal with three tabs (GENERAL/HOVER/TEXT) mirroring CB's Button modal layout. SAVED and TEMPLATES tabs are intentionally omitted. Changes apply to every nav-link in the nav instance, not the clicked one — settings live asdata-nav-link-*attributes on the plugin element and drive.nav-linkCSS via inline CSS variables. The earlier per-link modal (v0.8.0–v0.9.41) is replaced.- GENERAL tab: Background Color, Text Color, Width, Border Style, Border Thickness, Padding Left/Right, Padding Top, Padding Bottom, Border Radius, Margin Left/Right/Top/Bottom.
- HOVER tab: Background Color, Text Color (Dark / Light / Current), Border Style.
- TEXT tab: Font Size (12–32 px presets), Upper/Lower (B / Aa / U), Letter Spacing (0–200 with 25-unit steps).
- Per-item style controls removed from the slideout menu-items editor. The old "Item Style" subpanel (Background / Text / Weight per row) was redundant with the global modal and led to drift between the two surfaces. Slideout rows now show only label / URL / new-tab / delete + add-submenu controls; all visual styling moved to the canvas-side modal.
- Per-item style attributes no longer written into nav-link HTML by
updateMenu(). Markup stays clean; styling is global via CSS variables on the plugin wrapper.
Internal
- New helpers in
openContentEditor:readNavLinkGlobal(),applyNavLinkGlobal(state). Both operate onelement.dataset.navLink*keys, not on individual<a>elements.mount()also reads those keys and re-emits the CSS variables on every canvas init so values render correctly on reload. themes/user/pagecraft/assets/plugins/nav-menu/style.css:.nav-linkrules refactored to read from--nav-link-*CSS variables with sensible fallbacks. New rule for[data-nav-link-width="true"] .nav-link { width: 100%; display: block }.- Legacy per-item
data-nav-bg/data-nav-color/data-nav-weightattributes on individual<a>elements are no longer written, but old entries that still carry them are unaffected — there's no read-side that consumes them now, so they render with whatever the global CSS variables produce.
[0.9.41] — 2026-05-17
Fixed
- Per-item nav-link toolbar still didn't fire after v0.9.40's capture-phase click handler. ContentBox uses
mousedown(notclick) for its selection chain, and likely callspreventDefault()/stopImmediatePropagation()on the mousedown that would have otherwise generated a click — so our click-capture listener never fired. Added amousedown-capture handler in parallel with the click handler on the canvas document. Mousedown reaches the document before any descendant handler can suppress it. Also added a[pc-nav-menu]console.log so the canvas console shows whether the handler fires and how many.nav-btn/.nav-link/.submenu-linkelements were detected on mount — useful for further diagnosis if needed. - Source segmented toggle stopped working after the first click. CB's settings form re-renders on every
inputevent (seegenerateFormincontentbox.esm.js), which replaces the rendered<select>we'd upgraded with a fresh one — and our v0.9.40 one-shot upgrade scan didn't catch the new select. Replaced the bounded setTimeout sweep with a persistentMutationObserveron the parent document body that re-runsscanAndUpgradeon every DOM mutation. Idempotent viaselect.dataset.pcUpgradedso already-upgraded selects skip cleanly. - Section's Background Color now paints the nav bar. v0.9.40 made
.nav-wrappertransparent so the section bg "shows through" — but the nav isposition: sticky, so once the user scrolls past the section height the section bg scrolls out and the nav becomes truly transparent over the page content. Nowmount()reads the section'sstyle.backgroundColor(ordata-cb-colorfallback) and applies it directly to.nav-wrapperso the nav stays painted regardless of scroll. AMutationObserveron the section'sstyleanddata-cb-colorattributes keeps the nav in sync when the editor changes the section's bg picker live, no save+reload needed.
Changed
- Source toggle labels shortened to
Manual/Structure(were "Native (manual menu items)" / "Structure (EE page tree)"). Fits the segmented button widths cleanly and matches the user's verbal naming.
[0.9.40] — 2026-05-17
Fixed
Uncaught TypeError: Cannot read properties of undefined (reading 'cloneNode')fromsendSave. The periodic 2-second save tick could fire before ContentBox finished initialising the canvas iframe and set its internalwrapperElreference. CB'shtml()doesthis.wrapperEl.cloneNode(true)as its first line and crashes when wrapperEl is undefined. GuardedsendSaveto skip cleanly whenbuilder.wrapperElis missing, and wrapped thebuilder.html()call in a try/catch so any future races log + skip instead of flooding the console. The next tick (or onChange) catches the actual content once init completes.- Per-item nav-link / submenu-link toolbar still didn't appear after v0.9.39's delegated-handler fix. Binding to the nav wrapper bubble-phase wasn't enough — ContentBox's own click chain was stopping propagation higher up before our handler fired. Re-bound to the canvas DOCUMENT in CAPTURE phase, which fires before any descendant capture or bubble. Now reliably surfaces the Edit / Delete toolbar on click of any
.nav-linkor.submenu-link— including links injected later byapplyStructureItems()in Structure mode.
Changed
- Removed the nav-specific Background Colour setting entirely. Was producing a second color picker in the slideout that duplicated the section box's existing Background Color (already at the top of the slideout via CB's section settings). Confusing — both pickers drove the same visual. Now the nav bar inherits the parent section's background color directly. The
.nav-wrapperCSS defaults to transparent so the section's bg shows through. Legacy entries that still havedata-cb-bg-colorsaved are honoured at mount time for backwards compatibility — the inlinebackgroundoverride is applied so the visual doesn't change. New entries simply use the section picker. - Source and Width settings now render as segmented two-button toggles matching the visual style of CB's Responsive panel's Visible | Hidden control. Implementation: kept the underlying
type: 'select'declarations so CB's save round-trip still works through the native<select>element, then upgrade the rendered DOM inopenContentEditor— hide the select, insert a segmented button widget next to it, wire button clicks back toselect.value + dispatchEvent('input')so CB's form listener picks up the change. Idempotent viaselect.dataset.pcUpgraded, polled at 0 / 60 / 250 / 800 ms to catch the settings panel render whenever it happens. The select stays in the DOM (display:none) as the source of truth.
[0.9.39] — 2026-05-17
Fixed
- Nav-menu per-item edit toolbar regression. Clicking a
.nav-linkor.submenu-linkin the editor canvas now reliably surfaces the floating Edit / Delete toolbar (the modal opens with the full visual field set — Background / Text / Font weight / Font size / Width / Border style/thickness/radius / Padding L/R + T/B / Margins L/R/T/B). Cause: the per-element click handlers at the end ofmount()only bound to elements that existed at mount time — whenapplyStructureItems()(Structure mode) or any other in-place DOM rewrite replaced the.nav-listinnerHTML, the new.nav-linkelements had no listener and the toolbar silently failed to open. Replaced with a single delegated click handler on the nav wrapper usingelement.closest('.nav-link, .submenu-link'), with previous-handler cleanup on re-mount so the latest mount'sshowToolbarclosure wins (no stale references to detached toolbar elements).
Changed
- Slideout settings panel no longer carries per-button styling controls. The Customize → BG Color / Text Color / Border / Padding / Margin / Border Radius / Width block that lived inside each CTA button's slideout row (lines 1278–1431 of
themes/user/pagecraft/assets/plugins/nav-menu/index.js) is removed. The same field set lives on the canvas-side click→toolbar→openBtnModalpath, which has room for the full UI without the slideout's real-estate constraints. The two surfaces were drifting; cutting the slideout copy resolves it. Slideout button rows now show only label / URL / style / new-tab + add/delete/reorder. - Nav-bar Background Colour is now a proper color picker. Was
type: 'text'(hand-type#ffforrgba(...)); nowtype: 'color', which renders ContentBox's Pickr-style picker with hue + alpha slider + swatches + rgba text output — the same widget Section box settings use. Existing saved values (hex or rgba) round-trip unchanged. - Layout dropdown: Side Nav removed. The fixed-left-sidebar variant was lightly finished and crowding the dropdown. Removed from the option list, removed from
style.css(~80 lines of.nav-side-variant/.variant-side-navrules), andmount()now migrates any savedvariant=side-naventries toleft-navautomatically so existing entries don't break. - Source and Width settings converted to dropdowns. "Use Structure to Generate Navigation" was a checkbox → now
Sourcewith optionsNative (manual menu items)andStructure (EE page tree). "Full width" was atype: 'toggle'rendering as "Full width / true" plain text → nowWidthwith optionsBoxedandFull Width. Underlying data round-trip is unchanged; this is purely a clearer UI label and explicit two-state semantics. (Note: true segmented two-button-group rendering — matching the Responsive panel's Visible / Hidden control — needs a CB field-type addition we don't have; deferred.)
Internal
- No DB migration. Saved entries from v0.9.38 and earlier render unchanged.
- All four nav-menu items live in a single file —
themes/user/pagecraft/assets/plugins/nav-menu/index.js. Repo's bundled copy (system/user/addons/page_craft/themes/user/pagecraft/assets/plugins/nav-menu/) synced from the deployed local copy.
[0.9.38] — 2026-05-16
Added
- Copy/Paste Phase 3 — style paint-brush. Right-click any element / block / column / section → menu now includes "Copy styles (kind)" which captures only the target's inline
styleattribute + class list (no inner HTML, no CSS-rule extraction — just the visual properties applied to that one element). The clipboard stores it askind="styles"with asourceKindfield. Right-click another element of the same kind and pick "Paste styles (to kind)" to apply the inline style + classes wholesale, like Word's Format Painter or Figma's "Copy properties → Paste here." - Marker-class preservation. Pasting styles onto an element does NOT clobber the CB-required marker classes for the target's kind:
is-subblock editfor elements,columnfor columns,is-section is-boxfor sections. After the class swap we re-add any missing markers so CB still recognises the element after paste. Block-kind has no class marker (identity comes fromdata-cb-type) so its full class list is replaceable. - Same-kind restriction. Style paste only enables when the right-click target has an ancestor of the same kind as the source. Element styles can only paste onto an element; column styles can only paste onto a column. Prevents the obvious foot-gun of pasting section styles onto a paragraph and losing the paragraph's CB markers.
- What travels with styles: inline
styleattribute +classattribute. Does NOT travel: rule-based styling that lives inmainCss/sectionCssfor non-class selectors. If your styled element relies on entry-wide CSS rules that match by tag or attribute, those don't come withCopy styles— useCopy element(Phase 2) instead, which walks and brings matching CSS rules.
[0.9.37] — 2026-05-16
Added
- Copy/Paste Phase 2 — columns, blocks, and elements (right-click menu). The right-click clipboard now works at every level of the ContentBox hierarchy, not just sections:
.is-subblock.edit— text/image elements (paragraphs, headings, individual images)[data-cb-type]plugin blocks (nav-menu, swiper-slider, accordion, …).columninside a CB.row— columns.is-section.is-box— full sections (already shipped in v0.9.34)
- The resolver now walks ALL ancestors of the right-click target, not just the deepest match. Right-clicking inside a paragraph that lives inside a column inside a section shows Copy element / Copy column / Copy section stacked top-to-bottom — pick the granularity you actually want, no need to right-click on an empty edge of a wrapper. Paste options only appear when the clipboard's kind matches a found ancestor, so you can't accidentally try to paste a section inside a paragraph. When the clipboard contains a non-matching kind, the menu shows a disabled "Clipboard: section (no match here)" hint so you know the clipboard isn't empty, it's just incompatible with the right-click target.
- Pastes for all four kinds use the same code path — generic
copyUnit(kind, el)andpasteAdjacent(clip, target, where)replaced the section-specific helpers. CSS-rule walking, sectionCss merge with dedupe, andbuilder.applyBehaviorOnre-decoration (so toolbars/handles appear immediately) all flow through one implementation.
Internal
- Replaced the v0.9.34
resolveSelectable(deepest-match) withresolveSelectables(all-ancestors).buildContextMenuItems(found, clip)assembles the menu dynamically per right-click. OldcopySection/pasteSectionconsolidated intocopyUnit/pasteAdjacent. ~70 net new lines inActions/EditorFrame.php.
[0.9.36] — 2026-05-16
Fixed
- Pasted sections now get their ContentBox toolbar / drag handles / click chain immediately, no save+reload required. v0.9.34's
pasteSectioninserted the cleaned markup viaparentNode.insertBeforebut didn't tell ContentBox about it, so the new section had no.is-section-tooloverlay, no Add/Move/Settings/Delete buttons, and clicking inside it didn't engage CB's editor — until the user saved the page (at which point a freshloadHtmlfrom saved JSON triggered CB's normal section setup pass). Fix: after inserting, callbuilder.applyBehaviorOn(.is-builder)with the same two-pass + 150 ms layout delay pattern that Grid Builder's column split uses (EditorFrame.php::applyBehavioraround line 942). Also firebuilder.opts.onChange()so CB's own debounced save path kicks in alongside our directpagecraft-request-savepostMessage — belt-and-suspenders. Pasted sections are now fully interactive the moment they land.
[0.9.35] — 2026-05-16
Fixed
- v0.9.34's copy/paste IIFE broke the editor canvas due to a PHP-heredoc escape clash. The new paste-merge code contained
'\n'inside JS string literals (to join CSS rules with newlines). The outer editor frame'secho <<<HTML … HTML;heredoc is unquoted, which means PHP processes backslash escape sequences inside the body — so\nin my JS source became an actual newline character in the rendered response, landing inside a JS single-quoted string literal. Browsers reportedUncaught SyntaxError: Invalid or unexpected tokenat the rendered file's column ~55 of that line, ContentBox never finished initializing, and the canvas didn't load. Fix: escape the backslash ('\\n') so PHP renders the literal\ntwo-char sequence into the JS source. v0.9.34's intent (copy/paste sections via right-click) now works as designed. - Lesson encoded for future canvas-side JS changes inside the outer heredoc: any backslash escape inside a JS string literal must be written as
\\in this PHP source so the rendered HTTP response carries the single backslash through to the browser. Same gotcha would bite'\t','\r','\u…', etc.
[0.9.34] — 2026-05-15
Added
- Copy/Paste sections in the editor canvas (right-click menu). Right-click any section in the canvas to get a context menu with Copy section / Paste section above / Paste section below. The clipboard is a single JSON payload stored in
localStorageon the CP origin, so it survives page reload and is shared across browser tabs — copy a section in one entry, navigate to another entry, paste it there. On copy: ContentBox editor-only markup is stripped (.is-section-tool,.is-box-tool,[contenteditable],data-cb-original-content, etc., mirroring the set used byActions/SaveGlobalComponent.php), then the entry'smainCss+sectionCssare walked for rules whose selectors match elements in the copied subtree. Matching rules travel with the markup. On paste: cleaned markup is inserted as a sibling above/below the right-clicked section, matched CSS rules are merged into the destination entry'ssectionCss(de-duped against existing rules), and the canvas requests a save. The pasted section'sdata-cb-typeblocks (sliders, accordions, etc.) re-initialise normally because ContentBox's runtime watches the iframe DOM for new nodes. - This is Phase 1 of the copy/paste system per the approved plan; column / block / element granularity ships in v0.9.35 and the style paint-brush in v0.9.36. v1 deliberately skips
@media,@supports, and@keyframesrules during CSS extraction (top-level rules only) — adequate for the common case where sections are styled flat.
Internal
- All copy/paste logic lives in a self-contained IIFE inside
Actions/EditorFrame.php(added after the existing Save-as-Section block, ~line 1230). No new DB tables, no new ACT endpoints — purely client-side.
[0.9.33] — 2026-05-12
Fixed
- Dynamic Content sections that use animation libraries now show their content in canvas. Editors reported seeing the embedded template's wrapper containers but no content inside — common with Crafto-style themes that use AOS / anime.js /
data-anime/.wowto fade content in on scroll. The cause is that template-embed paints the rendered HTML viaelement.innerHTML = data.html, and per HTML spec<script>tags inserted viainnerHTMLare inert — they parse but never execute. So the animation library never initializes and elements stay at their pre-animation state (opacity: 0, transformed offset). Added a canvas-only CSS shim totemplate-embed/style.cssthat forces visibility on the common hide-until-animate markers ([data-aos],[data-anime],[data-shadow-animation],.fade-in,.wow,.aos-init,.invisible,.opacity-0). The shim is scoped to[data-cb-type="template-embed"], which only exists in the canvas — on the front-endresolveTemplateEmbeds()replaces the section and strips the attribute, so production animations are never affected. Sliders may still not slice/auto-rotate in canvas (that needs the JS to run, which is a separate fix), but at least the content is visible for layout-positioning purposes.
[0.9.32] — 2026-05-12
Fixed
- Swiper-slider new slides actually appear now. v0.9.31 fixed the slide HTML structure but the new slide still rendered blank — and the cause turned out to be Swiper itself, not the markup. The "+ Add Slide" handler was appending the new
<div class="swiper-slide">directly to.swiper-wrapperwithout telling the Swiper instance, so Swiper's internal slide registry never saw it. Because the plugin's CSS keeps.slide-captionatopacity: 0; transform: translateY(40px)until the parent slide gets.swiper-slide-active, and that class is only set by Swiper on slides it knows about, the new slide stayed invisible (image and caption both). Fix: after appending the slide, callelement.swiperInstance.update()andslideTo(lastIndex, 0)so Swiper picks up the new slide and immediately navigates to it — the user sees their new slide and the caption fades in.
[0.9.31] — 2026-05-12
Fixed
- Nav-menu z-index bumped from 1 → 99 (
themes/user/pagecraft/assets/plugins/nav-menu/style.css). The sticky nav was being overlapped by Dynamic Content sections and other content with stacking contexts above 1. Z=99 stays well below modal/toast z-indexes (which the plugin uses at 99997+) while comfortably winning over generic page content. - Swiper-slider "+ Add Slide" no longer drops the placeholder content. The Add-Slide handler in
swiper-slider/index.jsproduced a stripped-down slide (<div class="slide-caption">with a single<h3 class="slide-caption-title">and<p class="slide-caption-description">) that didn't match the structure the seeded slides ship with — nois-container v3on the caption, no eyebrow<p class="uppercase tracking-225 size-12">, no Read More button. New slides now mirror the seed structure so the placeholder layout is preserved. - Swiper-slider hardening against host-theme CSS conflicts. When the host theme (e.g. Crafto) loads its own
swiper-bundle.min.css, several plugin rules lost the cascade fight. Added scoped!importantto:.swiper-paginationcentering (display: flex,justify-content: center,left: 0,right: 0,transform: none) so the dots/bars no longer flush left when a host theme overrides Swiper's defaults.- Nav-button arrow glyphs — every
.swiper-button-next/prev::after(all three style variants: transparent / solid / arrow) now forcesfont-family: swiper-icons, explicitcontent: 'prev'/'next', and visibility. Host themes that null out Swiper's::aftercontent (or swap the font for FontAwesome) no longer hide the arrows. - Hover transitions — baseline
transform: scale(1)on the nav buttons andtransform: scale(1.1) !important(or1.05for solid) on hover, so any host-themetranslateYhover effect can't displace the button. Circles now grow in place instead of jumping down.
Internal
- No version-gated behavior change in PHP — this release is plugin-asset only.
addon.setup.phpversion still bumped so CP shows a tracked release.
[0.9.30] — 2026-05-12
Reverted
- The
.containermax-width override from v0.9.29. Misread the user's intent: the embedded template's.containercap at 1320px is intentional design — the template author chose.container(centered, bounded) rather than.container-fluid(full width) for a reason, and we shouldn't break it. The actual intent was for the section wrapping the container to stretch to full viewport width, with the container then centering content inside that section. The v0.9.28 wrapper-chain neutralizers already make the section full-width by uncapping CB's.is-container.is-content-1200. The 1320px-container-inside-full-width-section pattern is what the template author designed, and now matches.
Internal
- Canvas iframe cache buster bumped:
v=0.6.6→v=0.6.7.
[0.9.29] — 2026-05-12
Changed
- Override the embedded template's own Bootstrap container max-width inside Dynamic Content sections. Inspector showed the canvas constraint wasn't coming from CB's
.is-container.is-content-1200(we already neutralized that) — it was the rendered template's own<div class="container">capping at 1320px (Bootstrap default, plus amax-width: 1320pxfromcustom.cssin the user's theme). Templates use.containerfor intentionally bounded layouts, but inside a Dynamic Content section the user wants the section to span the full available width like a CB native section does. Added an override scoped to.is-section.pc-section-template-embed(canvas) and.pc-dynamic-render(front-end) that setsmax-width: none !importanton.container,.container-sm/-md/-lg/-xl/-xxl. Front-end may also become wider as a side effect of this — if that's undesired, scope the rule to canvas-only by removing the.pc-dynamic-renderselectors.
Internal
- Canvas iframe cache buster bumped:
v=0.6.5→v=0.6.6.
[0.9.28] — 2026-05-11
Fixed
- Same Bootstrap-stacking bug as 0.9.27, but on the canvas side. The canvas-only neutralizer rules in
template-embed/style.cssfor.is-section.pc-section-template-embed .rowand.columnused descendant combinators, so they matched not only ContentBox's own.row.clearfix > .column(which we wanted to neutralize) but ALSO Bootstrap's.row > .col-*deep inside the rendered template — forcing every Bootstrap column to width:100% with the sameflex: 1 1 100% !important; margin: 0 !important; gap: 0 !importantreset that broke the front-end. Effect in canvas: even when the container max-width was uncapped, the rendered template's columns stacked vertically. - Fix: changed both rules to child combinators (
>) so they reach only CB's immediate row and column inside the section's container —.is-section.pc-section-template-embed > .is-container > .row > .column. Bootstrap rows nested inside[data-cb-type="template-embed"]are at a different depth and don't match the child-combinator chain, so their layout is preserved.
Internal
- Canvas iframe cache buster bumped:
v=0.6.4→v=0.6.5so existing canvas tabs pick up the updated rules.
[0.9.27] — 2026-05-11
Fixed
- Bootstrap responsive columns inside rendered Dynamic Content sections were forced to single-column mobile-mode layout at every viewport size. Diagnosis via DevTools showed
.pc-dynamic-renderwas correctly at full viewport width (2182px on a 2455px-wide canvas), but the columns inside still stacked. Root cause: an over-eager rule from v0.9.22 —.pc-dynamic-render .row > * { width: 100%; max-width: 100%; ... }— had specificity (0,2,0) and beat Bootstrap's responsive.col-lg-X { width: 41.66% }rules at (0,1,0), forcing every column to 100% width regardless of viewport. The rule was originally added to re-emit Bootstrap's default.row > *padding "for safety," but it was both unnecessary (CB's.columnselector doesn't match Bootstrap's.col-*, so there's nothing to restore) AND harmful. - Fix: removed the
.pc-dynamic-render .row > *block entirely. Bootstrap's native.row > *rule (specificity 0,1,1) still provides default padding/width for any non-col-* child, and the responsive.col-*rules now win for col-* children. The.pc-dynamic-render .rowrule (gutter margins) stays — that one is genuinely needed to undo CB's.row { gap: 2rem; margin: 0 -1rem }clobber.
[0.9.26] — 2026-05-11
Fixed
- template-embed plugin CSS was never being fetched by the browser even though
enqueueRuntimecorrectly registered it in the runtime script'snew ContentBoxRuntime({ plugins: { ... } })block. Root cause: ContentBoxRuntime's plugin loader is lazy — it only fetches a plugin's CSS/JS when it finds a matching[data-cb-type="..."]element in the DOM at init time. AfterresolveTemplateEmbedsruns, everydata-cb-type="template-embed"element has already been replaced with the resolved template (wrapped in.pc-dynamic-render). The runtime sees nodata-cb-type="template-embed"in the DOM and silently skips the plugin, even with the registry entry pointing at the right URL. - Fix: when the
pc-dynamic-rendermarker is detected inenqueueRuntime, inject the plugin'sstyle.cssURL directly into the existingpagecraft_required_cssconfig array — the same pipeline that already emitscontentbox-runtime.cssat the{pagecraft_styles}placeholder via thetemplate_post_parsehook. That bypasses the lazy-load entirely; the browser gets the CSS via a normal<link>tag, the Bootstrap-row reset rules apply, and the rendered Dynamic Content section renders at full width with proper grid behavior.
Removed
- The diagnostic
ee()->logger->developer(...)line added in 0.9.25 has been removed. It served its purpose — the log told us the marker detection was working, which narrowed the bug down to the asset-fetch layer.
[0.9.25] — 2026-05-11
Diagnostic
- Added a one-shot
ee()->logger->developer()call insideenqueueRuntime()that logs the html length, whether thepc-dynamic-rendermarker is present, whether thedata-cb-type="template-embed"attribute is still present, and the current state of the static$registered_pluginsand local$new_pluginslists. Visible at CP → Tools → Logs → Developer Log after rendering any PageCraft-containing page. Lets us see exactly what enqueueRuntime is seeing per call — to figure out why template-embed registration is failing on staging despite the marker-detection code being in place. - Will be removed once we confirm the underlying behavior.
[0.9.24] — 2026-05-11
Fixed
.pc-dynamic-renderwidth now forced via!importantso it can't be shrunk by other rules. User confirmed that manually addingw-100(Bootstrap'swidth: 100% !important) fixed the rendered-page layout — the prior plainwidth: 100%was being overridden by something downstream (likely a framework rule with higher specificity, or flex-shrink reducing the basis). Also addedflex: 1 1 100% !importantso the wrapper definitely takes the full available width when sitting as a flex item inside.is-wrapper.- Canvas-side container neutralizer hardened with explicit selectors covering every class combination CB applies to the inner container (
is-container,is-container.v2,is-container.v2.is-content-1200,is-container.v2.is-content-1200.is-builder, plusis-container.v3and a wildcard[class*="is-content-"]). When two!importantdeclarations compete, specificity wins — and CB's own.is-content-1200 { max-width: 1200px }has specificity (0,1,0), so any of our 3- or 4-class selectors beats it cleanly. This forces the canvas wrapper chain to render at full width when wrapping a template-embed plugin, matching the rendered-page behavior.
Internal
- Canvas iframe cache buster bumped:
v=0.6.3→v=0.6.4.
[0.9.23] — 2026-05-11
Fixed
- Rendered Dynamic Content sections collapsed to mobile-mode layout on the front-end — content stacked vertically, section background only filled ~60% of viewport width, large empty space on the right. Root cause: ContentBox's
.is-wrapperelement isdisplay: flex; flex-flow: row wrap, so its direct children are flex items. CB's own.is-sectionrule forceswidth: 100%on those, but the new.pc-dynamic-renderwrapper added in 0.9.22 had no width rule — so as a bare flex item it collapsed to the minimum content width of the embedded template, which then rendered in mobile-mode layout (single-column cards, ~540px Bootstrap container width). Addingwidth: 100%; display: block; box-sizing: border-boxto.pc-dynamic-rendermakes it behave like a CB section and the rendered template gets the full viewport width to lay itself out against.
Internal
- Canvas iframe cache buster bumped:
v=0.6.2→v=0.6.3.
[0.9.22] — 2026-05-11
Fixed
- Rendered templates inside Dynamic Content sections were visually shifted to the right because ContentBox's runtime CSS contains an unscoped rule that clobbers Bootstrap's grid:
These match ANY.row { display: flex; gap: 2rem; margin: 0 -1rem } .column { padding-left: 1rem; padding-right: 1rem }.row/.columnon the page — including ones inside an embedded template's own Bootstrap layout. Bootstrap's.col-*widths sum to ~100% already, so CB's addedgap: 2rempushed content past the container's right edge, producing a visible sideways shift.
Changed
resolveTemplateEmbeds()wraps the rendered template in<div class="pc-dynamic-render">at output time. The wrapper is a CSS scoping anchor for the Bootstrap-row reset; without it, there's no reliable way to target "this is rendered template content, restore Bootstrap defaults here."mod.page_craft.php::enqueueRuntime()now enqueues the template-embed plugin's CSS on the front-end whenpc-dynamic-renderis present in the rendered HTML. Previously the plugin CSS only loaded in the canvas (via plugin auto-registration) and on entries that still carried thepc-section-template-embedwrapper marker — neither of which holds true on the front-end post-resolve. The new marker fallback closes that gap.assets/plugins/template-embed/style.cssre-emits Bootstrap 5's.rowgutter math scoped to.pc-dynamic-renderwith!important, beating CB's later-loaded clobber on equal specificity..col-*is unaffected by CB's.columnrule (different class name) so doesn't need a counterpart reset — but we re-emit the standard column padding for safety.
Internal
- Canvas iframe cache buster bumped:
v=0.6.1→v=0.6.2so existing canvas tabs pick up the new reset CSS without manual hard-refresh.
Note on the canvas-side container constraint
- Inside the canvas, the rendered template is still bounded by ContentBox's
.is-container.v2.is-content-1200wrapper chain (~1200px max-width). This is necessary for ContentBox's section/plugin tooling to function and is acceptable as a known visual difference: the canvas is "approximate," the front-end is "what the page actually looks like." A future release can revisit canvas display by suppressing the container max-width specifically inside.pc-section-template-embedsections.
[0.9.21] — 2026-05-11
Fixed
- Template selector now opens reliably on Dynamic Content sections — by bypassing ContentBox's click chain entirely for this UX. The 0.9.20 try/catch wrapper on
positionToolkilled the visible crash but didn't help: with the section-tool not yet injected, downstream code that would have triggeredopenContentEditoralso bailed silently, so the selector never appeared. Rather than chase every CB invariant our section happens to violate during early init, the template-embed plugin now attaches its own click handler to the placeholder and the rendered preview. Clicks open a self-contained modal (built in the canvas iframe, dispatched at z-index2147483647over everything) containing the template dropdown. On selection, the plugin writes the new path todata-pc-template-path/data-cb-template-path, fetches the chosen template via the existing preview endpoint, swaps the placeholder for the rendered HTML, and dispatches aninputevent so ContentBox's autosave picks up the change. - "Change template" pill added to the rendered preview's top-right corner (only visible in the canvas, marked
contenteditable=falseso it doesn't get saved into entry data). Clicking it re-opens the picker so editors can swap templates without trying to navigate CB's section toolbar. - The CB
editor.openContentEditorhook is still registered (kept for backwards compatibility with any CB code path that invokes it directly) but it's no longer the primary entry point for the picker.
Internal
- Canvas iframe cache buster bumped:
v=0.6.0→v=0.6.1so existing canvas tabs pick up the new picker without manual hard-refresh.
Why this works where 0.9.20 didn't
- 0.9.20's
positionToolguard prevented the visible error butD.select/D.clickContentstill depended on side effects ofpositionToolhaving succeeded (active section state, toolbar wiring) that we couldn't replicate from outside. The plugin'sopenContentEditoris invoked downstream of all of that, so it never ran. - 0.9.21 sidesteps the entire dependency by giving the plugin its own click → picker → render pipeline. No
.is-section-tool, nopositionTool, no CB selection state required. The plugin element itself is the surface; the click handler is on the plugin's own DOM.
[0.9.20] — 2026-05-11
Fixed
- Template selector never opened on Dynamic Content sections. Clicking the placeholder produced a flood of
Uncaught TypeError: Cannot read properties of null (reading 'querySelector') at Object.positionToolerrors andopenContentEditorwas never reached. Root cause traced by reading the minified ContentBox source:positionTool(t)doesl = s.querySelector('.is-section-tool')followed immediately byconst a = l.querySelector('.btn-move-section-up')— with no null guard between them. When a section's.is-section-toolhasn't been injected yet (which happens for template-embed sections during early canvas init and on first click after a fresh picker drop),lis null, and the secondquerySelectorcall explodes. The throw propagates up throughD.select → D.clickContent → D.builder.onPageContentClick, killing the click handler chain before it can invoke the plugin'sopenContentEditor. The section-tool is injected later bysectionSetup(), but for these sections it's not in place by the timepositionToolfirst fires. - Defensive wrapper around
builder.positionToolin the editor JS catches the throw, lets the click handler chain continue (soopenContentEditorruns and the template dropdown opens), and schedules a one-shot deferred retry 100ms later so the section toolbar still positions correctly oncesectionSetuphas had a chance to inject the tool. Localised patch — only the one CB method is wrapped, everything else is untouched.
Internal
- Canvas iframe cache buster bumped:
v=0.5.8→v=0.6.0so existing canvas tabs pick up the guard without manual hard-refresh.
Why this took several attempts to diagnose
- v0.9.9 and v0.9.17 changed the seed shape thinking the wrappers themselves were the problem. They weren't — the wrappers were necessary for CB tooling. The real bug was that even with the correct wrapper chain, CB's
positionToolhas an unguarded null dereference that fires whenever a section's tool element isn't ready yet, and template-embed sections happen to hit that timing window. Once the diagnosis traced into the actual CB source (via the minified file's error column number), the fix was a 15-line wrapper.
[0.9.19] — 2026-05-10
Front-end-only fix for Dynamic Content rendering distortion. The canvas is left fully intact — the wrapper chain (is-section → is-overlay → is-container → row → column → embed-div) stays around the embed in the editor so ContentBox's section/plugin tooling keeps working. At output time, the entire pc-section-template-embed wrapper is replaced with just the rendered template, so the front-end gets clean output with no CB-wrapper interference.
Changed
mod.page_craft.php::resolveTemplateEmbeds()now replaces the surroundingpc-section-template-embedsection (when found) instead of just the embed div. Walks backward from eachdata-cb-type="template-embed"occurrence (capped to 4KB to avoid spurious matches) for the nearestpc-section-template-embedmarker, verifies it's actually a class-attribute match, finds the section's matching</div>via depth-counted forward scan, and splices the rendered template in as a complete replacement for the wrapper span. Falls back to embed-only replacement when no wrapper is found within range (legacy entries from before the marker class existed, hand-edited content). Sanity check: the embed's</div>must close before the section's</div>closes for the wrapper to count as enclosing — guards against the marker being on a different (already-resolved or sibling) section.- Pure string scanning, no DOMDocument anywhere. New
findMatchingDivClose()helper does the depth-counted forward scan that the previous code inlined; both the embed-close and section-close lookups use it. Splicing issubstr()only — the rendered template's HTML is never re-serialized through a parser, so the HTML5 mangling that 0.9.12 exposed (script/style content corruption, self-closing tag rewrites, SVG damage) cannot happen.
Why this is different from 0.9.12 and 0.9.17
- 0.9.12 attempted whole-section replacement via DOMDocument round-trip — mangled HTML5, broke pages site-wide.
- 0.9.17 attempted to slim the saved canvas shape by collapsing
.is-sectionanddata-cb-typeonto one element — broke ContentBox's section-handling code. - 0.9.19 leaves the canvas/saved shape exactly as v0.9.16/v0.9.18 had it (full wrapper chain, plugin tooling intact). Only the front-end output changes, via a string-only splice that targets the section boundaries we already control.
What you can verify
- Canvas: unchanged. Drop a Dynamic Content section, pick a template, edit the entry, save — works exactly as in v0.9.18. The canvas still shows the wrapper chain because that's what ContentBox needs to host editor tooling.
- Front-end: view the published page or
/index.php/your-entry/— the rendered template should now occupy its natural width and layout, with nois-container.v2.is-content-1200cap, nois-builder/.row/.columninterference. View source: where you used to see the full wrapper chain wrapping the rendered template, you should now see the rendered template at the same DOM level as its sibling sections.
[0.9.18] — 2026-05-10
Revert release. Rolls back 0.9.17's single-element Dynamic Content seed, which broke ContentBox's section-handling code.
Reverted
- 0.9.17 — single-element seed and migration. Putting
class="is-section ..."anddata-cb-type="template-embed"on the same DOM element confused ContentBox: its section-handling walks up from a plugin element looking for an enclosing.is-sectionancestor, found itself, then crashed incloneNode(during save serialization) andquerySelector(duringpositionToolwhen an editor clicked into the canvas). Net result: clicking a new Dynamic Content section produced a flood ofCannot read properties of null (reading 'querySelector')errors and the template selector never opened. Same shape problem as 0.9.9, just expressed differently —.is-sectionand the plugin element have to be distinct DOM nodes for CB to function. - The render-time container-class injection (
Services/TemplatePreview::injectContainerClass()) and canvas warning banner from 0.9.17 are also reverted. They were neutral on their own, but they only made sense paired with the slim seed — with the wrapper-chain shape back in place, injectingis-container v3onto a template element nested inside CB's existingis-container v2.is-content-1200doesn't do anything useful (CB's outer container still applies its width cap).
Behavior restored
- Dynamic Content seed is back to the 0.9.16 shape: full
is-section → is-overlay → is-container.v2.is-content-1200.is-builder → row → column → embed-divchain. Plugin selector works, save/load works, canvas tooling works. Template still gets the wrapper-induced layout distortion when its own grid framework collides with CB's.row— that's the unsolved problem 0.9.17 tried to fix and we'll re-attempt with a different shape later.
Migrated
- The 0.9.17 migration corrupted the seeded
Dynamic Contentrow inpagecraft_sectionsto the broken single-element form. The DB row was restored manually for this install. Future installs and updates use the original v0.9.16 wrapper-chain seed.
What we learned (worth not re-litigating)
class="is-section"+data-cb-type="..."on the same element is a no-go. CB's internal model assumes plugin elements are children of sections, not the section itself.- Any further attempt at slimming the Dynamic Content shape needs to keep
.is-sectionanddata-cb-typeon separate nodes. The minimal viable structure is at least<div class="is-section pc-section-template-embed"> <div data-cb-type="template-embed">...</div> </div>— but as 0.9.9 showed, that combo (without the row/column chain) also confuses CB's plugin scanner. We need to find what CB actually requires, not what we hope it tolerates.
[0.9.16] — 2026-05-09
Fixed
- Image uploads from the canvas were 403'ing with a non-JSON HTML error response (
Uncaught SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON). Root cause: the canvas iframe captures EE's session-tied CSRF token at iframe-load time and caches it in a JS variable for the life of the tab. When EE's CSRF token later rotates (login/logout, session refresh, some middleware events), the cached canvas token goes stale. EE'sprocess_secure_forms()(legacy/libraries/Core.php line 942) then rejects the upload POST with a 403 + HTML "csrf_token_expired" page. Because the canvas'suploadhandler doesawait res.json()unconditionally, the HTML body explodes the JSON parser and ContentBox's image-insert flow silently fails. This is the same class of failure that affects any long-lived canvas tab, not something specific to a particular session.
Changed
Page_craft::uploadACT is nowcsrf_exempt = 1. Defense-in-depth replacement:Actions/Upload.phpnow does a same-origin check (Origin or Referer header must point at this site'ssite_urlhost) in lieu of CSRF token validation. Browsers always send Origin on cross-origin POSTs and never let attacker JS forge it, so a forged form onattacker.comis detectable even with cookies attached. The auth check (member must be logged in) and upload-destination permission check (member must have access to the destination) are unchanged. Net security posture: equivalent for legitimate users, no longer breaks on session token rotation.- New
Page_craft_upd::markUploadCsrfExempt()runs on both install() and update(). Setscsrf_exempt = 1on the upload action row inexp_actions. Idempotent.
Migrated
- Existing installs running update() will get the upload action flipped to
csrf_exempt = 1automatically. No manual DB step required.
[0.9.15] — 2026-05-09
First step of the Grid Builder UX overhaul (designs in Figma — six frames reviewed). This release fixes the two long-standing bugs in the column-split flow without adding any new UI; subsequent releases will land the per-column toolbar and the split-aware block picker.
Fixed
- New column wasn't clickable until you saved and reloaded after a horizontal split. ContentBox's selection runs on
mousedown(notclick), and only fires for elements that havedata-click="true". The freshly-created<div class="column">was inserted without that attribute, and the post-insertnewCol.click()was firing beforeapplyBehaviorOnfinished re-attaching CB's handlers — so the click event reached an element CB hadn't yet decorated, and selection silently failed. New activation helper seedsdata-clickon the new column up front, clearscell-activefrom siblings to reset visible selection, and dispatches a real bubbling mousedown/mouseup/click sequence that CB's delegated handlers actually listen for. Save round-trip is no longer required. - Parent column became unselectable after a vertical split.
splitVertical()was strippingdata-click="true"along withcontenteditablefrom the outer column on the assumption that "ContentBox will make the inner columns editable" — but that also removed the parent's CB selection hook entirely, leaving no way to click back to the outer wrapper to apply column-level settings or undo the split. The fix keepsdata-click="true"on the parent (onlycontenteditableis removed, since the outer is now structural) and setsdata-click="true"explicitly on both new inner columns so CB recognises all three as click targets without waiting forapplyBehaviorOnto redecorate them. Clicking inside a sub-cell selects the sub-cell; clicking the parent's gutter/border area selects the parent. Added apc-gb-vsplit-parentmarker class to the parent for future styling hooks.
Internal
- Canvas iframe cache buster bumped:
v=0.5.5→v=0.5.8so existing canvas tabs pick up the new split logic without manual hard-refresh.
Coming next
- Per-column right-edge
+ ⋯ 🗑mini toolbar (matches the Figma design's visual paradigm — same trio that lives on the section toolbar, just oriented vertically and column-scoped). - Block picker with Add to Left / Add to Right tabs when invoked inside a split column.
- Section/column border colour scheme to match the design (peach for sections, dashed blue for active columns).
[0.9.8] — 2026-05-07
Fixed
- Documentation page TOC visually merged with the PageCraft tabs sidebar. The
pc-docs-layoutgrid had no padding so the TOC column sat flush against the white panel's left edge, leaving no visual gap between the addon's tabs sidebar and the docs TOC. Addedpc-page-body-equivalent padding (24px / 32px), a vertical divider on the right of the TOC, and tightened the TOC width from 240px → 220px. - Group banner missing in body. The User Guide / Developer Reference labels appeared in the TOC but the body just concatenated all sections with no break, so a reader scrolling through couldn't see when they crossed from User Guide into Developer Reference. Body now renders a pill-style "User Guide" / "Developer Reference" banner immediately before each group's first section.
- Markdown body typography tuned for tighter heading hierarchy (h1 24px / h2 17px / h3 14px) and slightly more generous line-height for paragraphs and lists.
- Narrow-viewport breakpoint widened from 800px → 900px so most laptop windows still get the two-column layout.
[0.9.7] — 2026-05-07
Added
- Comprehensive in-CP documentation. The CP → Add-Ons → PageCraft → Documentation page now renders an eleven-section guide split into a User Guide (Installation, Getting Started, Editing Sections, Nav Builder, Global Header & Footer, Grid Builder, Dynamic Content) and a Developer Reference (Editing Existing Templates, Importing Custom Templates, The Class Marker System, Template Tags Reference). A sticky left-rail TOC anchor-links every section. ~5,900 words total.
- Source of truth in
docs/. All documentation is authored as Markdown underdocs/at the addon root and rendered into CP at request time, so GitHub readers and content editors see the same content with no manual sync. Files:00-installation.mdthrough13-template-tags-reference.md, plusdocs/README.mdas the GitHub-facing index. Services/MarkdownRenderer.php— a 170-line in-house Markdown → safe HTML converter sized for the addon's needs (headings with slug ids, paragraphs, single-level lists, fenced and inline code, bold/italic, links). Rejectsjavascript:/data:URL schemes; allows http/https/mailto and relative paths.- Linked the existing
themes/user/pagecraft/developer-reference.htmlfrom the new documentation page so site builders can jump to the annotated HTML examples.
Changed
- Root
README.mdnow points atdocs/for the full guide instead of carrying inline tag references. Installation instructions condensed since ContentBox is bundled (the README previously asked users to install ContentBox separately, contradicting v0.9.1's vendor bundling).
[0.9.6] — 2026-05-06
Fixed
- Bloqs fieldtype parser annotations leaked into the editor canvas preview as visible text (
{!-- bloqs:start:95:0 --}/{!-- bloqs:end:95:0 --}). The existing strip inTemplatePreviewonly matched annotations whose tail was a 16+ char hex run (ra:HEX); Bloqs uses a numericstart:N:Nshape so it slipped through. Generalised the regex to match{!-- word(:token)+ --}where each token is alphanumeric/underscore/hyphen and contains no spaces — coversra:,bloqs:start:N:N,bloqs:end:N:N, and any future addon-style annotation, while still leaving legitimate human comments like{!-- TODO: fix this --}alone (those have spaces).
[0.9.5] — 2026-05-06
Fixed
template_listACT was never registered inexp_actionson existing installs, causinggetActionId('template_list')to return 0, which produced URLs likeindex.php?ACT=0(a 200-OK empty body) when the template-embed plugin tried to populate its dropdown. Two-part fix:- Added
template_listandtemplate_ingesttoPage_craft_upd::$actions(they were declared inaddon.setup.phpbut missing from the upd class, so EE never auto-inserted them on update flows). - New
ensureAllActionsRegistered()runs on every update: iterates$this->actionsand inserts any row missing fromexp_actions. Self-heals against any future ACT we forget to migrate. Idempotent.
- Added
[0.9.4] — 2026-05-06
Fixed
- Section picker silently lost Grid Builder + PageCraft (and every other PageCraft pack registered after a missing pack). The default
template_packssetting included the three Crafto packs (crafto-corporate,crafto-elements,crafto-premium), which we deliberately don't redistribute. On any install that didn't already own those packs, the canvas tried to loadcrafto-corporate/templates.js→ 404 → ContentBox's templateList processor halted on the JS error and never reached the entry that loadspagecraft-sections.js. Result: the canvas picker showed only Simple Start / Quick Start / Animated and skipped everything after the first missing pack — even though the data was correctly present in the DB and in the JS file. Two-part fix:- Default
template_packsno longer enables the Crafto packs. Users who own them can enable in CP → Add-Ons → PageCraft → Block Library. EditorFrame::process()now filters the templateList to packs whosetemplates.jsactually exists on disk (logs the skip to developer log). Self-heals against any future missing-file scenario.
- Default
- Canvas iframe cache bump
v=0.5.4 → v=0.5.5so existing entry-edit tabs pick up the new server-side template list on reload.
[0.9.3] — 2026-05-06
Added
- "Regenerate File" button on CP → Add-ons → PageCraft → Sections. Manually rewrites
pagecraft-sections.jsfrom the current DB contents and reports the outcome inline. Existed silently inPage_craft_upd::regenerateSectionsFile()before but failures were swallowed and there was no way to retry. Now surfaces the exact reason (e.g. "file is not writable by the PHP user — fix permissions on …") so remote-host installs can self-diagnose.
Fixed
SectionFileWriterno longer silently overwrites a non-empty bundled JS file with empty arrays when the DB has no categories/sections yet. Previously, running install/update on a fresh DB clobbered the bundledpagecraft-sections.js(which carries Grid Builder + PageCraft data out-of-box), leaving the canvas picker empty. The writer now refuses the destructive write, logs to the developer log, and returns success so the bundled file stays intact until real data exists.SectionFileWriterwrite failures now throw aRuntimeExceptionwith a permission-aware hint instead of silently returningfalse. The new "Regenerate File" CP button catches the exception and shows the real cause; install/update logs it and continues so the rest of the migration completes. Root cause of the remote-server "Grid Builder and Dynamic Content sections show in the manager but never on the canvas picker" report.
[0.9.2] — 2026-05-06
Added
- Seed default Grid Builder + PageCraft sections on install/update. The bundled
pagecraft-sections.jslisted Grid Builder columns (1–5 col, narrow/wide pairs) and the PageCraft "Dynamic Content" template-embed section, but neither the categories nor the sections existed inexp_pagecraft_section_categories/exp_pagecraft_sectionson a fresh install — so whenSectionFileWriterran it overwrote the bundled JS with empty arrays and the picker lost both categories. NewPage_craft_upd::seedDefaultSections()inserts them on every install and on every update; idempotent (matches existing rows by name and skips them, never touches user data).
Fixed
template-embedplugin's "Failed to load templates" surfaces the real error and is no longer selectable. When the template-list fetch returned an error or non-array shape, the plugin appendedFailed to load templatesas a regular<option>whose value defaulted to the text — selecting it (or any change event firing on it) saved that string as the entry's template path. Now the option isdisabled, the actual error message is appended (Failed to load templates: <reason>), and the underlying failure is logged toconsole.errorso remote-install issues are diagnosable from DevTools. Empty results render a separate disabled "No templates found on this site" option. Also added explicitcredentials: 'same-origin'to the fetch.
[0.9.1] — 2026-05-05
Added
- ContentBox.js vendor files now bundled in the repo. The full
themes/user/pagecraft/tree — ContentBox 5.x core, ContentBuilder, the front-end runtime, every stock asset directory (fonts, styles, scripts, modules, etc.), and the stock block / template packs (minimalist-blocks,templates-quick,templates-simple,templates-animated,coporate) — ships with the addon. Fresh installs are now self-contained: no separate ContentBox download required. Vendor files are redistributed under the Bison Digital developer license; downstream users redistributing must purchase their own. - Auto-regenerate
pagecraft-sections.json install/update. NewPage_craft_upd::regenerateSectionsFile()runsSectionFileWriter::write()after install and after every update, rewriting the section picker's JS data with the local install's actual theme URL. Fixes the case where a fresh download carried the snapshot URLs from another host.
Fixed
- Hardcoded
default_site/template directory broke template lookups on EE installs with a non-defaultsite_short_name. Three call sites (mod.page_craft.php::template_list,ft.page_craft.phptemplate-embed render,Services/TemplatePreview.php::loadTemplate) now readee()->config->item('site_short_name')and fall back todefault_siteonly when unset. This was the root cause of "Dynamic Content template selector fails to load templates" on remote installs. pagecraft-sections.jsshipped with absolutehttps://ee-pb.ddev.site/...thumbnail URLs, breaking the section picker on every install but the original dev box. Replaced with root-relative/themes/user/pagecraft/...paths so the file works out-of-box on any host before the writer ever regenerates it..gitignorecleaned up. Removed the ContentBox vendor exclusion section (since vendor files ship now). Added explicit ignores forthemes/user/pagecraft/imported/,assets/Archive.zip, and the third-party Crafto packs that aren't redistributable.- Theme README rewritten — single-step install instructions; no second-stage ContentBox manual install needed.
[0.9.0] — 2026-05-04
Added
- PageCraft theme assets ship in the addon repo. Previously the addon's
themes/user/pagecraft/shipped with only a README, leaving fresh GitHub installs without the custom plugins, block packs, and section templates the addon depends on. The repo now tracksassets/plugins/,assets/pagecraft-custom/,assets/monochrome-blocks/,assets/grid-builder/, andpagecraft-sections/. ContentBox vendor folders (fonts/,styles/,modules/, etc.) remain ignored and must still be installed separately per the theme README. - Per-item visual modal on
.nav-link(nav-menu plugin). Clicking a menu item in the canvas now shows a floating toolbar (Edit / Delete) and an Edit modal with the full visual field set: BG/Text colors, font size/weight, width, border style/thickness/radius, padding (L/R + T/B), and 4-side margins. Mirrors the existing.nav-btnmodal pattern. Submenu links (.submenu-link) share the same handler. Toolbar omits Delete whendata-cb-use-structure-nav="true"(Structure-mode menu set is read-only). - Per-item toolbar trimmed to 3 icons. CTA buttons show Edit / Link / Delete; menu items show Edit / Delete (or Edit only in Structure mode). The previous Duplicate icon on
.nav-btnwas removed for consistency.
Fixed
- Toolbar capture-guard no longer kills its own click handlers. The nav-menu plugin's editor-mode capture-phase guard at
index.js:1819previously called bothpreventDefault()ANDstopImmediatePropagation()on any<a>click inside the nav. The latter terminated the event before it could reach the.nav-btn/.nav-linkbubble-phase handlers, so the Edit/Link/Delete toolbar never appeared. RemovedstopImmediatePropagation();preventDefault()alone still blocks link navigation in editor mode. addon.setup.phpversion bump 0.8.0 → 0.9.0 so EE's update flow recognises that staging installs upgraded from older snapshots have a newer version available.CHANGELOG.mdbackfilled with previously undocumented 0.6.0 / 0.7.0 / 0.8.0 entries (see below) so the file no longer lags the codebase.
Internal
EditorFrame.phpcanvas cache version bumpedv=0.5.3 → v=0.5.4so iframes re-fetch with the toolbar fix.
[0.8.0] — 2026-05-04
Added
- Template Embed canvas preview. The editor canvas now renders the actual EE template HTML inside
data-cb-type="template-embed"blocks instead of a static placeholder. NewServices/TemplatePreview.phpextracts template lookup + parse so the editor preview ACT and the front-end render share one code path. Strips{!-- ra:HEX --}parser-internal markers; lazy-loadsee()->TMPLvia the EE library loader (TMPL is not auto-present in ACT context); zeroessession->member_idduring parse so{logged_in}/{logged_out}resolve to the public branch. Actions/TemplateRenderPreview.php— JSON ACT, output-buffered so stray PHP notices surface in{error}instead of corrupting the JSON envelope.- "PageCraft" section category + "Dynamic Content" section seeded for the picker so editors can drop a template-embed via Sections (not Blocks).
Changed
mod.page_craft.php::resolveTemplateEmbeds()refactored to callTemplatePreviewservice.- Both
mod.page_craft.phpandft.page_craft.phpresolvers now preferdata-pc-template-pathand fall back todata-cb-template-pathfor back-compat. Thedata-pc-*namespace survives ContentBox's openContentEditor clone-diff propagation; thedata-cb-*namespace was being silently stripped. Actions/EditorFrame.phpinjectswindow._pcTemplateRenderUrlinto the canvas iframe (mirrors the existing_pcTemplateListUrlpattern).
[0.7.0] — 2026-05-01
Added
- Structure-driven Navigation toggle on the nav-menu plugin. When enabled (
data-cb-use-structure-nav="true"), the rendered nav auto-generates from the EE Structure page tree (top level + 1 sublevel), respects each page's "Hidden in nav" flag, and orders by Structure's nested-setlft. Services/StructureNav.php— single source of truth for the nav data shape (entry_id,label,href,hasSubmenu,children).Actions/StructureNavPreview.php— JSON ACT consumed by the editor canvas for preview parity with the published render.mod.page_craft.php::global_header()/global_footer()call newmaybeInjectStructureNav()to swap nav-list contents at render time. Uses string scanning (not DOMDocument) to avoid mangling ContentBox HTML5 fragments. Addsaria-current="page"matchingee()->uri->uri_string().Actions/EditorFrame.phpinjectswindow._pcStructureNavUrlinto the canvas iframe.- Preview button on the publish-form toolbar — opens the entry's Structure URI in a new tab (resolves via
site_pageswith{base_url}/substitution).
Fixed
- Custom JS / Custom CSS robustness.
Actions/CustomJs.phpandActions/CustomCss.phpnow strip every<script>/<style>/<!-- -->tag (not just outer wrappers) so editors who paste compilations like<script>…</script><script>…</script>don't break ContentBox init. Cache headers tightened tono-store+no-cache+Pragmaso a stale broken response can't survive a fix. Actions/EditorFrame.php— custom_js is no longer injected into the canvas iframe (it requires front-end libs the canvas doesn't load — typicalReferenceErroron jQuery / Revolution slider halted ContentBox init).Actions/SaveGlobalComponent.phpstripsdata-cb-original-content(ContentBox's per-mount snapshot, otherwise restored on every load and clobbers fresh content) anddata-pc-manual-html(legacy backup attr that compounded encoding through repeated round-trips).ft.page_craft.php— when a field's saved HTML is empty, seed the canvas with a minimal.is-section+.is-overlay+.is-container.v2.is-content-1200.is-buildershell so ContentBox has a drop zone. Without this, drag-from-picker silently failed because there was nothing to drop into.
[0.6.0] — 2026-04-15
Added
- TemplateIngest — imports Crafto HTML template packs into the sections DB, rewrites asset URLs, auto-generates dark-background SVG thumbnails, and adds
is-subblock editmarkers for ContentBox inline editing. - PackImport — bulk JSON section/category import (replaces or skips existing).
- Grid Builder category — preset 1–5 column ContentBox row/column layout starters.
- Horizontal / Vertical split buttons in the ContentBox column "…" popup; vertical split divides the active column into stacked nested halves.
- Save as Section strips ContentBox editor UI artefacts (
is-tool,is-rowadd-tool,is-box-tool,contenteditable,data-click,draggable,box-select) before saving. SectionFileWriter— absolute thumbnail URLs supported via empty path config;is-subblock editinjected forpc-edit/pc-imgmarkers on JS regeneration.- Developer reference template added to
themes/user/pagecraft/.
Fixed
- Template picker thumbnails now render correctly (
path:''avoids double-URL). - Imported sections are editable immediately (
is-subblock editon allh*/p/img). - Split buttons now read
builder.activeCol/.cell-activecorrectly; removed brokenclosest('.column')mousedown approach.
[0.5.0] — 2026-04-11
Added
- Global Footer — lock/unlock a footer section as a site-wide component, mirroring the Global Header feature. Super admins see padlock icon buttons injected into the section toolbar (
.is-section-tool) when hovering any section taggeddata-pc-type="footer". Locking saves the section HTML + CSS toexp_pagecraft_global_components(component_key = footer) and renders it on all pages via{exp:page_craft:global_footer}. {exp:page_craft:global_footer}template tag — renders the locked global footer. Accepts the same parameters asglobal_header:wrapper,class,runtime. Returns empty string when no locked footer exists, making it safe to add to all templates unconditionally.- Quick Start footer templates tagged — all 9 footer section templates in
templates-quick/templates.jscarrydata-pc-type="footer"on their root.is-sectiondiv so the toolbar buttons appear automatically after inserting a footer from the template picker.
Changed
- Global Header lock/unlock moved to section toolbar — the Lock/Unlock buttons previously injected into the ContentBox
.submainsidebar panel (triggered by selecting the Navigation Menu block) are now injected into.is-section-toolinstead, matching the footer pattern. The buttons appear on hover of the nav-menu section, no sidebar interaction required. - Section toolbar cleanup — both header and footer save paths now strip
.is-tooland.is-rowadd-toolrow-level editor elements in addition to the existing section/column/element tool classes, preventing ContentBox editor controls from appearing in saved global component HTML. onChangefeedback loop resolved — the periodic autosavesetIntervalpreviously calledbuilder.html()for change comparison, which caused ContentBox to fireonChangeinternally, creating an infinite save loop. The interval now callsdebouncedSave()directly. An_isSavingguard also suppresses re-entrantonChangecallbacks during serialization.
Fixed
- SVG
classNameisSVGAnimatedString, not a plain string — calling.replace()on it threw a silentTypeErrorthat aborted the lock save handler. All class cleanup in save paths now usesgetAttribute('class')/setAttribute('class', …)instead. SaveGlobalComponent.phpskeleton check (previously required 2000 chars +data-cb-typeblocks) rejected all footer saves because footer sections are plain HTML without ContentBox data blocks. Relaxed to a simple 100-character minimum.
[0.3.0] — 2026-03-23
Added
- Per-field content library control — field settings now expose "Allowed Block
Packs" and "Allowed Block Categories" checkbox groups. Leaving both empty
inherits the global addon settings; selecting specific items restricts that
field to only the chosen packs and categories. Stored as JSON in
field_settings; empty string = inherit. field_idthreading — the editor frame URL now includes?field_id=N; bothEditorFrameandBlocksJsread that parameter and resolve per-field pack/ category settings before falling back to global settings.- Expanded
pack.jsonmanifest schema — packs can now declaredescription,author, andauthor_url. All three are optional and displayed in the settings page pack cards and the per-field allowed-packs checkbox labels. - Settings sidebar nav — CP settings split into four sub-pages (Global Settings, Editor Permissions, Advanced Settings, Documentation) accessed via a persistent left-hand sidebar nav, matching EE's native sidebar pattern.
- Color palette table — custom color palette upgraded from plain textarea to a structured swatch + hex + name table with drag-to-reorder rows and trash-icon delete buttons.
lock_colorssetting — new boolean toggle restricts editors to the custom palette only, hiding the free-pick color input in the editor.- Documentation sub-page — built-in reference for template tags and field tag usage, accessible from the sidebar nav.
Changed
- Settings page reorganized — sections now group by domain: General → Content Library (packs + categories combined) → Section Templates → Appearance (color palette, custom CSS/JS) → Permissions → Advanced (AI, canvas assets).
- Settings page CSS consolidated — all custom styles moved into a single
pageStyles()block injected viaee()->cp->add_to_head(). No more per-render inline<style>blocks or duplicated rules. - Native EE field types — Custom CSS, Custom JS, and Color Palette fields now
use
type: 'textarea'instead of raw HTML. CodeMirror and color swatch preview are applied progressively via a singlepageScripts()foot block. - Canvas Assets simplified — inputs now accept plain URLs instead of raw
<link>/<script>tags. The server generates the correct tag on save. Existing stored tags are migrated transparently on load via URL extraction. - Canvas Assets split — separate CSS and JS asset lists replace the single
mixed
canvas_assetslist. Existing entries are migrated by type on first load. - EE native classes — permissions table uses
mainTable; canvas asset "Add" buttons usebutton--default button--small. Custom CSS replaces all hardcoded#4d78d1with--pc-primaryCSS custom property. - Settings slideout removed — the cog button in the editor toolbar now links
directly to the addon settings page (
target="_blank") instead of opening an iframe slideout panel. Removes iframe coupling and aligns with EE CP conventions. - AI settings moved to Advanced — AI toggle and OpenRouter API key moved from the General section to a new Advanced section alongside Canvas Assets.
- Card grids unified — Block Categories and Section Template Packs grids now
use
pc-grid-wide(200 px minimum column width), matching the Installed Block Packs grid. - Equal-height card footers — cards use a flex column layout so the gray footer background always extends to the bottom of the card regardless of content length, keeping all cards in a row visually aligned.
- Pack card metadata — settings page pack cards now show description, linked author name, version, and category count on a single meta line.
[1.3.0] — 2026-03-17
Added
- Color palette — define brand hex colors in CP settings; passed as the
colorsarray to ContentBox so they appear as swatches in the color picker. One hex value per line; invalid values are silently ignored. - Canvas Assets manager — replace the single
editor_stylesheet_urlfield with separate CSS and JS asset lists. Each entry is a raw<link>or<script>tag injected into the editor canvas iframe. Also exposed on the front end via{pagecraft_css}and{pagecraft_js}template tags. - Settings slideout — a cog icon in the editor toolbar opens the addon settings page in a slide-in panel without leaving the publish form. (Replaced by a direct settings link in the next release.)
{pagecraft_css}and{pagecraft_js}template tags — output the Canvas Assets CSS/JS tags on the front end so canvas-specific files can be loaded for site visitors as well as editors.
Changed
editor_stylesheet_urlsetting superseded bycanvas_css_assetsandcanvas_js_assets. Existing single-URL values are read as a legacy fallback and migrated on first save.upd.page_craft.phpupdate()seedscanvas_css_assets,canvas_js_assets, andcolor_palettesettings rows for installs upgrading from 0.2.0.
[0.2.0] — 2026-03-17
Added
- Add-on block pack support — drop any block pack into
themes/user/pagecraft/assets/{pack-name}/with acontent.jsand apack.jsonmanifest and it is auto-discovered by PageCraft. Enable or disable it globally from CP > Add-Ons > PageCraft. pack.jsonmanifest format — declares pack name, version, contentJs filename, and a category map (id → {label, preview}). Built-in labels take priority for overlapping IDs; pack-only IDs are appended automatically.blocks_jsEE action (Actions/BlocksJs.php) — dynamically merges all active packs into a single JavaScript response served as ContentBox'ssnippetUrl. Uses IIFE scoping to preventvar data_basiccollisions across packs. Rewrites all image and thumbnail paths to absolute URLs server-side so ContentBox requires nosnippetPathorsnippetPathReplaceconfiguration.snippetCategoriespassed to ContentBox — controls which category tabs appear in the block picker and their display labels.- Installed Block Packs settings section — visual card grid showing every auto-discovered add-on pack with an enable/disable toggle, version, and category count.
- Global block category management — enable or disable any built-in or pack-only block category via a visual thumbnail grid in CP settings. Pack-only categories are shown with a source badge.
- Global section template pack management — enable or disable Simple Start, Quick Start, and Animated template packs individually.
- Role-based editor permissions — map each EE member role to a permission
level. Full gives access to all ContentBox features. Content hides
per-element settings panels (
elementTool: false) while preserving text editing, file uploads, and block insertion. Configured per-role in CP settings and enforced at editor load time. - Custom Editor Stylesheet URL — a global setting to inject any web-accessible CSS file into the ContentBox canvas iframe, so theme utility classes (e.g. a CSS framework) render correctly while editing.
Fixed
- Category IDs from
pack.jsonare JSON-decoded as PHP integers; these were passed as integers into the JavaScript filter array, causingArray.indexOf(String(category))to silently drop all pack-only snippets. All category IDs are now normalised to strings beforejson_encodeinBlocksJs,EditorFrame, and the MCP save handler. - Setting
basePathin the ContentBox constructor caused ContentBox to unconditionally overwrite the customsnippetUrlwith a hardcoded path to the built-incontent-plugins.js, so add-on packs were never loaded.basePathis removed; all paths are now passed explicitly. - UTF-8 BOM (
EF BB BF) at the start of add-on pack JS files caused a silent parse error when the content was placed inside an IIFE body. BOM bytes are now stripped before wrapping. - Path absolutization order in
absolutizePack— general path replacement now runs before thumbnail replacement to prevent absolute URLs injected in step 4 from being double-replaced in step 3. _snippets_pathin pack JS files is now set to an empty string rather than the absolute URL; ContentBox reads this variable as its effectivesnippetPathand was prepending it to already-absolute thumbnail paths, producing triple URLs.
Changed
upd.page_craft.phpupdate()method registers theblocks_jsaction and seeds new settings rows (block_categories,enabled_packs,template_packs,editor_permissions,editor_stylesheet_url) for existing installs upgrading from 0.1.0.
[0.1.0] — 2026-03-16
Initial beta release.
Added
- PageCraft fieldtype (
page_craft) — embeds a ContentBox.js visual page builder inside an ExpressionEngine publish-form iframe. - Upload action — proxies file uploads through EE's native upload library
so files are registered in
exp_filesand appear in the File Manager. - File picker bridge — opens EE's native file browser inside a ContentBox filePicker modal, allowing existing files to be inserted without re-uploading.
- Editor frame action — self-contained ContentBox editor page loaded inside
an
<iframe>to keep ContentBox UI scoped away from EE's CP chrome. - AI proxy actions (
ai_proxy,ai_proxy_stream) — proxies ContentBox AI Code Chat requests to OpenRouter, supporting streaming (SSE) and non-streaming modes. Configurable model lists in addon settings. template_post_parseextension — replaces{pagecraft_runtime}placeholder in EE templates with the ContentBox runtime<script>block, enabling plugin blocks on the front end.- Front-end template tags:
{field_name},{field_name type="html"},{field_name type="css"},{field_name type="maincss"},{field_name type="sectioncss"}. - Module template tags:
{exp:page_craft:render},{exp:page_craft:html},{exp:page_craft:css},{exp:page_craft:runtime_assets}. - Addon settings page — global upload directory, editor height, AI toggle, and OpenRouter API key (stored encrypted).
- Per-field overrides — upload directory and editor height can be overridden at the individual field level.
- Device preview toolbar — fullview (100 % canvas) default; device buttons constrain the canvas to desktop-lg, tablet-landscape, tablet, and mobile widths; expand button returns to fullview.
- All 32 ContentBox plugin blocks registered via
ContentBoxRuntimein both the editor canvas and on the front end. - CSRF-safe uploads:
X-Requested-With: XMLHttpRequestandX-CSRF-TOKENheaders sent with every upload request to satisfy EE's AJAX-exempt path.
Requirements
- ExpressionEngine 7.x
- PHP 8.1+
- ContentBox 5.x (installed separately into
themes/user/pagecraft/)