Home Forums Add-ons Options Page Relationship in Repeater on Options Page not saving values properly?


Relationship in Repeater on Options Page not saving values properly?

  • Hello @elliot

    I’m experiencing an issue similar to this one:

    I have WP 3.9.1 and ACF 4.3.8 plus Repeater Field 1.1.1 and Options Page 1.2.0, all of which I believe to be the most recent versions.

    Basically I have the default options page with a single field group, within that a repeater field with several sub-fields, one of which is a Relationship field. When editing the options the Relationship field never seems to save the value properly. The other fields (text fields) work fine.

    With debug mode enabled I get the following error when I click Update:

    Notice: Trying to get property of non-object in /Applications/MAMP/htdocs/wp-content/plugins/advanced-custom-fields/core/fields/relationship.php on line 496

    I tracked this down and added $p as an argument to get_post_type(), which rightly or wrongly seemed to prevent the error, but doesn’t solve the problem; now when I select a post in the relationship field and click update, the post appears to be selected properly when the page updates, but the field returns an empty result in the front end, and when I refresh the options page the Relationship field has no values either.

    I’m sorry I’m not familiar enough with ACF to give any more detail. It’s not super critical for my project but I thought I would report this as it seems like a code issue and not specifically something to do with my setup.



Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.