Celebrating 7 Years! Get up to $30 off GeneratePress Premium!

[Resolved] Blog vs. WooCommerce conflict again?

Home Forums Support [Resolved] Blog vs. WooCommerce conflict again?

Home Forums Support Blog vs. WooCommerce conflict again?

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
  • #530343
    Peter 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?

    GP Premium 1.6
    Customer Support

    Hi 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.

    Peter Duggan

    Hi Leo

    I already have done (both before I posted here and again just now to double-check), but still blank.

    Peter Duggan

    The 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.

    Customer Support

    Hmm 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?


    Peter Duggan

    Sorry, 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).

    Peter Duggan

    Just 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.

    Peter Duggan

    Well, 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:


    ‘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?

    Lead Developer
    Lead Developer

    If 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.

    Peter Duggan

    Hi 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:

     * 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;
    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';
    Lead Developer
    Lead Developer

    The 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:


    If you contact your hosting and show them this issue, they should be able to fix it for you.

    Peter Duggan

    Thanks, Tom, I’ve contacted my hosting and will let you know.

    Peter Duggan

    OK, 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?

    Lead Developer
    Lead Developer

    The 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.

    Peter Duggan

    Thanks, 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.


Viewing 15 posts - 1 through 15 (of 24 total)
  • You must be logged in to reply to this topic.