Skip to content

Troubleshooting

Laravel Livewire Documentation Reference

Since Magewire is heavily inspired by Laravel Livewire, many concepts are either identical or very similar. To avoid duplicating documentation, this page only covers Magewire-specific and platform-specific details. For all general concepts and in-depth explanations, you can refer to the corresponding Laravel Livewire documentation.

Livewire Reference

Magewire never initializes

  1. Confirm Magewirephp_Magewire and the appropriate theme companion module are enabled.
  2. Inspect the merged page layout for the root magewire block and magewire.alpinejs.components.magewire-script storefront loader.
  3. Verify the deployed asset exists below vendor/magewirephp/magewire/src/view/base/web/js/ and is available through Magento static content.
  4. Check the first browser-console error; an earlier theme error can prevent Alpine and Magewire initialization.

magewire.script is an admin companion-package block, not the core storefront asset name.

Stale or broken compiled templates

Clear Magewire's compiled view cache:

bin/magento magewire:compile:clear

Scope it when only one area is affected:

bin/magento magewire:compile:clear --area frontend

Compiled files live below var/magewire/views/{area}/. Do not edit them directly.

Checksum mismatch

  • Reload the page after app/etc/env.php's crypt/key changes or after restoring an environment backup.
  • Purge full-page caches that can serve snapshots signed with an earlier key or generated by incompatible code.
  • Check proxies and middleware for request-body rewriting.

Alpine starts twice

Install and configure the proper theme compatibility package. With Hyvä, let magewirephp/magewire-hyva-theme choose Magewire's bundled Alpine on component pages and Hyvä's Alpine elsewhere. Do not globally remove the theme loader.

A Livewire 3 example fails

Confirm the feature is registered by Magewire. The dist/ tree contains unregistered ported classes, so source presence is not proof of support. Form objects, the full Livewire validation feature, file uploads, navigation, and Component::js() are not active Magewire APIs in the current release.

Request rejected before the component runs

Inspect the response status and X-Magewire-Message-Severity header. A registered request filter, including request-scoped rate limiting, may reject before reconstruction. An unmarked 500 response remains a normal server failure and should be diagnosed in Magento logs rather than shown to the customer.

Admin components never mount

Confirm Magewirephp_MagewireAdmin is enabled and that setup:upgrade ran after installation. The currently tagged admin package also contains an obsolete rate-limit block reference; see Admin Rate Limiting.

Reporting a reproducible bug

Include the Magewire tag, companion-package tags, Magento or Mage-OS version, PHP version, area/theme, minimal component and layout XML, response status/body, and the first relevant browser or Magento error. Report security vulnerabilities privately rather than through an issue.