[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6GKJWX4VSD2PF1EB359KMWD":3,"skill-same:01M6GKJWX4VSD2PF1EB359KMWD":85},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":47,"repositoryHtmlUrl":48,"repositoryHomepageUrl":49,"ownerHtmlUrl":50,"ownerBlogUrl":51,"ownerDescription":6,"updatedAt":52,"install":53,"resources":66},"01M6GKJWX4VSD2PF1EB359KMWD","acorn-livewire",null,"Use when creating, wiring or fixing a Livewire 4 component in an Acorn app - make:livewire --class, app\u002FLivewire, wire:model modifiers (.live, .blur, .debounce), wire:key, attributes (#[Locked]\u002F#[Computed]\u002F#[Validate]\u002F#[On]), lifecycle hooks, @livewireScripts, the \u002Flivewire-\u003Chash>\u002Fupdate route, installing livewire\u002Flivewire on Radicle. For errors that start after a deploy (419, RangeError, stale HTML) use roots-debugging; for JSON endpoints use acorn-routes-api; for Alpine-only UI use tailwind-vite-assets.","hekivo\u002Fkivo-wise","hekivo","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F278159278?v=4","01M6GKH8S3Z4CAJ9RRR607G1WJ","Hekivo","01M6GKH8XNM7HTVF4DC86MA8RG",14,"MIT","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire\u002FSKILL.md",[],[19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"acorn livewire","livewire","only","routes-api","errors","attributes","app","alpine","route","endpoints","hooks","component","vite","use","model","json","Tailwind","api","lifecycle","debugging","2026-11-10 10:12:30",false,"---\nname: acorn-livewire\ndescription: Use when creating, wiring or fixing a Livewire 4 component in an Acorn app - make:livewire --class, app\u002FLivewire, wire:model modifiers (.live, .blur, .debounce), wire:key, attributes (#[Locked]\u002F#[Computed]\u002F#[Validate]\u002F#[On]), lifecycle hooks, @livewireScripts, the \u002Flivewire-\u003Chash>\u002Fupdate route, installing livewire\u002Flivewire on Radicle. For errors that start after a deploy (419, RangeError, stale HTML) use roots-debugging; for JSON endpoints use acorn-routes-api; for Alpine-only UI use tailwind-vite-assets.\n---\n\n# Livewire 4 under Acorn\n\nLivewire runs inside the Acorn application that your profile boots. There is no `roots\u002Facorn-livewire` package: you install `livewire\u002Flivewire` next to Acorn and Acorn discovers its service provider. Livewire 4 changed several v3 habits (endpoint URLs, `wire:model` modifiers, the generator default), so check the version first and read [references\u002Fstate-patterns.md](references\u002Fstate-patterns.md) before writing modifiers.\n\nRunner placeholders (`{{runner.wp}}`, `{{runner.acorn}}`, `{{runner.composer}}`, `{{runner.test}}`, `{{runner.cache}}`) come from the session context. On Lando they default to `lando wp`, `lando wp acorn`, `lando composer`, the project's test tooling and its cache-clear tooling. Run Composer from the Acorn base path (for an mu-plugin, pass `--working-dir=\u003Capp path>` when the runner starts at the repo root).\n\n## When to use\n\n- Server-validated forms, multi-step wizards, filters or search that query WordPress on input.\n- Wiring Livewire into a profile for the first time (Radicle has no Livewire by default).\n- A component does not mount, an action does nothing, the update request fails (404, 419, 500), or the page breaks right after a deploy.\n\nNot for: client-only UI (tabs, toggles, motion; use Alpine through `tailwind-vite-assets`), read-only data for a template (View Composer, `acorn-stack`), public JSON for JS (`acorn-routes-api`).\n\n## Inputs required\n\n1. Active profile, Acorn base path and PSR-4 namespace (session context).\n2. Livewire version from the app's `composer.lock` (`livewire\u002Flivewire`). This skill targets 4.x; for 3.x stop and say so.\n3. `config\u002Flivewire.php` in the base path, if published: `class_namespace`, `view_path`, `make_command.type`, `inject_assets`, `release_token`.\n4. The boot call (`Application::configure()...->boot()`): provider list and `withRouting(...)` arguments.\n5. Whether the page that renders the component sits behind a full-page or edge cache.\n\n### Profile differences\n\n| Item | `sage-theme` | `acorn-mu-plugin` | `radicle-app` |\n|---|---|---|---|\n| Installed by default | no | often (check `composer.lock`) | no |\n| Where Composer runs | theme folder | plugin folder | project root |\n| Provider | auto-discovered from the theme's `vendor\u002Fcomposer\u002Finstalled.json` (`extra.laravel.providers`) | auto-discovered from the plugin's vendor; many projects also list `\\Livewire\\LivewireServiceProvider::class` in `withProviders()` so a custom Livewire route provider can follow it | auto-discovered from the root vendor; app providers stay in `composer.json` `extra.acorn.providers` |\n| Boot file to touch | `functions.php` | the plugin's boot or configurator class | the tracked Acorn boot mu-plugin (write-guarded: show the diff and let the user apply it) |\n| Default class namespace | `App\\Livewire` | must match the plugin namespace: set `class_namespace` | `App\\Livewire` |\n| Layout for the directives | `resources\u002Fviews\u002Flayouts\u002Fapp.blade.php` in the theme | the plugin's layout, or each template that renders components | the theme layout under the root `resources\u002Fviews` |\n\n## Procedure\n\n1. **Check what exists.** Read `composer.lock`, `config\u002Flivewire.php` and the boot call. If Livewire is already installed, skip to step 4.\n2. **Install** (only when the user asked for Livewire):\n   - `{{runner.composer}} require livewire\u002Flivewire` in the base path.\n   - Livewire needs `APP_KEY`. Check it without printing it: `{{runner.wp}} eval 'var_dump((bool) config(\"app.key\"));'`. If false, run `{{runner.acorn}} key:generate` or ask the user to set it in the environment.\n   - If the provider is not picked up, rebuild the package manifest: `{{runner.acorn}} package:discover`.\n3. **Wire routing and assets.**\n   - Add `wordpress: true` to `withRouting(...)` as the Roots Livewire guide asks. Know the side effect: every WordPress page then runs the `wordpress` middleware group, a copy of `web` (session start, queued cookies). Check that cached pages do not start carrying a session `Set-Cookie`.\n   - Put `@livewireStyles` in `\u003Chead>` and `@livewireScripts` before `\u003C\u002Fbody>` of every layout that can render a component. Auto-injection (`inject_assets`, default `true`) listens to Laravel's `RequestHandled` event and only rewrites bodies that pass through the HTTP kernel with `\u003C\u002Fhtml>` in them: Acorn routes yes, WordPress-rendered templates no. The directives render once per request, so keeping both is safe.\n   - Publish the config only when you need to change it: `{{runner.acorn}} vendor:publish --tag=livewire:config`. On `acorn-mu-plugin` set `class_namespace` to `\u003CNamespace>\\Livewire`.\n4. **Generate the component with a class.** Livewire 4's generator defaults to a single-file component (`resources\u002Fviews\u002Fcomponents\u002F⚡name.blade.php`, config `make_command.type` = `sfc`). When the project uses classes:\n   ```bash\n   {{runner.acorn}} make:livewire PricingCalculator --class\n   # app\u002FLivewire\u002FPricingCalculator.php + resources\u002Fviews\u002Flivewire\u002Fpricing-calculator.blade.php\n   ```\n   Or set `'make_command' => ['type' => 'class']` in `config\u002Flivewire.php` once. Then `{{runner.cache}}`.\n5. **Write the class** with these rules (details in [references\u002Fstate-patterns.md](references\u002Fstate-patterns.md)):\n   - Public properties are the snapshot: scalars and arrays only, IDs instead of `WP_Post`\u002F`WP_Term`, never secrets.\n   - `#[Locked]` for values set at mount that the client must not change; `#[Computed]` for derived data; validation in `#[Validate]` or `rules()`.\n   - `booted()` for per-request context that must exist before any action (language, current site). Update requests are Acorn routes answered on `parse_request`: `init` has run; `template_redirect`, `wp_head` and `the_content` never run.\n   - Check capabilities inside actions (`current_user_can()`): any visitor can call any public method.\n6. **Write the view** with exactly one root element, `wire:key` on loop items, `wire:target` on every loading state, and `wire:ignore` around DOM owned by Alpine or third-party widgets ([references\u002Falpine-interop.md](references\u002Falpine-interop.md)).\n7. **Embed it** in Blade: `\u003Clivewire:pricing-calculator :plan=\"$plan\" \u002F>` or `@livewire('pricing-calculator', ['plan' => $plan], key($id))`. The name is the kebab-case class path (`Forms\\Contact` becomes `forms.contact`).\n8. **Plan for cached HTML.** If the page is edge- or page-cached, the first render is shared by every visitor: render neutral defaults and push per-visitor state after load with one action or one `Livewire.dispatch()`. Changing the set or order of public properties, or `APP_KEY`, breaks pages still served from cache; plan a purge with the release and consider a release token ([references\u002Fcommon-errors.md](references\u002Fcommon-errors.md)).\n9. **Uploads** need decisions first (disk, multiple replicas, media library): [references\u002Ffile-uploads.md](references\u002Ffile-uploads.md).\n\n## Verification\n\n- `{{runner.acorn}} route:list --path=livewire` lists `POST livewire-\u003Chash>\u002Fupdate`, `GET livewire-\u003Chash>\u002Flivewire.js` or `livewire.min.js` (minified when `app.debug` is false), the source maps and, when uploads are used, `upload-file` and `preview-file`. A project can replace the script and update routes with `Livewire::setScriptRoute()` \u002F `setUpdateRoute()`; the update route name must end in `livewire.update`.\n- In the browser, the Network tab shows `POST \u002Flivewire-\u003Chash>\u002Fupdate` returning 200 and the console has no `[wire:model=\"x\"] property does not exist` warning.\n- The rendered HTML contains the Livewire `\u003Cscript>` once, and its update URI has no unexpected path prefix (multilingual plugin, subdirectory install).\n- Component tests instantiate the class directly, or use `Livewire::test()` when the project's test setup boots Acorn; run them with `{{runner.test}}`.\n\n## Failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| Component markup renders but nothing reacts | Livewire script missing on a WordPress-rendered page (auto-injection does not reach it) | Add `@livewireScripts` \u002F `@livewireStyles` to the layout |\n| `Unable to find component` | Class outside `class_namespace`, wrong kebab name, or a stray `⚡` single-file component | Fix the namespace or name; regenerate with `--class`; dump autoload in the base path |\n| `POST …\u002Fupdate` returns 404 in curl but works in the browser | `RequireLivewireHeaders` aborts with 404 when the `X-Livewire` header is missing | Not a routing bug; test from the browser or send the header |\n| 404 on `\u002Flivewire-\u003Chash>\u002F…` from cached pages | `APP_KEY` changed (the hash derives from it), or a language or subdirectory prefix reached the URL | Keep the key identical on every instance; purge cached HTML; pin the root URL if a plugin rewrites `home_url()` |\n| 419 \"This page has expired\" | Acorn's `web` group runs no CSRF check; 419 here means release-token mismatch, a corrupt snapshot checksum (`APP_KEY` differs), a client write to a `#[Locked]` property, or a type error on a typed property | Reload a fresh copy; align `APP_KEY`; do not raise session lifetime |\n| `RangeError: Maximum call stack size exceeded` in `dataSet` right after a deploy | Cached HTML carries a snapshot whose public-property order or set no longer matches the class | Purge the cache; avoid reordering public properties; use a release token |\n| A field change never reaches `updated()` | v4 `wire:model.blur` \u002F `.change` \u002F `.enter` only sync the client value; no request is sent | Use `.live.blur`, or call an action |\n| Values flip back or DOM is clobbered | Several `$wire.prop = …` writes in flight, missing `wire:key`, or no `wire:ignore` on third-party DOM | One batched action; add keys; add `wire:ignore` |\n| Strings switch language after the first interaction | The update URL carries no language context | Capture the language at mount (`#[Locked]`) and switch to it in `booted()` |\n\nMore symptoms and diagnostics: [references\u002Fcommon-errors.md](references\u002Fcommon-errors.md).\n\n## Escalation\n\n- The cause is not Livewire (500 on every request, Acorn does not boot, assets 404): `roots-debugging`.\n- The fix needs a cache purge, a key rotation or an edge configuration change: stop and ask; those are operational decisions.\n- Livewire 3 in the lock file, or a request to upgrade from 3 to 4: report the version and ask before migrating.\n- A pure JSON need with no server-rendered UI: `acorn-routes-api`.\n\n\u003C!-- verified:\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FMechanisms\u002FHandleRequests\u002FEndpointResolver.php:15 — prefix '\u002Flivewire-' . substr(sha256(app.key . 'livewire-endpoint'), 0, 8); :25 \u002Fupdate; :33 livewire.js | livewire.min.js\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FMechanisms\u002FFrontendAssets\u002FFrontendAssets.php:25-27 — minified script route unless app.debug; :113 styles render once per request\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FFeatures\u002FSupportAutoInjectedAssets\u002FSupportAutoInjectedAssets.php:24,55,65 — injection on RequestHandled, only when body contains \u003C\u002Fhtml>, honours inject_assets\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FApplication\u002FConcerns\u002FBootable.php:179-206 — wordpress catch-all route; :243-244 other routes handled on parse_request; :253-284 WordPress output flushed at shutdown outside the response body\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FConfiguration\u002FMiddleware.php:88 — PreventRequestForgery commented out in web; :100 wordpress group = web\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FPackageManifest.php:84 — extra.acorn ?? extra.laravel discovered; Application.php:255-273 composer paths = base path, content root, theme, active plugins\nvendor\u002Flivewire\u002Flivewire\u002Fcomposer.json:47-50 — extra.laravel.providers LivewireServiceProvider\nvendor\u002Flivewire\u002Flivewire\u002Fconfig\u002Flivewire.php:72 make_command.type 'sfc'; :182 inject_assets true; :250 release_token 'a'\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FFeatures\u002FSupportConsoleCommands\u002FCommands\u002FMakeCommand.php:64,92 — default type from config, --class option\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FMechanisms\u002FHandleRequests\u002FHandleRequests.php:99-111 — update route forced into web + RequireLivewireHeaders, name ends livewire.update; :211 TypeError -> 419\nCorruptComponentPayloadException.php:30, CannotUpdateLockedPropertyException.php:20, LivewireReleaseTokenMismatchException.php:12 — 419 responses\nvendor\u002Flivewire\u002Flivewire\u002Fdist\u002Flivewire.js:15565-15650 — wire:model modifiers split around .live (4.3.5)\nroots-docs acorn\u002Fusing-livewire-with-wordpress.md — composer require, key:generate, withRouting(wordpress: true), directives in layout\nradicle-app facts checked against a licensed local Radicle project; not reproduced here\n-->\n","# Livewire 4 under Acorn\n\nLivewire runs inside the Acorn application that your profile boots. There is no `roots\u002Facorn-livewire` package: you install `livewire\u002Flivewire` next to Acorn and Acorn discovers its service provider. Livewire 4 changed several v3 habits (endpoint URLs, `wire:model` modifiers, the generator default), so check the version first and read [references\u002Fstate-patterns.md](references\u002Fstate-patterns.md) before writing modifiers.\n\nRunner placeholders (`{{runner.wp}}`, `{{runner.acorn}}`, `{{runner.composer}}`, `{{runner.test}}`, `{{runner.cache}}`) come from the session context. On Lando they default to `lando wp`, `lando wp acorn`, `lando composer`, the project's test tooling and its cache-clear tooling. Run Composer from the Acorn base path (for an mu-plugin, pass `--working-dir=\u003Capp path>` when the runner starts at the repo root).\n\n## When to use\n\n- Server-validated forms, multi-step wizards, filters or search that query WordPress on input.\n- Wiring Livewire into a profile for the first time (Radicle has no Livewire by default).\n- A component does not mount, an action does nothing, the update request fails (404, 419, 500), or the page breaks right after a deploy.\n\nNot for: client-only UI (tabs, toggles, motion; use Alpine through `tailwind-vite-assets`), read-only data for a template (View Composer, `acorn-stack`), public JSON for JS (`acorn-routes-api`).\n\n## Inputs required\n\n1. Active profile, Acorn base path and PSR-4 namespace (session context).\n2. Livewire version from the app's `composer.lock` (`livewire\u002Flivewire`). This skill targets 4.x; for 3.x stop and say so.\n3. `config\u002Flivewire.php` in the base path, if published: `class_namespace`, `view_path`, `make_command.type`, `inject_assets`, `release_token`.\n4. The boot call (`Application::configure()...->boot()`): provider list and `withRouting(...)` arguments.\n5. Whether the page that renders the component sits behind a full-page or edge cache.\n\n### Profile differences\n\n| Item | `sage-theme` | `acorn-mu-plugin` | `radicle-app` |\n|---|---|---|---|\n| Installed by default | no | often (check `composer.lock`) | no |\n| Where Composer runs | theme folder | plugin folder | project root |\n| Provider | auto-discovered from the theme's `vendor\u002Fcomposer\u002Finstalled.json` (`extra.laravel.providers`) | auto-discovered from the plugin's vendor; many projects also list `\\Livewire\\LivewireServiceProvider::class` in `withProviders()` so a custom Livewire route provider can follow it | auto-discovered from the root vendor; app providers stay in `composer.json` `extra.acorn.providers` |\n| Boot file to touch | `functions.php` | the plugin's boot or configurator class | the tracked Acorn boot mu-plugin (write-guarded: show the diff and let the user apply it) |\n| Default class namespace | `App\\Livewire` | must match the plugin namespace: set `class_namespace` | `App\\Livewire` |\n| Layout for the directives | `resources\u002Fviews\u002Flayouts\u002Fapp.blade.php` in the theme | the plugin's layout, or each template that renders components | the theme layout under the root `resources\u002Fviews` |\n\n## Procedure\n\n1. **Check what exists.** Read `composer.lock`, `config\u002Flivewire.php` and the boot call. If Livewire is already installed, skip to step 4.\n2. **Install** (only when the user asked for Livewire):\n   - `{{runner.composer}} require livewire\u002Flivewire` in the base path.\n   - Livewire needs `APP_KEY`. Check it without printing it: `{{runner.wp}} eval 'var_dump((bool) config(\"app.key\"));'`. If false, run `{{runner.acorn}} key:generate` or ask the user to set it in the environment.\n   - If the provider is not picked up, rebuild the package manifest: `{{runner.acorn}} package:discover`.\n3. **Wire routing and assets.**\n   - Add `wordpress: true` to `withRouting(...)` as the Roots Livewire guide asks. Know the side effect: every WordPress page then runs the `wordpress` middleware group, a copy of `web` (session start, queued cookies). Check that cached pages do not start carrying a session `Set-Cookie`.\n   - Put `@livewireStyles` in `\u003Chead>` and `@livewireScripts` before `\u003C\u002Fbody>` of every layout that can render a component. Auto-injection (`inject_assets`, default `true`) listens to Laravel's `RequestHandled` event and only rewrites bodies that pass through the HTTP kernel with `\u003C\u002Fhtml>` in them: Acorn routes yes, WordPress-rendered templates no. The directives render once per request, so keeping both is safe.\n   - Publish the config only when you need to change it: `{{runner.acorn}} vendor:publish --tag=livewire:config`. On `acorn-mu-plugin` set `class_namespace` to `\u003CNamespace>\\Livewire`.\n4. **Generate the component with a class.** Livewire 4's generator defaults to a single-file component (`resources\u002Fviews\u002Fcomponents\u002F⚡name.blade.php`, config `make_command.type` = `sfc`). When the project uses classes:\n   ```bash\n   {{runner.acorn}} make:livewire PricingCalculator --class\n   # app\u002FLivewire\u002FPricingCalculator.php + resources\u002Fviews\u002Flivewire\u002Fpricing-calculator.blade.php\n   ```\n   Or set `'make_command' => ['type' => 'class']` in `config\u002Flivewire.php` once. Then `{{runner.cache}}`.\n5. **Write the class** with these rules (details in [references\u002Fstate-patterns.md](references\u002Fstate-patterns.md)):\n   - Public properties are the snapshot: scalars and arrays only, IDs instead of `WP_Post`\u002F`WP_Term`, never secrets.\n   - `#[Locked]` for values set at mount that the client must not change; `#[Computed]` for derived data; validation in `#[Validate]` or `rules()`.\n   - `booted()` for per-request context that must exist before any action (language, current site). Update requests are Acorn routes answered on `parse_request`: `init` has run; `template_redirect`, `wp_head` and `the_content` never run.\n   - Check capabilities inside actions (`current_user_can()`): any visitor can call any public method.\n6. **Write the view** with exactly one root element, `wire:key` on loop items, `wire:target` on every loading state, and `wire:ignore` around DOM owned by Alpine or third-party widgets ([references\u002Falpine-interop.md](references\u002Falpine-interop.md)).\n7. **Embed it** in Blade: `\u003Clivewire:pricing-calculator :plan=\"$plan\" \u002F>` or `@livewire('pricing-calculator', ['plan' => $plan], key($id))`. The name is the kebab-case class path (`Forms\\Contact` becomes `forms.contact`).\n8. **Plan for cached HTML.** If the page is edge- or page-cached, the first render is shared by every visitor: render neutral defaults and push per-visitor state after load with one action or one `Livewire.dispatch()`. Changing the set or order of public properties, or `APP_KEY`, breaks pages still served from cache; plan a purge with the release and consider a release token ([references\u002Fcommon-errors.md](references\u002Fcommon-errors.md)).\n9. **Uploads** need decisions first (disk, multiple replicas, media library): [references\u002Ffile-uploads.md](references\u002Ffile-uploads.md).\n\n## Verification\n\n- `{{runner.acorn}} route:list --path=livewire` lists `POST livewire-\u003Chash>\u002Fupdate`, `GET livewire-\u003Chash>\u002Flivewire.js` or `livewire.min.js` (minified when `app.debug` is false), the source maps and, when uploads are used, `upload-file` and `preview-file`. A project can replace the script and update routes with `Livewire::setScriptRoute()` \u002F `setUpdateRoute()`; the update route name must end in `livewire.update`.\n- In the browser, the Network tab shows `POST \u002Flivewire-\u003Chash>\u002Fupdate` returning 200 and the console has no `[wire:model=\"x\"] property does not exist` warning.\n- The rendered HTML contains the Livewire `\u003Cscript>` once, and its update URI has no unexpected path prefix (multilingual plugin, subdirectory install).\n- Component tests instantiate the class directly, or use `Livewire::test()` when the project's test setup boots Acorn; run them with `{{runner.test}}`.\n\n## Failure modes\n\n| Symptom | Cause | Fix |\n|---|---|---|\n| Component markup renders but nothing reacts | Livewire script missing on a WordPress-rendered page (auto-injection does not reach it) | Add `@livewireScripts` \u002F `@livewireStyles` to the layout |\n| `Unable to find component` | Class outside `class_namespace`, wrong kebab name, or a stray `⚡` single-file component | Fix the namespace or name; regenerate with `--class`; dump autoload in the base path |\n| `POST …\u002Fupdate` returns 404 in curl but works in the browser | `RequireLivewireHeaders` aborts with 404 when the `X-Livewire` header is missing | Not a routing bug; test from the browser or send the header |\n| 404 on `\u002Flivewire-\u003Chash>\u002F…` from cached pages | `APP_KEY` changed (the hash derives from it), or a language or subdirectory prefix reached the URL | Keep the key identical on every instance; purge cached HTML; pin the root URL if a plugin rewrites `home_url()` |\n| 419 \"This page has expired\" | Acorn's `web` group runs no CSRF check; 419 here means release-token mismatch, a corrupt snapshot checksum (`APP_KEY` differs), a client write to a `#[Locked]` property, or a type error on a typed property | Reload a fresh copy; align `APP_KEY`; do not raise session lifetime |\n| `RangeError: Maximum call stack size exceeded` in `dataSet` right after a deploy | Cached HTML carries a snapshot whose public-property order or set no longer matches the class | Purge the cache; avoid reordering public properties; use a release token |\n| A field change never reaches `updated()` | v4 `wire:model.blur` \u002F `.change` \u002F `.enter` only sync the client value; no request is sent | Use `.live.blur`, or call an action |\n| Values flip back or DOM is clobbered | Several `$wire.prop = …` writes in flight, missing `wire:key`, or no `wire:ignore` on third-party DOM | One batched action; add keys; add `wire:ignore` |\n| Strings switch language after the first interaction | The update URL carries no language context | Capture the language at mount (`#[Locked]`) and switch to it in `booted()` |\n\nMore symptoms and diagnostics: [references\u002Fcommon-errors.md](references\u002Fcommon-errors.md).\n\n## Escalation\n\n- The cause is not Livewire (500 on every request, Acorn does not boot, assets 404): `roots-debugging`.\n- The fix needs a cache purge, a key rotation or an edge configuration change: stop and ask; those are operational decisions.\n- Livewire 3 in the lock file, or a request to upgrade from 3 to 4: report the version and ask before migrating.\n- A pure JSON need with no server-rendered UI: `acorn-routes-api`.\n\n\u003C!-- verified:\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FMechanisms\u002FHandleRequests\u002FEndpointResolver.php:15 — prefix '\u002Flivewire-' . substr(sha256(app.key . 'livewire-endpoint'), 0, 8); :25 \u002Fupdate; :33 livewire.js | livewire.min.js\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FMechanisms\u002FFrontendAssets\u002FFrontendAssets.php:25-27 — minified script route unless app.debug; :113 styles render once per request\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FFeatures\u002FSupportAutoInjectedAssets\u002FSupportAutoInjectedAssets.php:24,55,65 — injection on RequestHandled, only when body contains \u003C\u002Fhtml>, honours inject_assets\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FApplication\u002FConcerns\u002FBootable.php:179-206 — wordpress catch-all route; :243-244 other routes handled on parse_request; :253-284 WordPress output flushed at shutdown outside the response body\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FConfiguration\u002FMiddleware.php:88 — PreventRequestForgery commented out in web; :100 wordpress group = web\nvendor\u002Froots\u002Facorn\u002Fsrc\u002FRoots\u002FAcorn\u002FPackageManifest.php:84 — extra.acorn ?? extra.laravel discovered; Application.php:255-273 composer paths = base path, content root, theme, active plugins\nvendor\u002Flivewire\u002Flivewire\u002Fcomposer.json:47-50 — extra.laravel.providers LivewireServiceProvider\nvendor\u002Flivewire\u002Flivewire\u002Fconfig\u002Flivewire.php:72 make_command.type 'sfc'; :182 inject_assets true; :250 release_token 'a'\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FFeatures\u002FSupportConsoleCommands\u002FCommands\u002FMakeCommand.php:64,92 — default type from config, --class option\nvendor\u002Flivewire\u002Flivewire\u002Fsrc\u002FMechanisms\u002FHandleRequests\u002FHandleRequests.php:99-111 — update route forced into web + RequireLivewireHeaders, name ends livewire.update; :211 TypeError -> 419\nCorruptComponentPayloadException.php:30, CannotUpdateLockedPropertyException.php:20, LivewireReleaseTokenMismatchException.php:12 — 419 responses\nvendor\u002Flivewire\u002Flivewire\u002Fdist\u002Flivewire.js:15565-15650 — wire:model modifiers split around .live (4.3.5)\nroots-docs acorn\u002Fusing-livewire-with-wordpress.md — composer require, key:generate, withRouting(wordpress: true), directives in layout\nradicle-app facts checked against a licensed local Radicle project; not reproduced here\n-->\n",{"name":5,"description":7},"main","4045a2f672c1d4c1b4a5a5712b468c5d73ca6724","plugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire",0,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise","https:\u002F\u002Fhekivo.github.io\u002Fkivo-wise\u002F","https:\u002F\u002Fgithub.com\u002Fhekivo","https:\u002F\u002Fhekivo.dev","2026-11-08 06:10:39",{"source":8,"skillName":5,"commands":54,"prompt":64,"zipAvailable":65},[55,58,61],{"tool":56,"command":57},"npx","npx skills add hekivo\u002Fkivo-wise --skill acorn-livewire",{"tool":59,"command":60},"bunx","bunx skills add hekivo\u002Fkivo-wise --skill acorn-livewire",{"tool":62,"command":63},"pnpm","pnpm dlx skills add hekivo\u002Fkivo-wise --skill acorn-livewire","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire\u002FSKILL.md",true,[67,73,77,81],{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"references\u002Falpine-interop.md","REFERENCE","参考文档",3285,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire\u002Freferences\u002Falpine-interop.md",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"references\u002Fcommon-errors.md",6513,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire\u002Freferences\u002Fcommon-errors.md",{"path":78,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":79,"sourceHtmlUrl":80},"references\u002Ffile-uploads.md",3499,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire\u002Freferences\u002Ffile-uploads.md",{"path":82,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Fstate-patterns.md",6426,"https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fplugins\u002Fkivo-wise\u002Fskills\u002Facorn-livewire\u002Freferences\u002Fstate-patterns.md",[86,109,124,145,162,186],{"skillNo":87,"name":88,"nameZh":6,"description":89,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":90,"categories":91,"keywords":92,"publishedAt":39},"01M6GKWJDFKQM27HTFXX20QVTP","wp-rest-api","Use when building, extending, or debugging WordPress REST API endpoints\u002Froutes: register_rest_route, WP_REST_Controller\u002Fcontroller classes, schema\u002Fargument validation, permission_callback\u002Fauthentication, response shaping, register_rest_field\u002Fregister_meta, or exposing CPTs\u002Ftaxonomies via show_in_rest.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fthird-party\u002Fwp-rest-api\u002FSKILL.md",[],[93,36,94,95,96,97,38,98,99,100,101,102,103,32,104,105,27,106,107,108],"REST","wp rest api","rest api","wordpress","workflows","authentication","Meta","controller","Bash","shaping","filesystem","schema","show","register","with","wp-cli",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":39},"01M6GKWEA5BMJZ2RPPEEJTCC3N","wp-abilities-api","Use when working with the WordPress Abilities API (wp_register_ability, wp_register_ability_category, \u002Fwp-json\u002Fwp-abilities\u002Fv1\u002F*, @wordpress\u002Fabilities) including defining abilities, categories, meta, REST exposure, and permissions checks for clients.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fthird-party\u002Fwp-abilities-api\u002FSKILL.md",[],[36,116,117,96,97,118,99,93,101,119,34,103,120,32,106,121,122,107,123,108],"wp abilities api","cli","permissions","php","node","targets","clients","categories",{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":39},"01M6GKWA4GG2BZRFXCR9E73VR7","wp-security-escaping","Use when writing or reviewing code that outputs data, handles input or checks permissions in a WordPress + Acorn project - Blade {{ }} vs {!! !!}, esc_html, esc_attr, esc_url, wp_kses_post, \"&#038; in the URL\", double escaping, sanitize_text_field, nonces, current_user_can, map_meta_cap, permission_callback, $wpdb->prepare, whereRaw, file uploads, escaping ACF values, secrets in .env. For route middleware use acorn-routes-api; for ACF validation use acf-native; for Livewire actions use acorn-livewire.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-security-escaping\u002FSKILL.md",[],[131,132,133,134,135,118,136,99,36,137,20,138,139,27,140,141,142,143,144,22],"security","wp security","wp security escaping","writing","code","actions","secrets","text","cap","map","project","middleware","native","URL",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":39},"01M6GKW6VVY73BMZ3JNDMR4CWZ","wp-phpstan","Use when configuring, running or fixing PHPStan in a WordPress project that uses Acorn - phpstan.neon, baseline, szepeviktor\u002Fphpstan-wordpress stubs, larastan, level raising, \"Cannot access property on mixed\", get_field() types, paths for app\u002F. For Pint or Mago formatting use testing-wp; for runtime errors use roots-debugging.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-phpstan\u002FSKILL.md",[],[152,153,96,38,154,155,32,141,156,157,158,159,25,160,161,23],"wp phpstan","testing","baseline","access","get","neon","runtime","formatting","paths","types",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":39},"01M6GKW3JRSRS9N112QFA3SEGT","wp-performance","Use when a WordPress page, query or request is slow or needs profiling - TTFB, slow or N+1 queries, Query Monitor, Server-Timing, wp profile and wp doctor, autoloaded options, Redis object cache hit rate, transients, WP_CACHE_KEY_SALT. Adds the runner and Redis notes on top of the official procedure. For Eloquent query design use acorn-data; for PHP type errors use wp-phpstan.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-performance\u002FSKILL.md",[],[169,170,171,96,172,173,174,175,176,177,178,179,180,32,181,182,183,184,185,23],"performance","wp performance","design","query design","official","notes","monitor","doctor","cache","server","redis","page","queries","runner","query","type","timing",{"skillNo":187,"name":188,"nameZh":6,"description":189,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":190,"categories":191,"keywords":192,"publishedAt":39},"01M6GKVZN243XQB5QWZ5ZKMG7P","wp-hooks-lifecycle","Use when adding, moving or debugging WordPress actions and filters in an Acorn project - add_action\u002Fadd_filter priority and accepted_args, where a hook belongs (setup or filters files vs a provider boot()), load order (mu-plugins, plugins_loaded, after_setup_theme, init), when Acorn boots per profile, hooks that never fire on Acorn routes, REST or Livewire requests (template_redirect, wp_head), save_post firing twice in the block editor, the_content priorities. For ACF hooks use acf-native; for provider structure use acorn-stack.","https:\u002F\u002Fgithub.com\u002Fhekivo\u002Fkivo-wise\u002Fblob\u002Fmain\u002Fskills\u002Fwp-hooks-lifecycle\u002FSKILL.md",[],[37,29,193,96,194,195,38,136,93,196,20,32,197,198,199,200,201,141,202,203],"wp hooks lifecycle","init","boot","stack","never","filters","files","provider","structure","filter","theme"]