Marketpress errors on clean install

On my local install of wp:3.8.1 clean install, no other plugins activated and using twenty fourteen theme I am getting a number of errors when trying to save a test product:

Notice: Undefined index: mp_sale_price in /Users/chrisknight/Sites/ian-stevenson/httpdocs/content/plugins/marketpress/marketpress.php on line 2193

Notice: Undefined offset: 0 in /Users/chrisknight/Sites/ian-stevenson/httpdocs/content/plugins/marketpress/marketpress.php on line 2246

Warning: Cannot modify header information - headers already sent by (output started at /Users/chrisknight/Sites/ian-stevenson/httpdocs/content/plugins/marketpress/marketpress.php:2193) in /Users/chrisknight/Sites/ian-stevenson/httpdocs/cms/wp-admin/post.php on line 233

Warning: Cannot modify header information - headers already sent by (output started at /Users/chrisknight/Sites/ian-stevenson/httpdocs/content/plugins/marketpress/marketpress.php:2193) in /Users/chrisknight/Sites/ian-stevenson/httpdocs/cms/wp-includes/pluggable.php on line 896

Is there a way to resolve these error messages?
Thanks

  • Ash

    Hello @Chris

    Welcome to WPMU community!

    I hope you are well today and thanks for asking the question.

    The first two notice is creating the last two warnings, and you can ignore those notices as these are simple php notice. To ignore, you need to turn off debug mode.

    To disable debug mode please edit a line in your wp-config.php:
    Change

    define('WP_DEBUG', true);

    to

    define('WP_DEBUG', false);

    Alternatively, please go to content/plugins/marketpress/marketpress.php:2193 and change the line to:

    if(isset($_POST['mp_sale_price']))
    		  update_post_meta($post_id, 'mp_sale_price', array_map(create_function('$price', $func_curr), (array)$_POST['mp_sale_price']));

    and in content/plugins/marketpress/marketpress.php on line 2246

    if(isset($meta["mp_shipping"][0])) $mp_shipping = maybe_unserialize($meta["mp_shipping"][0]);

    Let me know if that works.

    Also, I am notifying the developer about this.

    Cheers
    Ash

  • Jesse

    This is now November and with a fresh MarketPress install I am getting a slew of similar issues. Just saving a new post I get the following notices and then 2 warnings about headers already sent. I am on a development server so I have debug_mode turned on. Turning debug_mode off does get rid of these errors but I want to see where my own code is throwing errors and If I have to have debug_mode turned off just to use your plugin how can I debug my own plugins/themes? I most likely will go through and fix all of your code where you assume $_POST values to be sent but I shouldn't have to do that with a fresh plugin install. Especially for a paid plugin.

    Notice: Undefined index: mp_sale_price in /home/eliteurnsdivined/public_html/wp-content/plugins/marketpress/marketpress.php on line 2350

    Notice: Undefined index: mp_inventory in /home/eliteurnsdivined/public_html/wp-content/plugins/marketpress/marketpress.php on line 2389

    Notice: Undefined index: mp_sales_count in /home/eliteurnsdivined/public_html/wp-content/plugins/marketpress/marketpress.php on line 2399

    Notice: Undefined index: mp_shipping in /home/eliteurnsdivined/public_html/wp-content/plugins/marketpress/marketpress.php on line 2403

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.