Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/tombroucke/acorn-wpml-livewire-fix/archive/refs/heads/main.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Fixes broken Livewire asset and update URLs when using WPML (or TranslatePress) with Acorn v5.1+.
The problem
Acorn calls URL::forceRootUrl(home_url()) to set the Laravel root URL. WPML filters home_url() to append the current language prefix (e.g. /fr), causing:
livewire.jsto 404/livewire/updateto contain the language segment repeated 3× (e.g.https://example.com/fr/fr/fr/livewire/update)
Installation
1. Require the package:
composer require tombroucke/acorn-wpml-livewire-fix
2. Patch Acorn (until roots/acorn#570 is merged):
Add to composer.json:
"require": {
"cweagans/composer-patches": "^2.0"
},
"config": {
"allow-plugins": {
"cweagans/composer-patches": true
}
},
"extra": {
"patches": {
"roots/acorn": [
{
"description": "Add do_action hooks around URL::forceRootUrl for WPML compatibility",
"url": "https://patch-diff.githubusercontent.com/raw/roots/acorn/pull/570.patch"
}
]
}
}
Then apply:
composer reinstall roots/acorn