putyourlightson / craft-sprig

A reactive Twig component framework for Craft CMS.
https://putyourlightson.com/plugins/sprig
MIT License
124 stars 9 forks source link

Undefined constant craft\web\View::EVENT_AFTER_REGISTER_ASSET_BUNDLE #344

Closed maartenheideman closed 9 months ago

maartenheideman commented 9 months ago

I'll get the next error Undefined constant craft\web\View::EVENT_AFTER_REGISTER_ASSET_BUNDLE. Any ideas why? on 2.6.2 php 8.2. Localy works but on my server getting this errors.

Scherm­afbeelding 2023-12-13 om 22 14 09 Scherm­afbeelding 2023-12-13 om 22 16 43

bencroker commented 9 months ago

Please update to the latest version 2.7.3 and check whether this is still an issue.

maartenheideman commented 9 months ago

I did. Also tried to install en reinstall but bo difference. The playground spig in the cms also gives a same sort of error.

bencroker commented 9 months ago

Ah, you must be on a version of Craft lower than 4.5.0. I’ve fixed the issue in https://github.com/putyourlightson/craft-sprig-core/commit/c735ccb7ec9e7e1a105d956ecfb817344e6e4501 and released in Sprig Core 2.6.5. Running composer update should get you that fix.

pixleight commented 9 months ago

Just ran into this issue myself! Submitted a PR to fix a bug in Sprig Core 2.6.5: https://github.com/putyourlightson/craft-sprig-core/pull/11

bencroker commented 9 months ago

Thanks for catching this, @pixleight! Fixed in https://github.com/putyourlightson/craft-sprig-core/commit/76b1d813bcd29bcad667453f8a3d3e4164b8f043 and released in 2.6.6.