Home › Forums › WoodMart support forum › explode() expects parameter 2 to be string, object given in Woodmart Layered Nav
explode() expects parameter 2 to be string, object given in Woodmart Layered Nav
- This topic has 1 reply, 2 voices, and was last updated 4 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
January 19, 2020 at 1:20 pm #168781
perelviewParticipantHello,
We have identified an issue with Woodmart Layered Nav producing an E_Warning in PHP:PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1097″ while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: e-shetach.co.il, request: “GET /sale/?filter_color=%D7%9C%D7%91%D7%9F&filter_brand=%d7%aa%d7%9e%d7%94,dakar HTTP/1.1”, upstream: “fastcgi://unix:/usr/local/php72/sockets/eshetach.sock:”, host: “www.domain.ext”
2020/01/19 14:41:13 [error] 21331#0: *135263 FastCGI sent in stderr: “rning: stripos() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1086
PHP message: PHP Warning: stripos() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1089
PHP message: PHP Warning: strpos() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1096
PHP message: PHP Warning: explode() expects parameter 2 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1097
PHP message: PHP Warning: strstr() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1079
PHP message: PHP Warning: stripos() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1086
PHP message: PHP Warning: stripos() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1089
PHP message: PHP Warning: strpos() expects parameter 1 to be string, object given in /home/customer/domains/domain.ext/public_html/wp-includes/functions.php on line 1096This seems to be happening only in a /sale page which is a custom page. The page has products and Woodmart Layered Nav widget in sidebar – it is the same sidebar that is used in the /shop
* The problem only occurs in the /sale (custom page)
** A filter must be selected (any filter will do) to reproduce the error.
*** We noticed all the counters are showing shop-scope numbers and not limited to the items on the page.We have created a dedicated stage environment for this case, disabled all plugins and problem persists.
Without getting too technical the question is –
Is the “Woodmart Layered Nav” supposed to work in a custom page (not /shop) showing products?
How can we make a custom page (like products on sale) + woodmart ajax filters?Thank you!
January 20, 2020 at 7:30 am #168862
Artem TemosKeymasterHello,
Layered nav widget, as well as default WooCommerce filters, can be used on the shop page only. You can’t add them to your custom pages. To fix PHP warnings, please, add the following code to the file
woodmart/inc/widgets/class-widget-layered-nav.php
as it shown on the screenshot http://prntscr.com/qq3glkif ( ! is_shop() && ! is_product_taxonomy() ) { return; }
Kind Regards
-
AuthorPosts
- You must be logged in to create new topics. Login / Register