Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1275526

    Hello,

    I have multiple websites that we have transitioned over to BigCommerce Headless. However when we try to post blogs the page with the blogs completely break and the blog will not post. This only happens when BigCommerce is active.

    Thank you,

    Jeffrey

    #1275627

    Hey stoneroad,

    Could you please make a screencast of the issue?

    Best regards,
    Victoria

    #1276340

    Hello, here is a recording to the issue. Also provided is a link to a stage site to test the issue. I created a test blog and tried inserting a post slider on thr news page. The news page will not update and when it does it appears broken.

    Thank you for your help.

    #1278337

    Hi,
    Sorry for the very late reply, and thanks for the staging site login, but what is the login page? /wp-admin/ is redirecting.
    I have not used the BigCommerce plugin, but perhaps the browser console will give more info about the error once I can login.

    Best regards,
    Mike

    #1279546

    Hello, below is the login url. That is my bad, I forgot I had changed that.

    #1280331

    Hi,
    Sorry for the very late reply and thanks for the login, I was not able to edit your “News” page due to this error:
    The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
    Failed to load resource: the server responded with a status of 500 ()
    I also got a 500 error when I tried to save a test page with a “post slider”, I also tested another test page with a text element and it saved until I added a masonry element which caused the same error as your “News” page.
    I tested the BigCommerce plugin on my localhost and received a different error pointing to our built-in function for Woocommerce, and after some more research I found this thread, which points to this function on line 1166 in the \wp-content\themes\enfold\config-templatebuilder\avia-shortcodes\postslider\postslider.php file:

    if( function_exists( 'WC' ) )
    			{
    				avia_wc_clear_catalog_ordering_args_filters();
    				$avia_config['woocommerce']['disable_sorting_options'] = false;
    			}

    On my localhost I commented this line out like this and the element now works:

    /*
    			if( function_exists( 'WC' ) )
    			{
    				avia_wc_clear_catalog_ordering_args_filters();
    				$avia_config['woocommerce']['disable_sorting_options'] = false;
    			}
    			*/

    You can try this as a temporary solution, but note that each ALB element may have this block, such as the masonry element, so this line would also need to be commented out for those elements to also work.
    So this is good news because in the linked thread that points this issue out the customer didn’t get back to us with info from the BigCommerce plugin, perhaps if you ask BigCommerce they have seen other themes with woocommerce checks and have a working function already.
    If it turns out that they do I can submit it to the dev team to be added to Enfold.

    Best regards,
    Mike

    #1280582

    Hello, thank you for your help. I tried commenting out or removing the php code above. When I went to go edit the blog page I got the following error: “The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.”

    I reached out to BigCommerce to check on the function. I have yet to hear back from them.

    #1281349

    Hi,
    Thank you for the feedback, I would not think that you would get this error again after commenting out these lines, at least I didn’t on my localhost, please check if your webhost has object caching, if so please try disabling this on the server.

    Best regards,
    Mike

    #1320780

    Hello, It appears the Enfold blog and BigCommerce comflict has worsened and returned in recent updates. Any page containing anything related to a blog is showing a critical error now. ( Ex. https://juggernautdev.wpengine.com/uncategorized/why-juggernaut-case/) Before it was just any page containing a blog gallery or slider widget.

    Thank you,

    Jeffrey

    #1320897

    Hi,
    Did BigCommerce ever reply to you about a function? Our theme checks for WooCommerce with if( function_exists( 'WC' ) ) as many themes do, and this seems to be were the conflict is.
    I will also ask the rest of the team for ideas.

    Best regards,
    Mike

    #1321456

    Hi,
    I did some more testing with BigCommerce on my test site and found that it is forcing the function “WC” to fake a WooCommerce check.
    In the file \wp-content\plugins\bigcommerce\src\BigCommerce\Compatibility\woocommerce-functions.php on lines 16-21 you will find this:

    if ( ! function_exists( 'wc' ) ) {
    	function wc() {
    		$container = bigcommerce()->container();
    		return $container[ Compatibility::WC_FACADE ];
    	}
    }

    this code means that when WooCommerce (‘WC’) is not activate, to add it anyways, thus our theme then thinks it’s active and add our customizations which then causes a conflict, for which I would argue that it is BigCommerce that is in conflict and not our theme.
    Anyways, I tested by commenting out these lines like this:

    //if ( ! function_exists( 'wc' ) ) {
    //	function wc() {
    //		$container = bigcommerce()->container();
    //		return $container[ Compatibility::WC_FACADE ];
    //	}
    //}

    and it solved the blog post issue on my test site, but in the file the are 21 further functions that fake known WooCommerce functions such as wc_get_template, woocommerce_mini_cart, wc_get_cart_url, wc_get_checkout_url and many more, these may all be future conflicts for which I would recommend commenting out but it may break BigCommerce because it looks like the plugin is built with “borrowed” functions. You may wish to reconsider building a business with this plugin.

    Best regards,
    Mike

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