Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Static Cache and Livewire - multiple instances running #11173

Closed
HannesEURESA opened this issue Nov 26, 2024 · 3 comments
Closed

Static Cache and Livewire - multiple instances running #11173

HannesEURESA opened this issue Nov 26, 2024 · 3 comments
Labels

Comments

@HannesEURESA
Copy link

Bug description

If we activate half measure Static Caching and on the Statamic Sites are Livewire Components included, even with the nocache Tag the Components aren´t rendering good. And the console show the Error Detected multiple instances of Livewire and Alpine running.

So the Components can´t be rendered well and they be broken. It works on Lokal Environment, but on Production it´s not working.

We don´t want to exclude the whole Page/URL , because it´s the HomePage. (example.com/) So it should be very fast to reach.

How to reproduce

Livewire Component included into antlers.html and show on Statamic Website URL which is cached half Static.
image

Logs

No response

Environment

Environment
Application Name: EURESAreisen
Laravel Version: 11.33.2
PHP Version: 8.3.4
Composer Version: 2.7.2
Environment: production
Debug Mode: ENABLED
URL: euresa-reisen.app.test
Maintenance Mode: OFF
Timezone: UTC
Locale: de

Cache
Config: NOT CACHED
Events: CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: database
Database: mysql
Logs: stack / single
Mail: ses
Queue: database
Session: database

Livewire
Livewire: v3.5.12

Statamic
Addons: 8
Sites: 1
Stache Watcher: Disabled (auto)
Static Caching: half
Version: 5.39.0 PRO

Statamic Addons
jonassiewertsen/statamic-live-search: 2.1.1
jonassiewertsen/statamic-livewire: 3.8.1
rias/statamic-redirect: 3.8.2
statamic/eloquent-driver: 4.18.0
stillat/antlers-components: 2.3.0
studio1902/statamic-peak-browser-appearance: 3.5.0
studio1902/statamic-peak-seo: 8.17.0
studio1902/statamic-peak-tools: 6.4.0

Statamic Eloquent Driver
Asset Containers: file
Assets: file
Blueprints: file
Collection Trees: eloquent
Collections: eloquent
Entries: eloquent
Forms: eloquent
Global Sets: file
Global Variables: file
Navigation Trees: eloquent
Navigations: eloquent
Revisions: file
Sites: file
Taxonomies: eloquent
Terms: eloquent
Tokens: file

Installation

Fresh statamic/statamic site via CLI

Additional details

No response

@duncanmcclean
Copy link
Member

duncanmcclean commented Nov 26, 2024

This isn't a Statamic issue - it's an issue with the Livewire addon you have installed.

It looks like there's an existing issue open on the addon's repository for this same issue, it might be worth following it: #71.

@HannesEURESA HannesEURESA changed the title Stataic Cache and Livewire - multiple instances running Static Cache and Livewire - multiple instances running Nov 27, 2024
@HannesEURESA
Copy link
Author

I got the same Error when I am using Partials inside Antlers. But only if the partial got Alpine included as x-data or x-init. Still from the Livewire Package ?

@duncanmcclean
Copy link
Member

Yes, the error you're seeing is related to the Livewire package, not with Statamic. You'll likely see it on any page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants