EmicoEcommerce / Magento2Tweakwise-archived

Magento 2 module for Tweakwise integration
Other
9 stars 25 forks source link

Error due to timeout settings #57

Closed remco-schouten closed 5 years ago

remco-schouten commented 5 years ago

Zend-http is generating errors due to tweakwise sending a float where integer or is_numeric is required.

Latest zend-http version (2.8.3, since 2018-01-08) has a new check on the timeout setting. Because tweakwise is providing a timeout in float format, this produce an error.

What is the purpose of this issue? Explain the background context.

Environment

Steps to reproduce

Ensure to have magento 2.2.7 installed and updated with zend-http 2.8.3. Pages using tweakwise will produce this error in support_report.log or frontend

Actual result

Error on frontend and in log:

2 exception(s): Exception #0 (Emico\Tweakwise\Exception\ApiException): integer or numeric string expected, got double Exception #1 (Zend\Http\Client\Adapter\Exception\InvalidArgumentException): integer or numeric string expected, got double

Exception #0 (Emico\Tweakwise\Exception\ApiException): integer or numeric string expected, got double

0 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Model/Client.php(166): Emico\Tweakwise\Model\Client->doRequest(Object(Emico\Tweakwise\Model\Client\Request\ProductNavigationRequest))

1 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Model/Catalog/Layer/NavigationContext.php(125): Emico\Tweakwise\Model\Client->request(Object(Emico\Tweakwise\Model\Client\Request\ProductNavigationRequest))

2 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Model/Catalog/Layer/NavigationContext/CurrentContext.php(59): Emico\Tweakwise\Model\Catalog\Layer\NavigationContext->getResponse()

3 /Users/remco.schouten/websites/score/httpdocs/vendor/emico/tweakwise/src/Block/Catalog/Product/ProductList/Toolbar/Plugin.php(54): Emico\Tweakwise\Model\Catalog\Layer\NavigationContext\CurrentContext->getResponse()

4 /Users/remco.schouten/websites/score/httpdocs/vendor/magento/framework/Interception/Interceptor.php(135): Emico\Tweakwise\Block\Catalog\Product\ProductList\Toolbar\Plugin->aroundGetAvailableOrders(Object(Magento\Catalog\Block\Product\ProductList\Toolbar\Interceptor), Object(Closure))

Expected result

no error message

edwinljacobs commented 5 years ago

Hello,

There was a pull request which fixed this issue, it has been merged and released in v1.4.4.

With kind regards, Edwin Jacobs