WordPress.org

Ready to get started?Download WordPress

Forums

Posts 2 Posts
[resolved] Some incompatibility issues with Canvas theme (18 posts)

  1. Jason Judge
    Member
    Posted 1 year ago #

    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.

    http://wordpress.org/extend/plugins/posts-to-posts/

  2. Jason Judge
    Member
    Posted 1 year ago #

    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.

  3. shackep
    Member
    Posted 1 year ago #

    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.

  4. Blue
    Member
    Posted 1 year ago #

    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

  5. Jason Judge
    Member
    Posted 1 year ago #

    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

  6. shackep
    Member
    Posted 1 year ago #

    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.

  7. Matty Cohen
    Member
    Posted 1 year ago #

    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. ]

  8. shackep
    Member
    Posted 1 year ago #

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

  9. Matty Cohen
    Member
    Posted 1 year ago #

    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. ]

  10. brocheafoin
    Member
    Posted 1 year ago #

    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

  11. grayayer
    Member
    Posted 1 year ago #

    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;
    }
  12. Matty Cohen
    Member
    Posted 1 year ago #

    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.

  13. hamzahali
    Member
    Posted 1 year ago #

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

  14. Matty Cohen
    Member
    Posted 1 year ago #

    We will be, yes. :)

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

  15. John
    Member
    Posted 1 year ago #

    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.

  16. Matty Cohen
    Member
    Posted 1 year ago #

    Hi John,

    This was discussed above.

    The same fix should apply to Whitelight as well as Canvas. :)

    Regards,
    Matty.

  17. John
    Member
    Posted 1 year ago #

    Great! Thanks Matty!

  18. GerbendeGier
    Member
    Posted 1 year ago #

    I had the same issue with the WooThemes theme ' Superstore'.

    The hotfix described above also worked for me (placed in functions.php)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.