Amazon Polly Conflict
1 year, 1 month ago #30617
With version 22.3 of WPSOLR PRO I get an error from the Amazon Polly admin interface (Dashboard > AWS > text-to-speech):
Fatal error: Uncaught Error: Call to undefined method GuzzleHttp\Psr7\Utils::tryGetContents() in /nas/content/live/hilltimes/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/psr7/src/Stream.php:103 Stack trace: #0 /nas/content/live/hilltimes/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/psr7/src/Stream.php(83): GuzzleHttp\Psr7\Stream->getContents() #1 [internal function]: GuzzleHttp\Psr7\Stream->__toString() #2 /nas/content/live/hilltimes/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/Api/Parser/PayloadParserTrait.php(18): json_decode(Object(GuzzleHttp\Psr7\Stream), true) #3 /nas/content/live/hilltimes/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/Api/Parser/RestJsonParser.php(31): Aws\Api\Parser\RestJsonParser->parseJson(Object(GuzzleHttp\Psr7\Stream), Object(GuzzleHttp\Psr7\Response)) #4 /nas/content/live/hilltimes/wp-content/plugins/amazon-polly/vendor/aws/aws-sdk-php/src/Api/Parser/AbstractRestParser.php(63): Aws\Api\Parser\RestJsonParser->payload(Object(GuzzleHttp\Psr in /nas/content/live/hilltimes/wp-content/plugins/wpsolr-pro/wpsolr/core/vendor/guzzlehttp/psr7/src/Stream.php on line 103 There has been a critical error on this website. Please check your site admin email inbox for instructions. Learn more about troubleshooting WordPress.
Any suggestions on how to resolve this error? The error was not present when version 22.2 WPSOLR-PRO was installed.
Thank youwpsolrKeymaster1 year, 1 month ago #30618
Both AWS for WordPress and WPSOLR plugins use the Guzzle library through composer dependencies, but not with the same version, which appears to cause the conflict.
(WPSOLR’s Guzzle version is more recent as it has been updated with the recent 22.3 release, while AWS for WordPress has not been updated for a year at least).
A solution could be to somehow update the /wpsolr-pro/wpsolr/core/composer.json to force the same Guzzle version as AWS for WordPress. And do so on each new WPSOLR release.
Or update the AWS for WordPress’s aws/aws-sdk-php to the latest version.
Or better, ask the AWS for WordPress support to update their plugin’s dependencies.
You must be logged in to reply to this topic.