putyourlightson / craft-sprig

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

Getting an error that I've never seen. Just updated to craft v4 #391

Closed brianhorace closed 1 month ago

brianhorace commented 1 month ago

Bug Report

I'm seeing this error since upgrading to craft 4:

Twig Runtime Error – Twig\Error\RuntimeError Neither the property "script" nor one of the methods "script()", "getscript()"/"isscript()"/"hasscript()" or "__call()" exist and have public access in class "putyourlightson\sprig\variables\SprigVariable".

Screenshot 2024-09-16 at 10 22 18 PM

Plugin Version

2.13.0

Craft CMS Version

4.12.1

PHP Version

8.3

bencroker commented 1 month ago

Thanks for the report! The sprig.script tag was deprecated in Sprig 2.6.0, but was inadvertently removed in a recent version.

I’ve reverted the removal in Sprig Core 2.12.2, but you should ideally remove it from your template code as it is no longer required.