craft-sprig icon indicating copy to clipboard operation
craft-sprig copied to clipboard

Sprig does not work on subdomain

Open amclaughlin-prophix opened this issue 9 months ago • 1 comments

Bug Report

We have updated our CORS settings on our domain and sprig is not functioning while on a subdomain in a multisite environment in Craft CMS 4

We are receiving the following error: htmx.min.js?v=1740504642:1 htmx:invalidPath

Please advise.

Plugin Version

2.13.1

Craft CMS Version

Craft Pro 4.14.10

PHP Version

8.2.22

amclaughlin-prophix avatar Mar 10 '25 15:03 amclaughlin-prophix

Sounds like a duplicate of https://github.com/putyourlightson/craft-sprig/issues/390.

What commonly causes this is explicitly setting the @web alias or setting the CRAFT_WEB_URL environment variable. Please check if either of those have been defined and, if so, remove them and allow Craft to determine the web URL itself.

bencroker avatar Mar 12 '25 02:03 bencroker