Title: Errors in debug mode
Last modified: August 20, 2016

---

# Errors in debug mode

 *  Resolved [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/)
 * I am the developer of the plugin wp-photo-album-plus and i am trying to make 
   my plugin compatible with SCABN.
 * All my sites run in debug mode ( **define(‘WP_DEBUG’, true);** in config ).
 * I would like you to test your plugin in debug mode and fix the errors, as it 
   is almost unworkable now.
 * Examples:
 * Notice: Undefined index: no_cart in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/
   wp-content/plugins/simple-cart-buy-now/classes/display.php on line 167 Notice:
   Undefined index: fshipping in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-
   content/plugins/simple-cart-buy-now/classes/display.php on line 182 Notice: Undefined
   index: qty_field in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/
   simple-cart-buy-now/classes/display.php on line 211 Notice: Undefined index: 
   no_cart in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-
   cart-buy-now/classes/display.php on line 217 Notice: Undefined index: no_cart
   in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-
   buy-now/classes/display.php on line 167 Notice: Undefined index: fshipping in/
   mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-
   now/classes/display.php on line 182 Notice: Undefined index: qty_field in /mnt/
   webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-now/
   classes/display.php on line 211 Notice: Undefined index: no_cart in /mnt/webf/
   d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-now/classes/
   display.php on line 217 Notice: Undefined index: no_cart in /mnt/webf/d1/15/51893315/
   htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-now/classes/display.php
   on line 167 Notice: Undefined index: fshipping in /mnt/webf/d1/15/51893315/htdocs/
   opajaap/beta/wp-content/plugins/simple-cart-buy-now/classes/display.php on line
   182 Notice: Undefined index: qty_field in /mnt/webf/d1/15/51893315/htdocs/opajaap/
   beta/wp-content/plugins/simple-cart-buy-now/classes/display.php on line 211 Notice:
   Undefined index: no_cart in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/
   plugins/simple-cart-buy-now/classes/display.php on line 217 Notice: Undefined
   index: no_cart in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/
   simple-cart-buy-now/classes/display.php on line 167 Notice: Undefined index: 
   fshipping in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/
   simple-cart-buy-now/classes/display.php on line 182 Notice: Undefined index: 
   qty_field in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/
   simple-cart-buy-now/classes/display.php on line 211 Notice: Undefined index: 
   no_cart in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-
   cart-buy-now/classes/display.php on line 217 Notice: Undefined index: no_cart
   in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-
   buy-now/classes/display.php on line 167 Notice: Undefined index: fshipping in/
   mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-
   now/classes/display.php on line 182 Notice: Undefined index: qty_field in /mnt/
   webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-now/
   classes/display.php on line 211 Notice: Undefined index: no_cart in /mnt/webf/
   d1/15/51893315/htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-now/classes/
   display.php on line 217 Notice: Undefined index: no_cart in /mnt/webf/d1/15/51893315/
   htdocs/opajaap/beta/wp-content/plugins/simple-cart-buy-now/classes/display.php
   on line 167 Notice: Undefined index: fshipping in /mnt/webf/d1/15/51893315/htdocs/
   opajaap/beta/wp-content/plugins/simple-cart-buy-now/classes/display.php on line
   182 Notice: Undefined index: qty_field in /mnt/webf/d1/15/51893315/htdocs/opajaap/
   beta/wp-content/plugins/simple-cart-buy-now/classes/display.php on line 211 Notice:
   Undefined index: no_cart in /mnt/webf/d1/15/51893315/htdocs/opajaap/beta/wp-content/
   plugins/simple-cart-buy-now/classes/display.php on line 217
 * [http://wordpress.org/extend/plugins/simple-cart-buy-now/](http://wordpress.org/extend/plugins/simple-cart-buy-now/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [bluey80](https://wordpress.org/support/users/bluey80/)
 * (@bluey80)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506326)
 * Please try 1.9.4 — I think I fixed all the warnings / notifications. I may have
   a missed a few, but it should be much better.
 *  Thread Starter [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506395)
 * Thank you, that makes a big difference!
 * A few still in 1.9.5 ( the widget ) :
 * Notice: Undefined variable: before_title in /mnt/webf/d1/15/51893315/htdocs/opajaap/
   beta/wp-content/plugins/simple-cart-buy-now/classes/display.php on line 64
 * Notice: Undefined variable: after_title in /mnt/webf/d1/15/51893315/htdocs/opajaap/
   beta/wp-content/plugins/simple-cart-buy-now/classes/display.php on line 64
 *  Plugin Author [bluey80](https://wordpress.org/support/users/bluey80/)
 * (@bluey80)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506399)
 * Ok, I think the remaining warnings depend on the theme. (In my theme, $before_title
   and $after_title is defined).
 * Try 1.9.6 as that should fix those warnings.
 *  Thread Starter [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506421)
 * That does not fix it. What is happening is that in widget.php line 11:
 *     ```
       .
           /** @see WP_Widget::widget */
           function widget($args, $instance) {
           	extract( $args );
       		$title = apply_filters('widget_title', $instance['title']);
       		echo apply_filters('scabn_display_widget',$title);
           }
       ```
   
 * **extract( $args );** creates the vars $before_title, $before_widget, $after_title
   and $after_widget. These have only local scope and are therefor not defined in
   the function display_widget($title) in display.php. You should code the display
   of the widget inside the function widget(); like:
 *     ```
       .
           /** @see WP_Widget::widget */
           function widget($args, $instance) {
           	extract( $args );
       		$widget_title = apply_filters('widget_title', $instance['title']);
       		echo $before_widget;
       		if ( !empty( $widget_title ) ) { echo $before_title . $widget_title . $after_title; }
       		echo apply_filters('scabn_display_cart','widget');
       		echo $after_widget;
           }
       ```
   
 * Try it, i have made many widgets and have been struggling with this in the beginning
   also!
 * BTW: Excellent plugin, i will make an interface ( special shortcode or scabn 
   template that uses name and price from the wppa database ) to wp-photo-album-
   plus ( over 600.000 downloads ) and promote the use of it. If you like, take 
   a look at [http://wppa.opajaap.nl/](http://wppa.opajaap.nl/)
    I am counting on
   your continuing support of this nice plugin.
 *  Plugin Author [bluey80](https://wordpress.org/support/users/bluey80/)
 * (@bluey80)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506425)
 * Thanks for the help. I don’t understand why I don’t see those same warnings on
   my system, though. Anyway, take a look at 1.9.7 as I changed the code to match
   the structure you posted above.
 *  Thread Starter [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506447)
 * Thank you! It – not only produces no errors anymore, but – even works as expected!
 *  Plugin Author [bluey80](https://wordpress.org/support/users/bluey80/)
 * (@bluey80)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506448)
 * Thanks for the troubleshooting. Making this topic as resolved.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Errors in debug mode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/simple-cart-buy-now.svg)
 * [Simple Cart & Buy Now](https://wordpress.org/plugins/simple-cart-buy-now/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-cart-buy-now/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-cart-buy-now/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-cart-buy-now/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-cart-buy-now/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-cart-buy-now/reviews/)

## Tags

 * [errors](https://wordpress.org/support/topic-tag/errors/)

 * 7 replies
 * 2 participants
 * Last reply from: [bluey80](https://wordpress.org/support/users/bluey80/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/errors-in-debug-mode-3/#post-3506448)
 * Status: resolved