Forum Replies Created
-
AuthorPosts
-
DaveN
ParticipantThanks Ernest! I’ll have a play around and see what can be done.
DaveN
ParticipantHi Ernest,
Perfect! Thank you very much! If you don’t mind, can we keep this ticket open for another day or so, so that I can test everything out on the live site and check this false filter tactic works for us on there?
Also, perhaps I could ask your advice on the automatic selection RPP makes on product pages…
Because we have product pages for actifvities in lots of different places, the most logical grouping of recommended products would be by location. So if we have a product page for something in Bangkok, it would be best if the recommendations are also in bangkok. However, we don’t have category pages for cities, only for countries, and we would have to allow for suggestions to come up for places where there’s only one activity. In this case, the suggestions would have to be in a different place, but still as relevant as possible. I tried to think of the best way to achieve this, but I found it difficult to think how. Would using custom fields be a good idea?
Any advice on that you can offer would be greatly appreciated!
Thanks again!
DaveN
ParticipantI’ve enabled WP Rocket, so next to the security tab in the top of the dashboard WP Rocket appears. If you hover, it gives you the options of clear cache and clear OP cache. I think OP cache is the important one here.
I have attached a screen shot that shows where it should be found.DaveN
ParticipantThis was the response from the host
Hello there,
I have cleared cache on the server. Could you please check now?
Please do let us know if you are still facing any issues. If so let us know the exact steps to recreate the issue from our end so that we can assist you in a better way.
DaveN
ParticipantIt just occurred to me, that we might have to clear OP Cache for the changes to take effect. If you enable WP Rocket, it allows you to clear that cache from the dashboard (it will mess things up for non-logged in users, but everything should appear fine for logged in users). Could that be the solution?
DaveN
ParticipantHi Ernest,
Thank you for your response. I will contact my host about this as the FTP details are definitely the correct ones for the staging site, and are different to the live site creds. I’ll get back to you as soon as they have answered me.
November 20, 2018 at 3:12 pm in reply to: White Screen After Most Recent Ajax Search Pro Update #20010DaveN
ParticipantHi Ernest,
Sorry! I don’t know what could have happened there. I asked my hosts to swap that code. I’m sure they had done, because the error disappeared for a while. I’ll ask them to do it again.
Thanks!
November 16, 2018 at 4:19 pm in reply to: White Screen After Most Recent Ajax Search Pro Update #19977DaveN
ParticipantHi again Ernest,
Sorry to bother you again. I’m afraid the messages have come back.
These are on product pages where the second instance of the plugin is showing. On normal posts, everything’s fine. The errors now readWarning array_diff(): Argument #1 is not an array 3
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
array_diff()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437Plugin: related-posts-pro
Warning array_merge(): Argument #2 is not an array 1wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
array_merge()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437Plugin: related-posts-pro
Warning array_merge(): Argument #1 is not an array 2wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
array_merge()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437Plugin: related-posts-pro
Warning count(): Parameter must be an array or an object that implements Countable 1wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
wp-content/plugins/related-posts-pro/includes/related_content.class.php:446Plugin: related-posts-pro
November 5, 2018 at 5:11 pm in reply to: White Screen After Most Recent Ajax Search Pro Update #19789DaveN
ParticipantThanks again Ernest!
That seems to have done it!
November 3, 2018 at 1:07 pm in reply to: White Screen After Most Recent Ajax Search Pro Update #19731DaveN
ParticipantHi Ernest,
Thank you very much for that. I have made that change. I’m afraid I’ve found more issues re RPP errors, on product pages. These are showing
Warning array_diff(): Argument #1 is not an array 2
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
Plugin: related-posts-pro
Warning array_merge(): Argument #2 is not an array 1wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
Plugin: related-posts-pro
Warning array_merge(): Argument #1 is not an array 1wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
Plugin: related-posts-pro
Warning count(): Parameter must be an array or an object that implements Countable 1wp-content/plugins/related-posts-pro/includes/related_content.class.php:446
Plugin: related-posts-pro
When I open them up, they look like this
Warning array_diff(): Argument #1 is not an array 2
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
array_diff()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437Warning array_merge(): Argument #2 is not an array 1
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
array_merge()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437Warning array_merge(): Argument #1 is not an array 1
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
array_merge()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437
wp-content/plugins/related-posts-pro/includes/related_content.class.php:437Warning count(): Parameter must be an array or an object that implements Countable 1
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/single-product.php:38
load_template(‘wp-content/themes/flatsome/woocommerce/content-single-product.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
wc_get_template_part()
wp-content/themes/flatsome/woocommerce/content-single-product.php:39
load_template(‘wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php’)
wp-content/plugins/woocommerce/includes/wc-core-functions.php:178
do_action(‘woocommerce_after_single_product_summary’)
wp-content/themes/flatsome/woocommerce/single-product/layouts/product-no-sidebar.php:67
woocommerce_output_product_data_tabs()
wp-includes/class-wp-hook.php:286
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1418
woocommerce_product_description_tab()
wp-content/themes/flatsome/woocommerce/single-product/tabs/tabs.php:62
wc_get_template()
wp-content/plugins/woocommerce/includes/wc-template-functions.php:1622
the_content()
wp-content/plugins/woocommerce/templates/single-product/tabs/description.php:33
apply_filters(‘the_content’)
wp-includes/post-template.php:240
wpdreams_rpp_add_below_content()
wp-includes/class-wp-hook.php:286
do_shortcode()
wp-content/plugins/related-posts-pro/includes/hooks.php:246
preg_replace_callback()
wp-includes/shortcodes.php:197
do_shortcode_tag()
Unknown location
rppShortcodeContainer->wpdreams_rpp_shortcode()
wp-includes/shortcodes.php:319
wpdreams_related_content->getRelatedPosts()
wp-content/plugins/related-posts-pro/includes/shortcodes.php:163
wpdreams_related_content->simpleRelated()
wp-content/plugins/related-posts-pro/includes/related_content.class.php:119
wp-content/plugins/related-posts-pro/includes/related_content.class.php:446Plugin: related-posts-pro
Notice Undefined variable: custom_content 12DaveN
ParticipantThanks Ernest!
That’s done it!
DaveN
ParticipantHi Ernest,
Thank you very much! Quite embarrassing that an extra comma had caused that problem. I can’t imagine how I could have done that!
The CSS on the main site has certainly done the trick, though I have changed the code to 50% instead of 100% on mobile as the images were coming out blurry (I was very proud for having worked that out).
Unfortunately, there is one more complication, which is that on product pages, I am still using the slick and slide format. Now those images look v strange on mobile. See example here
https://southeastasiabackpacker.com/bookings/liveaboard-komodo/Is there anything I can add to the code so that it only applies on the isotopic instance?
Thanks for your help!
DaveN
ParticipantHi Ernest,
OK, so it looks like changing line 63 is no problem. I have changed it to
add_action(‘wp_footer’, ‘wpdreams_rpp_hooks’, 99999, 0);
without any negative effects.For some reason I can’t change line 253 without the product pages breaking, even when I just change it to 11.
Would I need to change line 311 as well?
Thanks for your help on this!
DaveN
ParticipantHi Ernest,
Unfortunately, the change caused woocommerce products not to load (either gave an http 500 error, or just left a blank white page). I have been back into the hooks file and changed things back, (it was an emergency). It must be because we have a second instance running on product pages.
I changed line 253 to
add_filter(‘the_content’, ‘wpdreams_rpp_add_below_content’, 10, 1);and line 63 to
add_action(‘wp_footer’, ‘wpdreams_rpp_hooks’, 10, 0);I’m not sure if I changed line 311 (where I found a similar setup), it currently reads
add_filter(‘the_content’, ‘wpdreams_rpp_add_above_content’, 10, 1);
Do you think it would be safe to try changing the numbers again, in spite of using two instances in different places? Does the code look OK at the moment the way I’ve left it? Everything seems to be running OK again…
An example of a product page, where the second instance is running is this one
https://southeastasiabackpacker.com/bookings/tefl-course-thailand-koh-samui/
DaveN
ParticipantHi Ernest,
The block I’m referring to is the one in the attached screenshot (The text with a photo and then three large images).
On posts it’s appearing after RPP, on pages it’s appearing before.
(Post example) https://southeastasiabackpacker.com/ghost-town-hanoi/
(Page example) https://southeastasiabackpacker.com/destinations/singapore/All the best,
Dave
(P.s. If you can find a way to switch them round, please, could you give us instructions on how to make the change, in case we want to move things around again later?)
-
AuthorPosts