Community Forums › Forums › Archived Forums › Design Tips and Tricks › Installing woocommerce breaks the dashboard
Tagged: white screen, WooCommerce
- This topic has 8 replies, 2 voices, and was last updated 7 years, 4 months ago by yashitamittal11.
-
AuthorPosts
-
August 10, 2017 at 5:30 am #210221yashitamittal11Member
Hello
I am trying to install WooCommerce on my website. But as soon as I activate the plugin, I get the Internal server Error and I am not able to access the backend. It just shows the white screen of death.
The frontend is visible. But the Genesis Responsive Slider which displays the slider on the top of the home page does not show.
I have to manually delete the Woocommerce plugin using the FTP after which this site works ok and the slider shows.On the localhost when I install woocommerce, dashboard is ok and visible. Only the Genesis Responsive slider stops working. I tried to deactivate all the plugins one by one. No other plugin is causing the issue. Only after I deactivate the WooCoomerce on the localhost, the site works.
I have enabled WP_DEBUG, I am getting this error in Debug Bar on home page on both localhost and live site.
NOTICE: wp-content/plugins/genesis-responsive-slider/genesis-responsive-slider.php:227 - Undefined index: title require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/mgtools/front-page.php'), genesis, get_header, locate_template, load_template, require_once('/themes/genesis/header.php'), do_action('genesis_header'), WP_Hook->do_action, WP_Hook->apply_filters, call_user_func_array, mgtools_home_top_widgets, genesis_widget_area, dynamic_sidebar, call_user_func_array, WP_Widget->display_callback, genesis_responsive_sliderWidget->widget
.
I am using Genesis Sample Theme and customising it.
http://greeninvites.com
I have to use WooCommerce on my website. could you please suggest how can I resolve this.August 10, 2017 at 5:53 am #210223Victor FontModeratorDid you create the WooCommerce default pages? Did you install Genesis Connect for WooCommerce and enable WooCommerce support?
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?August 10, 2017 at 8:24 am #210233yashitamittal11MemberHello,
I was working with custom post type for product and I noticed a file named
page-product.php'
that I have created earlier. As I am not using CPT anymore, I deleted the file.
Now when I am trying to access the wp-admin, I am getting this error.Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 49152 bytes) in /hermes/bosnaweb20a/b2498/ipg.greeninvitescom1/wp-admin/includes/media.php on line 371
August 10, 2017 at 8:25 am #210234yashitamittal11MemberAs soon as I activate WooCommerce, Dashboard shows white screen with the fatal error, so I am not able to set default pages for WooCommerce or install any other plugins.
August 10, 2017 at 8:35 am #210235yashitamittal11MemberI have added
define( 'WP_MEMORY_LIMIT', '256M' );
this line in wp-config.php.
This has solved the fatal error.
But the Genesis responsive slider is still not working.I don't understand why deleting the page-product.php showed me the actual error.
August 12, 2017 at 12:51 am #210277yashitamittal11MemberHello,
Genesis Responsive Slider is still not displaying. Upon searching I found that, WooCommerce interferes with the sliders sometimes.
So I want to conditionally load the WooCommerce scripts and styles.
I have found the handle of all the scripts and styles loaded using the code:# Finding handle for your plugins function display_script_handles() { global $wp_scripts; if(current_user_can('manage_options') && ! is_admin()){ # Only load when user is admin foreach( $wp_scripts->queue as $handle ) : $obj = $wp_scripts->registered [$handle]; echo $filename = $obj->src; echo ' : <b>Handle for this script is:</b> <span style="color:green"> '.$handle.'</span><br/><br/>'; endforeach; } } add_action( 'wp_print_scripts', 'display_script_handles' );
Script Handles found for WooCommerce:
Handle: wc-add-to-cart Handle: woocommerce Handle: wc-cart-fragments Handle: flexslider
Style Handles found for WooCommerce:
Handle: woocommerce-layout Handle: woocommerce-smallscreen Handle: woocommerce-general Handle: genesis-sample-woocommerce-styles
I am trying to remove these WooCommerce handles conditionally using the code:
add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); function child_manage_woocommerce_styles() { //remove generator meta tag remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); //first check that woo exists to prevent fatal errors if ( function_exists( 'is_woocommerce' ) ) { //dequeue scripts and styles if ( ! is_woocommerce() && ! is_cart() && ! is_checkout() ) { wp_dequeue_script( 'wc-add-to-cart' ); wp_dequeue_script( 'wc-cart-fragments' ); wp_dequeue_script( 'woocommerce' ); wp_dequeue_script( 'flexslider' ); wp_dequeue_style('woocommerce-layout'); wp_dequeue_style('woocommerce-smallscreen'); wp_dequeue_style('woocommerce-general'); wp_dequeue_style('genesis-sample-woocommerce-styles'); } } }
Even after removing all the WooCommerce scripts and styles on the homepage, Genesis responsive slider is not working.
Please suggest what can be the issue.
August 12, 2017 at 5:33 am #210284Victor FontModeratorYou're slider is not loading all. Did you check the widget?
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?August 15, 2017 at 11:57 pm #210433yashitamittal11MemberHello
When I removed the WooCommerce handles from the home page, I also added this line,
wp_dequeue_script( 'flexslider' );
.
I think this was causing the slider to not load at all. I have now commented out this line.
The issue is the same. On deactivating WooCommerce, slider works fine.I don't know how to proceed with this issue.
August 16, 2017 at 4:34 am #210442yashitamittal11MemberHello
I have identified the issue.
When WooCommerce is deactivated, following scripts load (View-Developer-Source)<script type='text/javascript' src='http://localhost/wp-content/plugins/genesis-responsive-slider/js/jquery.flexslider.js?ver=0.9.5'></script>
And when WooCommerce is activated, following scripts load,
<script type='text/javascript' src='//localhost/wp-content/plugins/woocommerce/assets/js/flexslider/jquery.flexslider.min.js?ver=2.6.1'></script>
As the jquery.flexslider.js for Genesis Responsive slider does not load when WooCommerce is activated, the slider does not work.
So, I have dequeued the Woocommerce flexslider,wp_dequeue_script( 'flexslider' );
I manually copied the js for Genesis Responsive slider in my theme and included in
wp_enqueue_script( 'genesis-res-slider', get_stylesheet_directory_uri() . "/js/jquery.flexslider.js", array( 'jquery' ), CHILD_THEME_VERSION, true );
Now the slider is working fine.
Please tell me a clean way to include the js for Genesis Responsive slider. Do I need to do it manually.Thanks
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.