TheCartPress eCommerce Shopping Cart
CartPress causing 'no posts found' on custo (4 posts)

  1. Stephen Harris
    Posted 4 years ago #

    I recently had a bug report for my plug-in Event Organiser, which involved a conflict with theCartPress eCommerce Shopping Cart. (Bug report here).

    The archive of the custom post type 'event' was showing a 'posts not found' message, despite there being events that should be shown.

    On inspection of your plug-in, I notice you use the request filter. In particular (line 284, TheCartPress.class) reads:

    if ( isset( $wp_query->tax_query ) || $wp_query->is_archive() ) {

    If that conditional returns true, the plug-in alters the query (it adds a meta_key and orderby parameters). The result is that any post without that meta key do not display.

    This particular instance was solved by replacing it with:

    if ( (isset( $wp_query->tax_query ) || $wp_query->is_archive() ) && ! $wp_query->is_archive('event') ) {

    However, it seems any post type or taxonomy archive will turn up blank (unless it contains certain meta keys).

    Really, there should be a check that the post type/ taxonomy is one registered by Cartpress or have options to allow users to dissociate a post type from Cartpress.

    Many thanks,


  2. Stephen Harris
    Posted 4 years ago #

    There is also an issue with url redirecting. I've noticed that the events archive url: http://example.com/events/event is redirected to http://example.com/2012/05/events which 404s.

    Unfortunately I've not been able to locate this bug yet.

  3. Inigo Gonzalez
    Plugin Author

    Posted 4 years ago #

    Hi Stephen,

    I'm going to take a look...

  4. Inigo Gonzalez
    Plugin Author

    Posted 4 years ago #

    Hi Stephen,

    The issue is with the "flush_rules" function call.

    Best regards

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic