WordPress.org

Ready to get started?Download WordPress

Forums

Simple Cart & Buy Now
[resolved] Errors in debug mode (8 posts)

  1. Jacob N. Breetvelt
    Member
    Posted 1 year ago #

    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/

  2. bluey80
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  3. Jacob N. Breetvelt
    Member
    Posted 1 year ago #

    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

  4. bluey80
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  5. Jacob N. Breetvelt
    Member
    Posted 1 year ago #

    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/
    I am counting on your continuing support of this nice plugin.

  6. bluey80
    Member
    Plugin Author

    Posted 1 year ago #

    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.

  7. Jacob N. Breetvelt
    Member
    Posted 1 year ago #

    Thank you! It - not only produces no errors anymore, but - even works as expected!

  8. bluey80
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the troubleshooting. Making this topic as resolved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags