• Resolved Jason Judge

    (@judgej)


    I am finding the P2P widget and the admin meta panel is not working for this module when the Woothemes Canvas theme is used. The problem is somewhere in the query handling – P2P and Canvas are not playing together.

    Has anyone here had any experience of this? Anyone found a solution? This is an excellent plugin otherwise, and I really want to see it working with Canvas.

    Where the problem lies is a mystery. Several days of effort has not been enough for me to trace the source, but is certainly somewhere in the WP query.

    https://www.ads-software.com/extend/plugins/posts-to-posts/

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter Jason Judge

    (@judgej)

    I’ve also raised this with Woothemes, but their ticket system is located behind some kind of black hole, so I can’t provide any kind of ticket number or link to point you at discussion there.

    I am also having issues with Woothemes Canvas and Post 2 Posts. I create a connection and it seems to work. But when I return to the connected CPT page it appears to not have a connection. When I try to reconnect I get an error message stating “Duplicate connections are not allowed.” So it is technically connected but does not show properly on the backend. I have not tried to use a short code to show the connection yet.

    Same problem here, i just posted a ticket in woothemes. At least i′m gratefull that i found this thread because i was going crazy. I don′t think either woothemes or posts 2 posts will modify their products to solve this so i′m looking forward to someone in the community finding a solution. If someone finds something please let as know as i have a project in an advanced stage using canvas and i really need posts to posts to work. Thanks

    Thread Starter Jason Judge

    (@judgej)

    Blue, this may help you:

    In my theme functions.php, I have added this action:

    add_action('init', 'my_canvas_hotfix_remove_filters', 999);

    The “hotfix” function is then:

    function my_canvas_hotfix_remove_filters($query = NULL)
    {
        remove_filter('pre_get_posts', 'woo_exclude_categories_homepage', 10);
        return $query;
    }

    That allows the Posts 2 Posts admin panel to work. Whatever the woo_exclude_categories_homepage filter is, we don’t use it and don’t miss it.

    With this in place, the front-end widget works *some* of the time, but we have not followed that up, as we do not use the front-end widget (we link posts with no public pages, and so just operate it through the APIs).

    I have raised this as a ticket with WooThemes over a week ago, and not had any response yet. So I have no idea if this is something they see as their problem. What would be ideal is for WooThemes to talk to the developer of this plugin directly. One side, or both sides, is not playing fair with the WP query hooks, or perhaps this is a bug in core WP? Whatever it is, it is something deep inside the Canvas theme that I have not been able to dig out.

    — Jason

    Jason,
    Thanks. This works as a workaround. I am still hoping that Woothemes gets back to me. I don’t know when/if we may need to use woo_exclude_categories down the line.

    Hi all,

    Thanks for your feedback on this.

    This will be examined further in our next Canvas development cycle, to begin shortly.

    I can confirm that the above fix looks correct and should remedy the issue. We’ll be sure to use this as a reference during the next Canvas development cycle. ??

    Thanks and regards,
    Matty
    [ Signature moderated. ]

    Fantastic Matty. Thanks for getting back to us on this. You guys do great work. Thanks again!

    Hi all,

    Please update to the latest version of Canvas (v5.0.12) where we have inspected this compatibility further.

    Please advise if this produces the desired result. ??

    Thanks and regards,
    Matty
    [ Signature moderated. ]

    Hi Matty,

    I’m seeing the same issue with version 1.1.0 of Hustle. If this has been effectively fixed in Canvas, you should add the fix on all your themes that need it.

    Cheers,

    Alexandre

    I’m using:

    CANVAS 5.2.4
    FRAMEWORK 5.5.5

    I was finding that the only way to get canvas and posts2posts to work together is to comment out the original functions in canvas/includes/theme-functions.php on line 1142.

    Now it works, thanks to Jason Judge for directing us to add this code into one’s theme functions.php

    add_action('init', 'my_canvas_hotfix_remove_filters', 999);
    
    function my_canvas_hotfix_remove_filters($query = NULL)
    {
        remove_filter('pre_get_posts', 'woo_exclude_categories_homepage', 10);
        return $query;
    }

    That action looks good, grayayer.

    FWIW, you don’t need such a high priority setting (even no priority setting should be fine), and you don’t need to return $query or pass $query through to the function. ??

    Cheers,
    Matty.

    This solution works, but its not a permenant fix. Will woothemes not support their most important theme canvas?

    We will be, yes. ??

    We’ll be looking into a more permanent fix in due course.

    I have the same issue with the latest version of Whitelight.

    The temp fix seems to be commenting out line 102 in /wp-content/themes/whitelight/includes/theme-functions.php:

    // Exclude categories on the homepage.
    //add_filter( ‘pre_get_posts’, ‘woo_exclude_categories_homepage’ );

    Looking forward to a theme update.

    Hi John,

    This was discussed above.

    The same fix should apply to Whitelight as well as Canvas. ??

    Regards,
    Matty.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Posts 2 Posts] Some incompatibility issues with Canvas theme’ is closed to new replies.