WordPress.org

Ready to get started?Download WordPress

Forums

Types - Custom Fields and Custom Post Types Management
[resolved] Problem with many-to-many relationships in Pages (10 posts)

  1. donmik
    Member
    Posted 1 year ago #

    Hi,

    In version 1.2, the many-to-many relationships don't work good.

    I have Pages default post type of wordpress, Banners a custom post type I have created and "Banners of Pages" an intermediate object to relate pages with banners. It's a many-to-many relationship.

    I have created "Banners of Pages" and mark Pages and Banners as parents of this post type.

    When I edit a Banner I can add a new "Banner of Pages" clicking Add New Banner of pages and selecting what page I want in the dropdown selector of pages.

    But when I edit a Page and I click add a new Banner of Pages clicking Add New... there is no dropdown selector of banners to choose. I can only see the post_title field but no dropdown.

    This works if Pages were a custom post type but not with the default post type of WordPress. This works correctly in previous version 1.1.3.4 and fails now in 1.2.

    By the way, thanks a lot fot this great plugin!

    http://wordpress.org/extend/plugins/types/

  2. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Atallos,

    For your information Many-To-Many relation having few limitations. That is why we have updated it.

    Now it is possible with two Custom Post Types, if you choose it through "Edit Fields" feature of Custom Post Type's(Parent) edit screen. Which allows you to choose to other Parent(For example Page) from another Parent(Banner of Pages).

    [ Signature moderated. ]

  3. donmik
    Member
    Posted 1 year ago #

    Hi Bigul

    Thanks for your answer, but i don't understand it.
    Which limitations it has? in the last version,1.1.3.4, this work fine, and now no.

    Can you repeat the explication with other words, please?

  4. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Atallos,

    It will work in following case.

    For an example I have three custom post types. P1,P2 and P3. P1 and P2 are parents of P3. In the post edit screen of P1 and P2 posts you can view P3 fields. You can choose specific fields of P3, to appear in the parent posts screen. For this choose P1 and P2 custom post type edit screens, then click on "Children" link, for child Posts you can view "Edit Fields" link. Click on Edit Fields and choose specific field you want.

    [ Signature moderated. ]

  5. donmik
    Member
    Posted 1 year ago #

    Hi bigul

    It is correct. if you use two customs types, it works fine. but if you use one custom type (C1) and one page (P1) no. Our example is:
    P1 have a lot of children kind of C1, so we use Many-To-Many relation. We create a object ( rel-C1-P1) where C1 and P1 are parents of rel-C1-P1.
    When we edit page, we want to add new C1 with the dropdown selector of C1.

    In this version (1.2) is not possible, Is this one limitation ?

    Thanks for your help.

  6. donmik
    Member
    Posted 1 year ago #

    Hi Bigul

    We are working in the last version, and we found it this:

    In the previous version, you search parent of object in the functions wpcf_pr_admin_post_meta_box_has_form_headers and wpcf_pr_admin_post_meta_box_has_form. If the relationship hasn't defined the value fields_setting, the plugin search this values and then combine this values with $headers array in the function wpcf_pr_admin_post_meta_box_has_form_headers and again in the function wpcf_pr_admin_post_meta_box_has_row

    In the last version, if the relationship hasn't defined the value fields_setting, the plugin only show the title of the post in the new form. [ the function "row()" in the archive embedded/classes/relationship/form-child.php ]

    We hope, this answer helps you to understand our problem.

    Thanks for your help.

  7. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi atallos,

    We have created a patch for this issue. Can you please share your mail id.

    [ Signature moderated. ]

  8. donmik
    Member
    Posted 1 year ago #

    Hi Bigul

    Our email is [ redacted ]

    Thanks for your help.

  9. mbigul
    Member
    Plugin Author

    Posted 1 year ago #

    Hi atallos,

    Please check your mail and let me know your feedback.

    [ Signature moderated. ]

  10. donmik
    Member
    Posted 1 year ago #

    Great, now, it works perfect!!!

    Thank you so much!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.