Error code loading Categories page with MarketPress Plugin

Hello - my first time working with an eCommerce plugin, love WPMU Dev and want to use MarketPress so I sincerely hope your offer of support 24/7 is real because I will need much :slight_smile: ... I learn fast though.

I am using a Catalyst Dynamic Theme with a skin overlay with the MarketPress plugin - several product pages are loaded but not live from the front end of the site (

When I go to /store/products/category/"my category" (i.e., I am receiving this error:

Catchable fatal error: Object of class WP_Error could not be converted to string in /home/precisio/public_html/wp-includes/formatting.php on line 2583

If you could point me in a direction to resolving this issue, that would be greatly appreciated :slight_smile:

  • Vaughan
    • Support/SLS MockingJay

    hi @rozberry

    thanks for posting, sorry to hear you're having some issues.

    This most likely is a theme issue.

    could you follow this thread, and see if it relates to you.

    i'm not sure of what theme you're using, but here's a fix for the genesis theme.

    Ok here's the fix for Studio Press for error I have been experiencing:

    >>> wp-content/themes/genesis/lib/structure/header.php


    if ( $canonical )
    printf( '<link rel="canonical" href="%s" />' . "\n", esc_url( apply_filters( 'genesis_canonical', $canonical ) ) );


    if ( ( $canonical ) && (is_string($canonical)) )
    printf( '<link rel="canonical" href="%s" />' . "\n", esc_url( apply_filters( 'genesis_canonical', $canonical ) ) );

    the fix is simple, it's just checking the $var to see whether it's a string or not.

    hope this helps.


  • dlmktng
    • New Recruit

    I am having the same issue. I have an installation that has been running fine for a year but after updating Wordpress, Catalyst/Dynamix, and Marketpress, Categories are broken. I don't know anything about code, but did take a look at it.

    Line 2583: $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $url);

    I have deleted products and categories, reset with new products and categories, and nothing works. I have deactivated all plugins and reactivated. Marketpress is the problem. Product categories don't work.

    Here is the error message when a category is clicked:
    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/laneles/public_html/wp-includes/formatting.php on line 2583

    Please let me know a fix for this.

  • Vaughan
    • Support/SLS MockingJay

    hiya @dlmktng

    can you have a read of my previous post & check the thread out i linked to, the solution is there. this is a theme related issue. however if you aren't using a genesis framework theme, the solution should still work, but maybe slightly different for your theme.


  • dlmktng
    • New Recruit

    Hello Vaughn,

    I had already looked at that thread and at the solution and cannot make sense of it in Catalyst. It does seem a bit unusual that it would be a problem with the theme if both Genesis and Catalyst have the same error message on line 2583, but I am not a coder and wouldn't know if that would be normal.

    If you have other suggestions, please let me know. I need to get this site going asap.


  • rozberry
    • New Recruit


    I was able to move past this issue by turning off the canonical SEO options under Caalyst --> Core Options --> SEO.

    I was not able to find any reference to canonical in the formatting.php or header files. I don't think it is the best solution but it gets me past this issue at least.

    I am having other issues with the theme integration and since I am not a programmer or designer I may well have to decide to either ditch the theme/skin or marketpress :slight_frown:.

    Hope this helps you move forward.

  • Vaughan
    • Support/SLS MockingJay


    I will flag the developer for some feedback on this. I'm almost sure this is a theme related issue, otherwise we would be seeing this problem everywhere.

    Aaron is away till tomorrow, so could take a little longer to respond.

    hope this helps.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.