From user to post not handling more that 10 connections

Support MB Relationships From user to post not handling more that 10 connectionsResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #43467
    Virgile BedinVirgile Bedin
    Participant

    Hi !
    There is an issue with the relationship between users and posts (actually i noticed it on a custom_post)
    when i connect more than 10 different users to a post, the others have their select box displayed in the metabox but no name inside.. and when i re-select a user and save the post, the select is still empty.

    The query that retrieves the users to display in the combo box looks like this :
    SELECT wp_users.ID,wp_users.user_login,wp_users.user_pass,wp_users.user_nicename,wp_users.user_email,wp_users.user_url,wp_users.user_registered,wp_users.user_status,wp_users.display_name
    FROM wp_users
    WHERE 1=1
    AND wp_users.ID IN (2,3,4,36,37,38,39,40,41,42,43,44,45)
    ORDER BY display_name ASC
    LIMIT 0, 10

    It looks like wp added an unexcpected limit to you original "include" query...
    by just adding :
    $args['number'] = count( $meta );
    on line 120 of the file /meta-box/inc/fields/user.php , i could solve the issue,
    but could you give me a way to solve it from outside the plugin source ?

    #43487
    PeterPeter
    Moderator

    Hello,

    You can use the option "Query args" in the builder to add the number query args, screenshot https://monosnap.com/file/Krlq1sXWeCb0Xz3XPq9GjewcPXF237

    Read more in the documentation https://docs.metabox.io/extensions/mb-relationships/#using-meta-box-builder

    #44154
    MauroMauro
    Participant

    I've ran into this issue today! I was just about to give up and re-implement my feature without MB Relationships.

    Please note this is still an issue. It's weird that we only get up to 10 items, and then some get removed randomly. I assume this is a bug and should get fixed. It makes relationships not work as intended.

    However this post is dated Oct 10 and it's Dec 21 now and no fix has been released... also there's no clear mention of this in the docs.

    #44165
    PeterPeter
    Moderator

    Hello Mauro,

    This issue has been added to our development queue and will be fixed in future updates of the plugin. Thank you.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.