Home Forums Bug Reports Relationship field showing wrong post type in 4.4.0


Relationship field showing wrong post type in 4.4.0

  • After update to ACF 4.4.0 from 4.2.2. the relationship field started showing the list of wrong custom post type (events instead of pricing packages). I’ve noticed in the list of changes that a similar bug was listed as fixed in the previous version, but I’m still seeing it in 4.4.0, so it might have been re-introduced.

    To debug it I’ve added a filter to ‘acf/fields/relationship/query/name=coupon_packages’ and when I dump $args I can see that the post type is correctly set to “pricing”, but the ajax call returns the wrong custom post type “events” instead. In 4.2.2 this was all working correctly.

    Dump of $args from acf/fields/relationship/query filter:

    [post_type] => pricing
    [posts_per_page] => 10
    [paged] => 1
    [orderby] => title
    [order] => ASC
    [post_status] => any
    [suppress_filters] =>
    [s] =>
    [lang] => en
    [update_post_meta_cache] =>
    [field_key] => field_54d9d42747202
    [nonce] => 35dfc53406
    [ancestor] =>
    [pll_ajax_backend] => 1
    [pll_post_id] => 637
    [action] => acf/fields/relationship/query_posts
    [post_id] => 637
    [max] => 9999

  • Did you ever solve this issue? I am trying to write a filter on my own custom field and not having much luck. Can you post your solution if you have one?

  • Hi @ivanhoe,

    Thanks for the post.

    I have just tried to replicate this on my end but no luck.

    I believe this bug is now fixed in the latest version of ACF v 4.4.5

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Relationship field showing wrong post type in 4.4.0’ is closed to new replies.