mailchimp-subscribe-craft icon indicating copy to clipboard operation
mailchimp-subscribe-craft copied to clipboard

Craft 3 version installs but errors on frontend

Open Joobs opened this issue 2 years ago • 1 comments

After running composer require aelvan/mailchimp-subscribe "^3.1" to install the Craft 3 version, it seems to install ok, but the front end and admin of the website throws the following error:

Craft 3.7.45.2 PHP 8.1

Deprecated: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1082

Deprecated: Return type of Illuminate\Support\Collection::offsetGet($key) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1093

Deprecated: Return type of Illuminate\Support\Collection::offsetSet($key, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1105

Deprecated: Return type of Illuminate\Support\Collection::offsetUnset($key) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1120

Deprecated: Return type of Illuminate\Support\Collection::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1071

Deprecated: Return type of Illuminate\Support\Collection::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1050

Deprecated: Return type of Illuminate\Support\Collection::jsonSerialize() should either be compatible with JsonSerializable::jsonSerialize(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /app/vendor/illuminate/support/Collection.php on line 1019


An Error occurred while handling another error:
yii\web\HeadersAlreadySentException: Headers already sent in /app/vendor/illuminate/support/Collection.php on line 16. in /app/vendor/yiisoft/yii2/web/Response.php:368
Stack trace:
#0 /app/vendor/yiisoft/yii2/web/Response.php(341): yii\web\Response->sendHeaders()
#1 /app/vendor/yiisoft/yii2/web/ErrorHandler.php(136): yii\web\Response->send()
#2 /app/vendor/craftcms/cms/src/web/ErrorHandler.php(192): yii\web\ErrorHandler->renderException(Object(yii\base\ErrorException))
#3 /app/vendor/yiisoft/yii2/base/ErrorHandler.php(135): craft\web\ErrorHandler->renderException(Object(yii\base\ErrorException))
#4 /app/vendor/craftcms/cms/src/web/ErrorHandler.php(71): yii\base\ErrorHandler->handleException(Object(yii\base\ErrorException))
#5 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\base\ErrorException))
#6 {main}
Previous exception:
yii\base\ErrorException: session_name(): Session name cannot be changed after headers have already been sent in /app/vendor/yiisoft/yii2/web/Session.php:357
Stack trace:
#0 {main}
Screenshot 2022-07-08 at 17 10 57

Joobs avatar Jul 08 '22 14:07 Joobs

From our discussion on Discord, it looks like Scout requires up to v8 of tightenco/collect, but the latest version is 9.

This is missing ^9.0: https://github.com/studioespresso/craft-scout/blob/c1a3943300d155e4cf867a051ea9776f2ad12993/composer.json#L33

bencroker avatar Jul 08 '22 16:07 bencroker