- This topic has 23 replies, 3 voices, and was last updated 6 years ago by Tom.
-
AuthorPosts
-
March 25, 2018 at 1:42 pm #530343Peter Duggan
Just updated various plugins including GeneratePress and a WooCommerce update with updated database, and all appeared well till I discovered that the Blog home page is blank between main menu and footers. All the individual Blog posts are still accessible at their individual URLs.
I strongly suspect WooCommerce here because we had menu conflict between WooCommerce and Blog (nicely resolved by Tom) when we first set the site up, but don’t know what to look for next and can’t deactivate WooCommerce to test my theory because that destroys the whole site.
So any ideas, please?
March 25, 2018 at 6:44 pm #530536LeoStaffCustomer SupportHi there,
Can you test it with only GP and WooCommerce activated?
Had a similar issue is and it was causing by other plugins: https://generatepress.com/forums/topic/blank-blog-homepage/#post-530190
Let me know.
March 26, 2018 at 12:11 am #530669Peter DugganHi Leo
I already have done (both before I posted here and again just now to double-check), but still blank.
March 26, 2018 at 12:14 am #530674Peter DugganThe Menu bar search function is also affected. It had previously stopped working at all (clicking on it did nothing), which is partly why I did all the updates. Now you can type in it, but searching takes you to a blank Blog page even when searching from other pages.
March 26, 2018 at 8:54 am #531238LeoStaffCustomer SupportHmm I see a couple errors from WooCommerce here: http://www.screencast.com/t/bSdgZgbT
Can you ask their support to check first?
Our demo site is running the most recent version of GP and WooCommerce and there aren’t any errors showing.
Can you open a separate topic for separate question?
Thanks!
March 26, 2018 at 9:04 am #531250Peter DugganSorry, whose WooCommerce installation is that?
Sure, I can open another topic for the Search thing, but brought it up here because I thought it likely related (even part of the same problem/incompatibility if there is one).
March 26, 2018 at 9:15 am #531263Peter DugganJust noticed that (with the site running a GP Premium child theme) I have a 1.6 child theme running on a 2.0.2 parent version… so anything suspicious there?
At least WooCommerce says 2.0.2 parent, whereas Plugins reports 1.6.
March 26, 2018 at 9:30 am #531289Peter DugganWell, I’ve just looked at the WooCommerce support forum at wordpress.org so I don’t get told I haven’t searched before posting my problem, and found this:
https://wordpress.org/support/topic/woocommerce-has-broken-my-blog-posts/
‘Also because it is happening on your blog posts and not on your shop is another reason that points to a theme conflict rather than a woo problem.’
So perhaps you can still help here?
March 26, 2018 at 9:46 am #531310TomLead DeveloperLead DeveloperIf you’re using Masonry, it uses javascript to fade the blog posts in.
You have this javascript error: https://www.screencast.com/t/L1rgw7AQ
Javascript errors will prevent other javascript from firing, which explains why your blog posts aren’t displaying.
March 26, 2018 at 10:07 am #531350Peter DugganHi Tom
Sorry, my JavaScript is very limited!
I did just try disabling Masonry, but it didn’t help. But I have just checked to see what I’ve got in my themes directory, and generatepress_child contains just three things: functions.php, screenshot.png and style.css.
functions.php is nearly two years old and contains stuff related to both WooCommerce and Masonry I didn’t write but you might have helped me with here before, so quoting in case that helps:
<?php /** * Generate child theme functions and definitions * * @package Generate */ /* https://generatepress.com/forums/topic/remove-metabox-from-posts/ */ add_action( 'after_setup_theme','generate_remove_metaboxes' ); function generate_remove_metaboxes() { remove_action('add_meta_boxes', 'generate_add_layout_meta_box'); remove_action('add_meta_boxes', 'generate_add_footer_widget_meta_box'); remove_action( 'add_meta_boxes', 'generate_add_de_meta_box' ); } /* https://generatepress.com/forums/topic/hide-sidebar-in-woocommerce-search-results-page/ */ add_filter( 'generate_sidebar_layout','generate_custom_woocommerce_sidebar_layout' ); function generate_custom_woocommerce_sidebar_layout( $layout ) { // If we are on a woocommerce page, set the sidebar if ( is_woocommerce() ) return 'no-sidebar'; // Or else, set the regular layout return $layout; } add_filter('generate_blog_masonry','generate_blog_woocommerce_masonry'); function generate_blog_woocommerce_masonry() { // Disable in WooCommerce if ( is_woocommerce() ) return 'false'; // Check if blog if ( is_home() ) return 'true'; // Otherwise, disable it return 'false'; }
March 26, 2018 at 10:32 am #531402TomLead DeveloperLead DeveloperThe issue is your server isn’t allowing the browser to load a cookie script, which is required by WooCommerce.
You can see the issue by adding this to your address bar:
http://YOURURL.com/wp-content/plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js?ver=2.1.4
If you contact your hosting and show them this issue, they should be able to fix it for you.
March 26, 2018 at 11:01 am #531429Peter DugganThanks, Tom, I’ve contacted my hosting and will let you know.
March 26, 2018 at 12:35 pm #531525Peter DugganOK, they’re quoting me a Mod_security message which appears slightly confused by stray (?) question marks and colons, but the bit that’s not at all garbled is ‘[msg “Cross-site Scripting (XSS) Attack”] [data “.cookie”] [severity “CRITICAL”] [tag “WEB_ATTACK/XSS”]’.
I’m also advised, ‘Please have a check with your developer and if you wish to whitelist this rule for the domain, please let us know.’
So… is it as dramatic as it sounds or is that just Apache being careful/missing the point? In other words, is it safe?
March 26, 2018 at 8:26 pm #531902TomLead DeveloperLead DeveloperThe URL I pointed out is definitely safe. It’s just a javascript file within the WooCommerce plugin, which is hosted on your server. It’s not like it’s coming from a different domain.
March 27, 2018 at 8:58 am #532648Peter DugganThanks, Tom… all sorted now!
Couldn’t see how it could be anything but one of my WooCommerce files, but sometimes get stumped by stuff I don’t recognise and didn’t write, and don’t know JavaScript like HTML, CSS and (some) PHP.
Search is fixed too now by the same means, though I’d prefer to keep a straight search results listing with Masonry blog if possible, so will search here to see if there’s an existing solution for that and ask separately if necessary.
Cheers
Peter -
AuthorPosts
- You must be logged in to reply to this topic.