Tagged: blog posts, bug, enfold 4.1.2, masonry, woocommerce
-
AuthorPosts
-
October 17, 2017 at 10:24 am #865216
Hi Enfold team,
I’ve updated a client’s website that uses the Masonry and Blog Posts Elements on many pages. After updating from 4.1.1 to 4.1.2 the website didn’t work on those pages anymore. While debugging PHP told me that two functions didn’t exist and created a fatal error: avia_wc_set_out_of_stock_query_params and avia_wc_get_product_query_order_args
Those functions are WooCommerce specific functions and the only fix was to use “function_exists” and create those (empty) functions:if (!function_exists('avia_wc_set_out_of_stock_query_params')) { function avia_wc_set_out_of_stock_query_params() { return ""; } } if (!function_exists('avia_wc_get_product_query_order_args')) { function avia_wc_get_product_query_order_args($args) { return $args; } }
Afterwards the website worked but the ordering of posts defined in the shortcodes was ignored!
PLEASE fix that as soon as possible to make my workarounds obsolete and fix the ordering problem!October 19, 2017 at 10:14 pm #866488Hey 48design,
Please be patience till we do release the latest version which is this days and tell us if the issue will be general fixed
Best regards,
BasilisNovember 7, 2017 at 1:38 pm #873662Hey Basilis,
I’ve updated to the latest version (4.2) and from the changelog it seems to be fixed (improved: removed an old filter from woocommerce) but if I remove my workaround the same problem arises.
Best regards
November 9, 2017 at 11:13 pm #874871Hi,
Can you please share us backend access details please?
Best regards,
BasilisNovember 10, 2017 at 10:49 am #875098Hi Basilis,
here we go. I’ve added a user for you (see private content).
Best regards
November 13, 2017 at 4:42 am #875932Hi,
Please check the config-woocommerce > config.php file. The function should be included inside. If you can’t find it, please download the latest version of the theme then override the file manually.
Best regards,
IsmaelNovember 13, 2017 at 1:24 pm #876103Thank you Ismael,
but this website doesn’t use WooCommerce and Enfold was directly installed (and afterwards updated) from the installation package we’ve purchased, so this should not be necessary I think. The config file is from 2017-11-07, so it seems it got updated to 4.2.
I took a look inside and there are those two functions.Nevertheless, if I remove those two dummy-functions from my child theme’s functions.php I get those errors:
[13-Nov-2017 11:22:11 UTC] PHP Fatal error: Call to undefined function avia_wc_set_out_of_stock_query_params() in […]/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php on line 755
[13-Nov-2017 11:23:02 UTC] PHP Notice: Undefined index: orderby in […]/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php on line 760Those errors block some content of the website to be loaded. You can test that on the frontpage.
November 14, 2017 at 8:47 am #876495Hi,
but this website doesn’t use WooCommerce and Enfold was directly installed
There is a product post type in the dashboard. Where’s that coming from?
Best regards,
IsmaelNovember 14, 2017 at 10:53 am #876529Hi,
this post type is from the child theme. Does Enfold simply check for a post type “product” to verify that WooCommerce is installed?
By the way: I granted you access to the website, so you should see that there is no WooCommerce installed.Best regards
Fabian- This reply was modified 7 years, 1 month ago by 48DESIGN.
November 16, 2017 at 4:23 am #877340Hi,
this post type is from the child theme. Does Enfold simply check for a post type “product” to verify that WooCommerce is installed?
No, it doesn’t but the functions above do. The logic check if the taxonomy is an actual object and if it belongs to the “product” custom post type. Please check the config-templatebuilder > avia-shortcodes > av-helper-masonry.php file. You should see this code on line 681.
if( is_object( $tax ) && isset( $tax->object_type ) && in_array( 'product', (array) $tax->object_type ) )
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.