Forums Forums Search & Filter Pro How can I get titles from ACF post object field? (instead of IDs)

Tagged: 

Viewing 7 posts - 41 through 47 (of 47 total)
  • Ross Moderator
    #252907
    This reply has been marked as private.
    Ross Moderator
    #252909
    This reply has been marked as private.
    Ross Moderator
    #252911
    This reply has been marked as private.
    Ross Moderator
    #252914
    This reply has been marked as private.
    Anonymous
    #253492

    Hi Ross, Thanks so much for your detective work! I need just a bit more guidance.

    In your recent message you say:
    You’ll have to go through and find all the post IDs, and save them, to be sure that this error won’t pop back up again…

    Find all the post IDs – with what common characteristic, exactly?

    Is this something that can be done in WP, or is it better done in the DB?

    Thanks for your help!

    Anonymous
    #253496

    Also, is there a way to automate the cleaning of the bad data?

    Ross Moderator
    #253525

    Hi again

    So to answer:

    You’ll have to go through and find all the post IDs, and save them, to be sure that this error won’t pop back up again…

    Find all the post IDs – with what common characteristic, exactly?

    So, the scenario is something like this:

    1) You had an ACF field, set the wrong way (for S&F to use) at some point
    2) You made some posts, added values for the ACF fields, and saved them (these posts have the bad, serialised, data)
    3) You then changed the format of an ACF field, to a format that works with S&F (great)
    4) You updated some of your posts (these have good data, any old posts, that you didn’t “resave” yet, will still have bad data)
    5) When building a S&F field, it takes a post (fairly randomised), and calculates the options

    So while you have posts that still have bad data, you run the risk of S&F randomly picking it (in step 5) and causing the field not to pick up the labels properly.

    Sooo…

    To find the bad data is tricky, but we did it before, we looked in the S&F search_filter_term_results and we found some entries that had for the field_value column, some values like: {i:0;s:4"1154...

    You can look through all the records in this table, looking for bad data like this, then you will see in the result_ids column, the IDs of all the posts associated with that bad data.

    So you then need to edit these posts (via wp-admin), and click “update” – this should resave the post, and remove the bad data.

    You should also see the bad data dissapear from our tables too!

    I hope that explains things clearly.

    Best

Viewing 7 posts - 41 through 47 (of 47 total)